GNOME Bugzilla – Bug 757547
EasyTag crashes after startup ..
Last modified: 2015-11-05 08:57:25 UTC
Arch Linux Gnome 3.18 EasyTag crashes while scanning for audio files with the following message *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug Floating point exception (core dumped)
Thanks for taking the time to report this. Without a stack trace from the crash it's very hard to determine what caused it. Can you get us a stack trace? Please see https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces for more information on how to do so. When pasting a stack trace in this bug report, please reset the status of this bug report from NEEDINFO to its previous status. Thanks in advance!
(In reply to André Klapper from comment #1) > Thanks for taking the time to report this. > Without a stack trace from the crash it's very hard to determine what caused > it. > Can you get us a stack trace? Please see > https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces for > more information on how to do so. When pasting a stack trace in this bug > report, please reset the status of this bug report from NEEDINFO to its > previous status. Thanks in advance! Hi Andre, apologies, I should have thought to include a stack trace ... (gdb) run Starting program: /usr/bin/easytag [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe9fee700 (LWP 12299)] [New Thread 0x7fffe97ed700 (LWP 12300)] [New Thread 0x7fffe3398700 (LWP 12301)] *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug Program received signal SIGFPE, Arithmetic exception. 0x00000000004484a0 in ?? () (gdb) thread apply all bt
+ Trace 235672
Thread 1 (Thread 0x7ffff7f20980 (LWP 12289))
There are lots of missing symbols from that stack trace, so it is not that useful. If the crash is really inside pixman, this is almost certainly not a bug in EasyTAG, as it does no custom drawing. Please try to get EasyTAG and pixman (and probably cairo and maybe some other libraries') debug symbols, and get a more complete stack trace.
Hi David, Please bear with me, debugging is new to me but I am learning fast :-) ... I have been able to produce a more complete stack trace although there are still some missing symbols, I will continue to work on it today ... I hope this second stack trace may be more useful .. *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug Program received signal SIGFPE, Arithmetic exception. 0x00000000004484a0 in et_flac_header_read_file_info (file=file@entry=0x8dd280, ETFileInfo=ETFileInfo@entry=0x126ed80, error=error@entry=0x7fffffffd480) at src/tags/flac_header.c:114 114 src/tags/flac_header.c: No such file or directory. (gdb) thread apply all bt
+ Trace 235674
Thread 1 (Thread 0x7ffff7f20980 (LWP 3588))
Created attachment 314832 [details] [review] use FLAC__metadata_iterator_get_block_type() If the crash is in EasyTAG, that is a rather unusual place to crash. The libflac documentation is not clear on this point, but it might be the case that FLAC__metadata_iterator_init() does not correctly initialise the metadata iteractor correctly. Can you try the attached patch, and see if it works for you? If it doesn't, it would be good to have a copy of the problematic file, so that I can try to reproduce the problem.
David, Thanks for the patch, .. I followed the guide in the Arch Wiki to apply the patch to the PKGBUILD but the build failed with the following error .. CC src/tags/easytag-flac_header.o src/tags/flac_header.c: In function ‘et_flac_header_read_file_info’: src/tags/flac_header.c:111:53: error: passing argument 1 of ‘FLAC__metadata_iterator_get_block_type’ from incompatible pointer type [-Werror=incompatible-pointer-types] if (FLAC__metadata_iterator_get_block_type (block) ^ In file included from src/tags/flac_private.h:27:0, from src/tags/flac_header.c:29: /usr/include/FLAC/metadata.h:1150:29: note: expected ‘const FLAC__Metadata_Iterator * {aka const struct FLAC__Metadata_Iterator *}’ but argument is of type ‘const FLAC__StreamMetadata * {aka const struct <anonymous> *}’ FLAC_API FLAC__MetadataType FLAC__metadata_iterator_get_block_type(const FLAC__ ^ cc1: all warnings being treated as errors Makefile:2318: recipe for target 'src/tags/easytag-flac_header.o' failed make[2]: *** [src/tags/easytag-flac_header.o] Error 1 make[2]: Leaving directory '/tmp/yaourt-tmp-toppy/aur-easytag-git/src/easytag' Makefile:3189: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/tmp/yaourt-tmp-toppy/aur-easytag-git/src/easytag' Makefile:1292: recipe for target 'all' failed make: *** [all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... tbh we are reaching the outer limits of my knowledge and experience but I will continue to provide as much information as I can .. can you tell me which 'problematic' file you need and I will send a copy. I am trying to build/install easytag-git 2.4.0.r8.g32fb3b from the Arch AUR .. https://aur4.archlinux.org/packages/easytag-git The system is using flac 1.3.1-1 from Arch Packages https://www.archlinux.org/packages/extra/x86_64/flac/
Created attachment 314842 [details] [review] updated test patch Ah, I don't have fatal warnings enabled. Anyway, can you try this updated patch instead?
Rebuilt with new patch .. but error persists ... stack trace below (gdb) run Starting program: /usr/bin/easytag [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe9fee700 (LWP 1639)] [New Thread 0x7fffe97ed700 (LWP 1640)] [New Thread 0x7fffe3398700 (LWP 1641)] *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug Program received signal SIGFPE, Arithmetic exception. 0x0000000000449ab6 in et_flac_header_read_file_info (file=0x8df900, ETFileInfo=0x126d680, error=<optimized out>) at src/tags/flac_header.c:115 115 ETFileInfo->duration = stream_info->total_samples (gdb) thread apply all bt
+ Trace 235675
Thread 1 (Thread 0x7ffff7f20980 (LWP 1620))
Created attachment 314850 [details] [review] handle FLAC sample rate of zero Interesting! This can only happen if the sample rate is 0, which is invalid according to the FLAC specification: https://xiph.org/flac/format.html#metadata_block_streaminfo Can you try this patch, and upload (or send me privately) any files that it shows to have invalid headers?
That worked ! Console now shows the Invalid Flac file(s) ** (easytag:1581): WARNING **: Invalid FLAC sample rate of 0: /home/toppy/Music/George Benson & Earl Klugh - Collaboration Smooth Jazz/07 Jamaica.flac Will send FLAC to your email if needed ?
Yes please! It would be good to confirm the sample rate, and other metadata, and to see if any other parts of the FLAC reader need to be hardened against such files. I will push a fix to git master tomorrow.
(In reply to David King from comment #11) > Yes please! It would be good to confirm the sample rate, and other metadata, > and to see if any other parts of the FLAC reader need to be hardened against > such files. I will push a fix to git master tomorrow. Offending FLAC file has been sent David, many thanks for your help. I will mark the thread as Resolved
Thanks. For the record, I pushed the fix (dropping the warning to a debug message) to master as commit 367e0b25f79a2e4cd8fa1a592f7093c13c6b748a.