Bug 2213 - Fix 64bit problems in LibGlade
Summary: Fix 64bit problems in LibGlade
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Diego Novillo
Depends on: 2326
Blocks: 2004 2127 2188 2214
  Show dependency treegraph
Reported: 2006-01-26 16:04 UTC by Andrew Cagney
Modified: 2008-04-06 13:52 UTC (History)
0 users

See Also:
Last reconfirmed:

Diego's fix (482 bytes, patch)
2006-01-26 16:05 UTC, Andrew Cagney
Details | Diff
spam (4 bytes, text/plain)
2008-04-06 13:52 UTC, wwwqqq

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-01-26 16:04:12 UTC
I will be sending this patch to LibGlade upstream.  The SEGV inside
LibGlade was due to a bug in jni/org_gnu_glade_LibGlade.c.  The file
does not include a prototype for gkt-java's getGObjectHandle, so the
compiler was assuming the function returns 'int'.

The function actually returns a 'void *', and since this is a 64bit
host, the returned value (assumed to be int by the compiler) was being
sign extended.  So, anyway, the fix is obvious.  The warnings were right
there and being ignored, as usual.

The actual difficult part of finding this was the multithreading and the
multitude of calls into JNI, pthread, dynamic casts and the rest of
Java's runtime.  Sigh.

I now get a different problem which I'll look at next:

Opening windows
25-Jan-06 8:58:27 PM frysk.gui.FryskGui importPreferences
WARNING: /home/cygnus/dnovillo/.frysk/.settings not found. Will be
created on program exit
Exception in thread "main" java.lang.NullPointerException
   at java.lang.Object.getClass (libgcj.so.7)
   at org.gnu.gtk.frysk.EggTrayIcon.egg_tray_icon_new (EggTrayIcon.java:72)
   at org.gnu.gtk.frysk.EggTrayIcon.<init> (EggTrayIcon.java:52)
   at frysk.gui.monitor.TrayIcon.<init> (TrayIcon.java:97)
   at frysk.gui.FryskGui.mainGui (FryskGui.java:168)
   at frysk.gui.FryskGui.main (FryskGui.java:237)

I'm not sure what's the process of getting this from upstream.  I've
added to my local RPM for the time being.
Comment 1 Andrew Cagney 2006-01-26 16:05:46 UTC
Created attachment 851 [details]
Diego's fix
Comment 2 Andrew Cagney 2006-01-26 17:30:51 UTC
Upstream bug: http://bugzilla.gnome.org/show_bug.cgi?id=328740
Comment 3 Andrew Cagney 2006-04-24 20:45:09 UTC
Upstream fixed.
Comment 4 wwwqqq 2008-04-06 13:52:12 UTC
Created attachment 2356 [details]