more improvements to error handling during eval
we were dropping the error buffer in tilecache, thanks David
This commit is contained in:
parent
394fbce999
commit
d8381c73da
38
TODO
38
TODO
@ -1,3 +1,41 @@
|
||||
- try:
|
||||
|
||||
$ vips avg broken.jpg[fail]
|
||||
|
||||
about 50% of the time it'll trigger a range of out-of-order reads and lock
|
||||
for 10s or so while seq waits
|
||||
|
||||
- try:
|
||||
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
|
||||
import gi
|
||||
gi.require_version('Vips', '8.0')
|
||||
from gi.repository import Vips
|
||||
|
||||
try:
|
||||
im = Vips.Image.new_from_file(sys.argv[1])
|
||||
im.avg()
|
||||
except Vips.Error as e:
|
||||
print 'saw an error <<%s>>' % e.message
|
||||
print 'vips error buffer start:'
|
||||
print Vips.error_buffer()
|
||||
print 'vips error buffer stop'
|
||||
|
||||
see:
|
||||
|
||||
$ ./read.py broken.jpg[fail]
|
||||
vips warning: linecache: error in tile 0 x 192
|
||||
vips warning: linecache: error in tile 0 x 200
|
||||
saw an error <<Error calling operator avg.>>
|
||||
vips error buffer start:
|
||||
|
||||
vips error buffer stop
|
||||
|
||||
error msg is lost
|
||||
|
||||
- add more webp tests to py suite
|
||||
|
||||
- try moving some more of the CLI tests to py
|
||||
|
@ -703,11 +703,8 @@ vips_tile_cache_gen( VipsRegion *or,
|
||||
"error on tile %p\n", tile );
|
||||
|
||||
vips_warn( class->nickname,
|
||||
_( "error reading tile %dx%d: "
|
||||
"%s" ),
|
||||
tile->pos.left, tile->pos.top,
|
||||
vips_error_buffer() );
|
||||
vips_error_clear();
|
||||
_( "error in tile %d x %d" ),
|
||||
tile->pos.left, tile->pos.top );
|
||||
|
||||
vips_region_black( tile->region );
|
||||
|
||||
|
@ -977,27 +977,29 @@ read_jpeg_generate( VipsRegion *or,
|
||||
* a vips_sequential().
|
||||
*/
|
||||
if( r->top != jpeg->y_pos ) {
|
||||
VIPS_GATE_STOP( "read_jpeg_generate: work" );
|
||||
vips_error( "VipsJpeg",
|
||||
_( "out of order read at line %d" ), jpeg->y_pos );
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* Here for longjmp() from vips__new_error_exit().
|
||||
*/
|
||||
if( setjmp( jpeg->eman.jmp ) )
|
||||
if( setjmp( jpeg->eman.jmp ) ) {
|
||||
VIPS_GATE_STOP( "read_jpeg_generate: work" );
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* If --fail is set, we make read fail on any warnings. This will stop
|
||||
* on any errors from the previous jpeg_read_scanlines().
|
||||
*/
|
||||
if( jpeg->eman.pub.num_warnings > 0 &&
|
||||
jpeg->fail ) {
|
||||
vips_error( "VipsJpeg",
|
||||
_( "read gave %ld warnings" ),
|
||||
jpeg->eman.pub.num_warnings );
|
||||
vips_error( NULL, "%s", vips_error_buffer() );
|
||||
VIPS_GATE_STOP( "read_jpeg_generate: work" );
|
||||
|
||||
/* Make the message only appear once.
|
||||
/* Only fail once.
|
||||
*/
|
||||
jpeg->eman.pub.num_warnings = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user