Bug 2213

Summary: Fix 64bit problems in LibGlade
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Diego Novillo <dnovillo>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Project(s) to access: ssh public key:
Bug Depends on: 2326    
Bug Blocks: 2004, 2127, 2188, 2214    
Attachments: Diego's fix
spam

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]
spam