warn on profile save data loss

This commit is contained in:
John Cupitt 2014-09-30 21:28:16 +01:00
parent ecc8f62f6c
commit 9112e7d525
2 changed files with 23 additions and 1 deletions

View File

@ -186,8 +186,16 @@ vips__thread_profile_init_cb( VipsThreadProfile *profile )
* *
* GPrivate has stopped working, be careful not to touch that. * GPrivate has stopped working, be careful not to touch that.
* *
* Don't try to save: this is an emergency recovery path. * Don't try to save: we must free all mem before saving and we
* probably haven't done that because vips_thread_shutdown() has not
* been called.
*/ */
if( vips__thread_profile )
vips_warn( "VipsGate",
"discarding unsaved state for thread %p --- "
"call vips_thread_shutdown() for this thread",
profile->thread );
vips_thread_profile_free( profile ); vips_thread_profile_free( profile );
} }

14
python/test_overrides.py Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/python
import unittest
import math
#import logging
#logging.basicConfig(level = logging.DEBUG)
from gi.repository import Vips
from vips8 import vips
class TestOverrides(unittest.TestCase):