Files
scikit-image/skimage/io/_plugins
Kevin Murray b9a7445296 [skimg.io._plugins.freeimage_plugin] fix segfault
I have moved the freeimage error handler callback function to the module
namespace to prevent it being garbage collected. See the following for
more info on this quirk of ctypes:
http://stackoverflow.com/questions/12995925/how-to-prevent-functype-from-being-collected
https://github.com/JohannesBuchner/PyMultiNest/issues/5

This also changes the way FreeImage errors are handled. If an exception
is raised in a callback, it will not propagate beyond ctypes internals.
Now, we use a callback that sets a global variable to indicate error. We
then check for error and reset the error string to NULL every time the
C api is called. This is the only way we can both:
 a) Not segfault on freeimage error
 b) Pass the freeimage error to the user
 c) raise RuntimeError()
2014-06-27 21:26:58 +10:00
..
2013-10-17 13:44:19 +02:00
2012-11-24 19:04:01 +00:00
2013-06-12 21:36:28 +02:00
2012-06-29 11:27:23 +02:00
2013-12-05 23:19:47 -06:00
2014-04-03 19:56:02 -04:00
2012-06-29 11:27:23 +02:00
2012-06-29 11:27:23 +02:00
2011-10-18 21:12:27 +02:00
2013-06-12 21:16:23 +02:00
2012-06-29 11:27:23 +02:00
2013-06-12 21:16:23 +02:00