#583 crash after closing a modified document and choosing save

closed-fixed
nobody
None
8
2010-12-03
2010-11-17
zusel tjatte
No

At closing an unsaved tab Geany asks whether to save the file. After confirming it, it crashes on Windows 7.

Geany 0.19.1, GTK+ 2.16.6, GLib 2.20.5

gdb bt:
#0 0x00566c39 in ?? ()
#1 0x004e8d7c in ?? ()
#2 0x00566917 in ?? ()
#3 0x004e1cdd in ?? ()
#4 0x004d5940 in ?? ()
#5 0x004abcf7 in ?? ()
#6 0x685ea27b in g_main_context_dispatch ()
from C:\Program Files (x86)\GTK2-Runtime\bin\libglib-2.0-0.dll
#7 0x685ed185 in g_main_context_iterate ()
from C:\Program Files (x86)\GTK2-Runtime\bin\libglib-2.0-0.dll
#8 0x685ed574 in g_main_loop_run ()
from C:\Program Files (x86)\GTK2-Runtime\bin\libglib-2.0-0.dll
#9 0x00a34260 in gtk_main ()
from C:\Program Files (x86)\GTK2-Runtime\bin\libgtk-win32-2.0-0.dll
#10 0x0046f9a3 in ?? ()
#11 0x004010b6 in ?? ()
#12 0x00401128 in ?? ()
#13 0x760f3677 in KERNEL32!BasepMapModuleHandle ()
from C:\Windows\syswow64\kernel32.dll
#14 0x7efde000 in ?? ()
#15 0x77489d42 in ntdll!RtlpNtQueryValueKey ()
from C:\Windows\system32\ntdll.dll
#16 0x77489d15 in ntdll!RtlpNtQueryValueKey ()
from C:\Windows\system32\ntdll.dll
#17 0x00000000 in ?? ()

Discussion

  • Enrico Tröger
    Enrico Tröger
    2010-11-21

    Oops.
    Did this happen only once or can you reproduce it?
    Unfortunately, the backtrace isn't that helpful but thanks anyway.

     
  • zusel tjatte
    zusel tjatte
    2010-11-21

    I am able to reproduce it on Windows 7 x64.
    Is there a way to produce a better backtrace on windows? (If it would help you then)

     
  • Enrico Tröger
    Enrico Tröger
    2010-11-28

    Not sure. The GTK and GLib libraries with debug symbols would help but I can't find any on the net.

    Which locale do you use?
    Is the 'Use Windows File Open/Save dialogs' option enabled?

    One moe thing you could try is to use the native 64bit Windows GTK/Glib libraries, maybe that helps.
    Get the bundle from http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.16/gtk+-bundle_2.16.6-20100912_win64.zip and extract it into your Geany installation. That would install some files you won't need but they also don't hurt. It might be worth a try.

    I tried to reproduce on an English Windows 7 x86 but with no luck, Geany doesn't crash :).

     
  • Matthew Brush
    Matthew Brush
    2010-12-02

    I have this on linux and windows. Here's the gdb output in Arch linux with v0.20 (svn >= r5455):

    Program received signal SIGSEGV, Segmentation fault.
    LineVector::LineFromPosition (this=0x78, pos=18) at CellBuffer.cxx:68
    68 return starts.PartitionFromPosition(pos);
    (gdb) bt
    #0 LineVector::LineFromPosition (this=0x78, pos=18) at CellBuffer.cxx:68
    #1 0x00000000004c95a6 in Editor::IdleStyling (this=0xd613a0)
    at Editor.cxx:6245
    #2 0x00000000004a4789 in ScintillaGTK::StyleIdle (
    sciThis=<value optimized out>) at ScintillaGTK.cxx:2331
    #3 0x00007ffff527cbf3 in g_main_context_dispatch ()
    from /usr/lib/libglib-2.0.so.0
    #4 0x00007ffff527d3d0 in ?? () from /usr/lib/libglib-2.0.so.0
    #5 0x00007ffff527da42 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
    #6 0x00007ffff78dd917 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
    #7 0x00000000004753ba in main (argc=1, argv=0x7fffffffe708) at main.c:1137

     
  • zusel tjatte
    zusel tjatte
    2010-12-02

    The problem seems to occur only if "Ensure newline at file end" is enabled and there is no newline at the end of the document. The file is always saved, though.

    The 'Use Windows File Open/Save dialogs' option has no effect on this behaviour. And it is still the same with the proposed gtk bundle. My locale is German_Germany.1252.

     
  • Nick Treleaven
    Nick Treleaven
    2010-12-02

    I can reproduce this on Linux too.

    >The problem seems to occur only if "Ensure newline at file end" is enabled and there is no newline at the end of the document

    Thanks, this helped to reliably reproduce the problem. Thanks also to both of you for reporting this.

    It's possible this is a Scintilla bug. I've sent a message to the Scintilla mailing list about this:
    http://groups.google.com/group/scintilla-interest/browse_thread/thread/6812ac285164fd9d?hl=en

    Hopefully they can shed light on the issue.

     
  • Nick Treleaven
    Nick Treleaven
    2010-12-02

    • priority: 5 --> 8
    • summary: crash after close a tab and save on windows --> crash after closing a modified document and choosing save
     
  • Nick Treleaven
    Nick Treleaven
    2010-12-03

    This should be fixed in SVN now.

     
  • Nick Treleaven
    Nick Treleaven
    2010-12-03

    • status: open --> closed-fixed
     
  • Nick Treleaven
    Nick Treleaven
    2010-12-03

    • labels: 1168813 -->