After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757547 - EasyTag crashes after startup ..
EasyTag crashes after startup ..
Status: RESOLVED FIXED
Product: easytag
Classification: Other
Component: general
2.4.x
Other Linux
: High critical
: 2.2
Assigned To: EasyTAG maintainer(s)
EasyTAG maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-11-03 22:19 UTC by Toppy
Modified: 2015-11-05 08:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use FLAC__metadata_iterator_get_block_type() (591 bytes, patch)
2015-11-04 15:10 UTC, David King
none Details | Review
updated test patch (590 bytes, patch)
2015-11-04 17:07 UTC, David King
none Details | Review
handle FLAC sample rate of zero (1.46 KB, patch)
2015-11-04 18:51 UTC, David King
none Details | Review

Description Toppy 2015-11-03 22:19:23 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)
Comment 1 André Klapper 2015-11-03 22:25:09 UTC
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!
Comment 2 Toppy 2015-11-03 22:46:32 UTC
(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

Thread 1 (Thread 0x7ffff7f20980 (LWP 12289))

  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #7 gtk_tree_selection_select_path
    from /usr/lib/libgtk-3.so.0
  • #8 ??
  • #9 ??
  • #10 ffi_call_unix64
    from /usr/lib/libffi.so.6
  • #11 ffi_call
    from /usr/lib/libffi.so.6
  • #12 g_cclosure_marshal_generic_va
    from /usr/lib/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #16 ??
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 ??
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib/libgio-2.0.so.0
  • #22 ??
  • #23 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #24 ??
    from /usr/lib/libglib-2.0.so.0
  • #25 g_main_context_iteration
    from /usr/lib/libglib-2.0.so.0
  • #26 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #27 ??
  • #28 __libc_start_main
    from /usr/lib/libc.so.6
  • #29 ??

Comment 3 David King 2015-11-04 06:47:44 UTC
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.
Comment 4 Toppy 2015-11-04 14:24:57 UTC
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

Thread 1 (Thread 0x7ffff7f20980 (LWP 3588))

  • #0 et_flac_header_read_file_info
    at src/tags/flac_header.c line 114
  • #1 et_file_list_add
    at src/file_list.c line 381
  • #2 Read_Directory
    at src/easytag.c line 897
  • #3 Browser_Tree_Node_Selected
    at src/browser.c line 906
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #7 gtk_tree_selection_select_path
    from /usr/lib/libgtk-3.so.0
  • #8 et_browser_select_dir
    at src/browser.c line 1156
  • #9 et_application_window_select_dir
    at src/application_window.c line 1957
  • #10 et_application_open
    at src/application.c line 447
  • #11 ffi_call_unix64
    from /usr/lib/libffi.so.6
  • #12 ffi_call
    from /usr/lib/libffi.so.6
  • #13 g_cclosure_marshal_generic_va
    from /usr/lib/libgobject-2.0.so.0
  • #14 ??
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #17 et_browser_load_default_dir
    at src/browser.c line 304
  • #18 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #19 ??
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib/libgio-2.0.so.0
  • #23 on_idle_init
    at src/application.c line 125
  • #24 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #25 ??
    from /usr/lib/libglib-2.0.so.0
  • #26 g_main_context_iteration
    from /usr/lib/libglib-2.0.so.0
  • #27 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #28 main
    at src/main.c line 38

Comment 5 David King 2015-11-04 15:10:53 UTC
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.
Comment 6 Toppy 2015-11-04 16:55:53 UTC
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/
Comment 7 David King 2015-11-04 17:07:43 UTC
Created attachment 314842 [details] [review]
updated test patch

Ah, I don't have fatal warnings enabled. Anyway, can you try this updated patch instead?
Comment 8 Toppy 2015-11-04 18:14:06 UTC
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

Thread 1 (Thread 0x7ffff7f20980 (LWP 1620))

  • #0 et_flac_header_read_file_info
    at src/tags/flac_header.c line 115
  • #1 et_file_list_add
  • #2 Read_Directory
  • #3 Browser_Tree_Node_Selected
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #7 gtk_tree_selection_select_path
    from /usr/lib/libgtk-3.so.0
  • #8 et_browser_select_dir
  • #9 et_application_open
  • #10 ffi_call_unix64
    from /usr/lib/libffi.so.6
  • #11 ffi_call
    from /usr/lib/libffi.so.6
  • #12 g_cclosure_marshal_generic_va
    from /usr/lib/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #16 et_browser_load_default_dir
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 ??
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib/libgio-2.0.so.0
  • #22 on_idle_init
  • #23 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #24 ??
    from /usr/lib/libglib-2.0.so.0
  • #25 g_main_context_iteration
    from /usr/lib/libglib-2.0.so.0
  • #26 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #27 main

Comment 9 David King 2015-11-04 18:51:17 UTC
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?
Comment 10 Toppy 2015-11-04 19:50:06 UTC
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 ?
Comment 11 David King 2015-11-04 23:32:10 UTC
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.
Comment 12 Toppy 2015-11-05 00:27:24 UTC
(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
Comment 13 David King 2015-11-05 08:57:02 UTC
Thanks. For the record, I pushed the fix (dropping the warning to a debug message) to master as commit 367e0b25f79a2e4cd8fa1a592f7093c13c6b748a.