Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTK3] segfault when reordering columns in detail view #608

Closed
jmcamp opened this issue Dec 10, 2015 · 6 comments
Closed

[GTK3] segfault when reordering columns in detail view #608

jmcamp opened this issue Dec 10, 2015 · 6 comments
Labels

Comments

@jmcamp
Copy link

jmcamp commented Dec 10, 2015

If I try to reorder the columns in detail view by clicking and dragging the column header, I get a segfault.

I am using SpaceFM v1.0.4 on Arch Linux with Gtk 3.18.5.

@IgnorantGuru
Copy link
Owner

I can't reproduce this. Perhaps @OmegaPhil can reproduce with 3.18. Otherwise we'll need more info, such as exact steps to reproduce starting with a default config:

killall spacefm
spacefm -c /tmp/spacefm-test-config

And/or a backtrace per the BUILD DEBUG section of README.

Also, if using a 3rd party GTK theme, be sure to test using Adwaita, GNOME's default theme.

@IgnorantGuru IgnorantGuru added this to the waiting milestone Dec 15, 2015
@OmegaPhil
Copy link
Contributor

Same version of GTK3 - just done a quick test here on alpha branch, no issues (yet). Any chance of a screenshot to see how big the directory is (indication of scrolling etc)?

@jmcamp
Copy link
Author

jmcamp commented Dec 16, 2015

I narrowed the issue down to the gtk3 build flag "--enable-debug". I get the segfault if I build gtk3 with "--enable-debug=no", but not with "--enable-debug=minimum" (minimum is the default if not explicitly set).

Should spacefm work when gtk3 is built with "--enable-debug=no"? Other than the segfault when reordering columns in spacefm, I didn't encounter any other issues with "--enable-debug=no". I use several gtk3 apps including transmission, easytag, and firefox nightly.

I'll take a look at the BUILD DEBUG section of README, and see if I can get a backtrace.

@jmcamp
Copy link
Author

jmcamp commented Dec 16, 2015

backtrace:

(gdb) run
Starting program: /usr/bin/spacefm 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe9a97700 (LWP 17130)]
[Thread 0x7fffe9a97700 (LWP 17130) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73071e7 in gdk_window_new () from /usr/lib/libgdk-3.so.0
(gdb) thread apply all bt full

Thread 1 (Thread 0x7ffff7f1d940 (LWP 17111)):
#0  0x00007ffff73071e7 in gdk_window_new () from /usr/lib/libgdk-3.so.0
No symbol table info available.
#1  0x00007ffff7853995 in ?? () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#2  0x00007ffff04ab1f0 in ffi_call_unix64 () from /usr/lib/libffi.so.6
No symbol table info available.
#3  0x00007ffff04aac58 in ffi_call () from /usr/lib/libffi.so.6
No symbol table info available.
#4  0x00007ffff6160d65 in g_cclosure_marshal_generic_va () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#5  0x00007ffff6160244 in ?? () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#6  0x00007ffff617aa46 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#7  0x00007ffff617b12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#8  0x00007ffff6162e2e in g_cclosure_marshal_VOID__BOXEDv () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#9  0x00007ffff6160244 in ?? () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#10 0x00007ffff617aa46 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#11 0x00007ffff617b12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#12 0x00007ffff7722785 in ?? () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#13 0x00007ffff7724c15 in ?? () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#14 0x00007ffff76fb92e in gtk_event_controller_handle_event () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#15 0x00007ffff7867a2b in ?? () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#16 0x00007ffff786b224 in ?? () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#17 0x00007ffff775d41b in ?? () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#18 0x00007ffff775ee13 in gtk_main_do_event () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#19 0x00007ffff731cdf2 in ?? () from /usr/lib/libgdk-3.so.0
No symbol table info available.
#20 0x00007ffff5e8bdc7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#21 0x00007ffff5e8c020 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#22 0x00007ffff5e8c342 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#23 0x00007ffff775e3a5 in gtk_main () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#24 0x00000000004b642a in main (argc=1, argv=0x7fffffffebe8) at main.c:1529
        run = 1
        err = 0x0

@OmegaPhil
Copy link
Contributor

I'm not the final word here, but presumably thats a GTK3 screwup based on where it broke? I run on Debian so I'm not the type to be reconfiguring packaged builds etc (since nothing is set, I'm thinking --enable-debug=minimum is being used), their building docs warn against setting no for reference.

@IgnorantGuru
Copy link
Owner

Quoting OmegaPhil's source on --enable-debug:

The default is 'minimum'. Note that 'no' is fast, but dangerous as it tends to destabilize even mostly bug-free software by changing the effect of many bugs from simple warnings into fatal crashes. Thus --enable-debug=no should not be used for stable releases of GTK+.

It's probably not good to use 'no' with SpaceFM, as SpaceFM supports a wide range of GTK versions (from 2.18 thru 3.x), so the likelihood of non-critical warnings increases. Also, as OmegaPhil observed, the crash seems to be happening deep in GTK code, in gdk_window_new() no less. So this may be a GTK bug. Column reordering is mostly handled internally by GTK, with SpaceFM's code merely being notified when a reorder has occurred.

Yet if you do see any applicable GTK warning in stdout when built with '--enable-debug=minimum' and performing the column drag, please add that info and maybe it can be addressed.

Closing this as it's unlikely it can be fixed in SpaceFM, but feel free to add further results or info below.

@IgnorantGuru IgnorantGuru removed this from the waiting milestone Dec 21, 2015
@IgnorantGuru IgnorantGuru changed the title segfault when reordering columns in detail view [GTK3] segfault when reordering columns in detail view Dec 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants