Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: tiwag on October 10, 2005, 10:46:24 am

Title: glfw.png bad
Post by: tiwag on October 10, 2005, 10:46:24 am
since the latest CVS commit regarding the glfw-template, C::B gives a Fatal Error when trying to create a New Project !

the problem is a bad <CodeBlocks-CVS-dir>\src\templates\common\glfw.png  file

- workaround for now :
delete this file:  <CodeBlocks-install-dir>\share\CodeBlocks\templates\glfw.png

btw. i propose to show a MessageBox, if the graphic couldn't be loaded and ignore it
like there is no graphic available instead of emitting a Fatal error and quitting C:B ;-)
Title: Re: glfw.png bad
Post by: mandrav on October 10, 2005, 12:09:22 pm
Thanks for spotting this :)
File re-uploaded correctly.

Quote
btw. i propose to show a MessageBox, if the graphic couldn't be loaded and ignore it
like there is no graphic available instead of emitting a Fatal error and quitting C:B

You see, the problem is that wx uses libpng and it calls png_error() in such cases which uses longjmp() and, in general, doesn't return. It was designed for console-style apps (or you 'd had to register a custom error handler - something that wx should be doing)...
Title: Re: glfw.png bad
Post by: tiwag on October 10, 2005, 12:29:51 pm
Quote from: mandrav
Quote
btw. i propose to show a MessageBox, if the graphic couldn't be loaded and ignore it
like there is no graphic available instead of emitting a Fatal error and quitting C:B
You see, the problem is that wx uses libpng and it calls png_error() in such cases which uses longjmp() and, in general, doesn't return. It was designed for console-style apps (or you 'd had to register a custom error handler - something that wx should be doing)...
shame on me ;-)
i didn't look from where the FatalErr was coming -  :shock: