On Thu, 2009-02-26 at 12:40 +0100, Wolfgang Ocker wrote:
Sometimes my home built Geany crashes with a segfault when I use the window split function.
Build info:
Linux Fedora 10, updated, uname -a: Linux goedel.recco.de 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
It might be a 32/64 bits problem. See splitwindow.c[167]:
scintilla_send_message(sci, SCI_SETDOCPOINTER, 0, GPOINTER_TO_INT(sdoc));
The usage of GPOINTER_TO_INT() looks strange to me. So I'll apply the patch below and test ...
Index: splitwindow.c =================================================================== --- splitwindow.c (revision 3603) +++ splitwindow.c (working copy) @@ -164,7 +164,7 @@
/* set the new sci widget to view the existing Scintilla document */ sdoc = (gpointer) scintilla_send_message(current, SCI_GETDOCPOINTER, 0, 0); - scintilla_send_message(sci, SCI_SETDOCPOINTER, 0, GPOINTER_TO_INT(sdoc)); + scintilla_send_message(sci, SCI_SETDOCPOINTER, 0, (glong) sdoc);
update_font(current, sci); lexer = scintilla_send_message(current, SCI_GETLEXER, 0, 0);