When I launch my app, I get a window that pops up with the following:
···
iCCP: cHRM chunk does not match sRGB
Details:
15:36:23: iCCP: known incorrect sRGB profile
15:36:23: iCCP: cHRM chunk does not match sRGB
Some digging suggests that this may be caused by an incorrect png file (something about improper gamma correction - apparently, the Mac is much more picky about this than Windows or Linux).
I can suppress the warning with wx.Log.SetLogLevel(0), but of course, that does not fix the problem.
Unfortunately, my app has dozens of png files, and I have no idea which one(s) might be at fault.
Is there a way to get a stack trace in the warning so I can find out where the error is coming from?
Try running your app from the command line - you will usually get more detail or add some output before opening each png file.
···
On 16/11/13 20:47, Edward Sitarski wrote:
When I launch my app, I get a window that pops up with the following:
----------------------
iCCP: cHRM chunk does not match sRGB
Details:
15:36:23: iCCP: known incorrect sRGB profile
15:36:23: iCCP: cHRM chunk does not match sRGB
----------------------
Some digging suggests that this may be caused by an incorrect png file (something about improper gamma correction - apparently, the Mac is much more picky about this than Windows or Linux).
I can suppress the warning with wx.Log.SetLogLevel(0), but of course, that does not fix the problem.
Unfortunately, my app has dozens of png files, and I have no idea which one(s) might be at fault.
Is there a way to get a stack trace in the warning so I can find out where the error is coming from?
Thanks.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
If I run on Windows or Linux, I do get more info when running from the command line.
Alas, the Mac is “different”. I just get the error dialog - no stack track, no additional info.
After a hour or so, I figured out how to write my own log target that outputs a stack trace (see attachment).
The wxPython documentation is not clear about this. You actually have to inherit from wx.PyLog, not wx.Log as documented.
Inheriting from wx.LogStderr also does not work. Unfortunately, inheriting from wx.Log and wx.LogStderr were the first approaches I tried.
The attached code demonstrates a custom log target that prints a stack trace to stderr. Its still a bit messy, but it gets the job done.
On Saturday, November 16, 2013 4:56:23 PM UTC-5, Gadget Steve wrote:
On 16/11/13 20:47, Edward Sitarski wrote:
When I launch my app, I get a window that pops up with the following:
iCCP: cHRM chunk does not match sRGB
Details:
15:36:23: iCCP: known incorrect sRGB profile
15:36:23: iCCP: cHRM chunk does not match sRGB
Some digging suggests that this may be caused by an incorrect png file
(something about improper gamma correction - apparently, the Mac is
much more picky about this than Windows or Linux).
I can suppress the warning with wx.Log.SetLogLevel(0), but of course,
that does not fix the problem.
Unfortunately, my app has dozens of png files, and I have no idea
which one(s) might be at fault.
Is there a way to get a stack trace in the warning so I can find out
where the error is coming from?
Thanks.
–
You received this message because you are subscribed to the Google
Groups “wxPython-users” group.
When I launch my app, I get a window that pops up with the following:
----------------------
iCCP: cHRM chunk does not match sRGB
Details:
15:36:23: iCCP: known incorrect sRGB profile
15:36:23: iCCP: cHRM chunk does not match sRGB
----------------------
Some digging suggests that this may be caused by an incorrect png file
(something about improper gamma correction - apparently, the Mac is much
more picky about this than Windows or Linux).
IIRC it is actually due to the newest version of the standard png library being much more picky than before. The wx code using libpng is generically turning any errors from libpng in to wx asserts, which results in the warnings in the log. It is likely that once that version of libpng is put into the various linux package repositories then the messages will show up there as well.
I haven't kept up with this issue in the wxWidgets world, but the developers are aware of it and I imagine if there isn't a solution forthcoming from the libpng project then something will be done about it on the wx side if possible.