[Geany-devel] Crash when using splitwindow plugin
Wolfgang Ocker
weo at xxxxx
Thu Feb 26 13:12:22 UTC 2009
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.geany.org/pipermail/devel/attachments/20090226/695ffc0c/attachment.pgp>
More information about the Devel
mailing list