FS#25893 - geany 0.20-1 segfault after clicking on "Open file" more than once

Attached to Project: Community Packages
Opened by Dima (dimka) - Monday, 05 September 2011, 06:27 GMT
Last edited by Alexander F. Rødseth (xyproto) - Sunday, 09 October 2011, 11:37 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Clicking on "Open", then "Cancel", then "Open" again results in crash with the following error:

**
Gtk:ERROR:gtkfilechooserdefault.c:8750:gtk_file_chooser_default_initial_focus: assertion failed: (widget != NULL)

Aborted


As far as I could tell from several tests, the problem happens ONLY when at the time of the first clicking on "Open", THERE IS NO FILE loaded in Geany.
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Sunday, 09 October 2011, 11:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 0.21.
Comment by Angel Velasquez (angvp) - Tuesday, 06 September 2011, 21:42 GMT
Cannot reproduce it, what architecture are you using?
Comment by Jakob Matthes (jakobm) - Tuesday, 06 September 2011, 22:35 GMT
I can reproduce it on x86_64.
geany rebuilt with CFLAGS=-g, backtrace attached.
I think it should go upstream or are there any Arch Linux specific aspects to this?

geany 0.20 (built on Sep 7 2011 with GTK 2.24.6, GLib 2.28.8, GIO)
Comment by Justin Jacobs (dorkster) - Wednesday, 07 September 2011, 03:24 GMT
I was also able to reproduce this. Downgrading from gtk2-2.24.6-2 to gtk2-2.24.5-3 has temporarily solved this problem for me.
Comment by Angel Velasquez (angvp) - Wednesday, 07 September 2011, 17:11 GMT
@jakobm Yes this see totally upstream, would you mind to report it on the geany bug tracker? [0]

@dorkster Ok I have gtk2-2.24.6-2 .. and I cannot reproduce it.

[0] http://www.geany.org/Support/Bugs
Comment by Justin Jacobs (dorkster) - Wednesday, 07 September 2011, 17:47 GMT
I don't think this is an upstream problem. Arch's current build of Geany was built using GTK 2.22.1. Building Geany with GTK 2.24.6-2 installed fixes the bug.
Comment by Jakob Matthes (jakobm) - Wednesday, 07 September 2011, 18:10 GMT
Justin, are you on x86_64 or i686? I do not encounter this on i686.
As you can see in my comment, I rebuilt it against gtk 2.24.6 without success.

Upstream reference: https://sourceforge.net/tracker/?func=detail&aid=3405777&group_id=153444&atid=787791
Comment by Justin Jacobs (dorkster) - Wednesday, 07 September 2011, 18:17 GMT
@jakobm Sorry, I didn't realize you built against GTK 2.24.6. I'm on i686, which is why I thought this problem was universal across architectures.
Comment by Angel Velasquez (angvp) - Wednesday, 07 September 2011, 20:05 GMT
Ok I have everything from the repos and working as expected on x86_64 ..

If some of you are receiving those problems on x86_64 maybe is doing some PEBKAC and it's not a bug.

(there's no need to downgrade or rebuild *anything* for me until now).

Comment by marcin kowalski (yoshi314) - Thursday, 08 September 2011, 09:38 GMT
just started happening to me, geany is from repository. x86_64.

Didn't have this problem before.

Attempt to open a second file causes a crash.
Comment by Angel Velasquez (angvp) - Thursday, 08 September 2011, 16:32 GMT
Hmm still without reproducing it .. would you mind to run geany with gdb and paste the proper trace in order to figure out if this an upstream problem?
Comment by Jakob Matthes (jakobm) - Thursday, 08 September 2011, 18:11 GMT
Angel, I ran the geany version from our x86_64 repository with gdb. Is there anything useful, what else could I provide?
If this issue is not reproducible with the given instructions, what other parts/programs could be relevant?

Here is the function with the failing assertion: http://git.gnome.org/browse/gtk+/tree/gtk/gtkfilechooserdefault.c?h=gtk-2-24#n8816
Comment by Ionut Biru (wonder) - Thursday, 08 September 2011, 18:16 GMT
Reading symbols from /usr/bin/geany...(no debugging symbols found)...done.

you didn't compile gtk2 and geany with debug symbols

https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#One_package_settings_only
Comment by Jakob Matthes (jakobm) - Thursday, 08 September 2011, 19:13 GMT
Thanks for the pointer Ionut, I think I got it right now (gtk2, glib2 and geany built with debug symbols). All occurrences of '??' have vanished but some information is replaced with '<optimized out>'.
Comment by Ionut Biru (wonder) - Thursday, 08 September 2011, 19:15 GMT
if you want to get rid of optimized out you should disable optimization

export CFLAGS="$CLFAGS -g -O0"
export CXXFLAGS="$CXXLFAGS -g -O0"

now with this output, report on gnome bugzilla in gtk+ project and paste the link
Comment by Jakob Matthes (jakobm) - Thursday, 08 September 2011, 19:42 GMT
Upstream https://bugzilla.gnome.org/show_bug.cgi?id=658600
I can recompile it later without optimization to see if it yields anything useful.
Comment by marcin kowalski (yoshi314) - Monday, 12 September 2011, 07:47 GMT
problem stopped existing atm, i wonder what changed. it was 100% reproductible when i reported on it.

can anyone retest after updating their system ? It doesn't matter now whether geany starts with an empty session or restores previous session with open files. maybe it has something to do with system uptime ?
Comment by Marcel Pfeiffer (IwfY) - Tuesday, 20 September 2011, 09:07 GMT
With fully updated i686 system the bug is fixed for me too. But I don't know which package update caused this.
Comment by Michael Brown (mwbrown) - Thursday, 22 September 2011, 23:20 GMT
I can confirm that this bug still occurs on x86_64, fully updated after `pacman -Syyu`:

Installed version of GTK2: 2.24.6-2 w/ build date of 2011-09-01
Installed version of Geany: 0.20-1 w/ build date of 2011-01-06

However, building the AUR package geany-svn seems to fix the issue, which leads me to believe it's either just a matter of relinking it with the newest GTK, or it was an actual bug that was fixed in code, but it is more likely to be the former than the latter.
Comment by Axilleas Pipinellis (markelos) - Wednesday, 05 October 2011, 12:55 GMT
Is this not fixed yet? I can still reproduce it on my x86_64 updated system with [testing] anabled.
I built gtk2 with patch provided at bugzilla [1] and problem solved.

[1] http://bugzilla-attachments.gnome.org/attachment.cgi?id=196433
Comment by Alexander F. Rødseth (xyproto) - Sunday, 09 October 2011, 11:37 GMT
Updated Geany to 0.21. This problem seems to be gone here now. Closing this bug. Thank you.

Loading...