GNOME Bugzilla – Bug 304870
segfault on creating a gdk.Point
Last modified: 2009-08-15 18:40:50 UTC
i'm having a segfault when running this: org.gnu.gdk.Point p = new org.gnu.gdk.Point(0,0). for some reason the jni call to getPointerFromHandle returns 1 instead of the pointer value (which is set correct in the Handle). this happens when Point ctor calles setX(x)
Created attachment 46703 [details] [review] fix for head branch fix the jni bug in gdk.Point and the same bug in gdk.Rectangle this fix also add: 1) default ctor for gdk.Point 2) user ctors for gdk.Rectangle
Created attachment 46704 [details] [review] fix for 2-6 branch fix the jni bug in gdk.Point and the same bug in gdk.Rectangle this fix also add: 1) default ctor for gdk.Point 2) user ctors for gdk.Rectangle
Created attachment 46909 [details] [review] fix for 2-6 branch fixes another bug on point jni
Can you please post a small example class which exercised this code so I can test your fixes? I don't have any code handy which uses these classes, so I can't verify your patches. AfC Calgary
Patch applied to branch 2_6, but without the API changes for Point and Rectangle. Unfortunately we can't make API modifs to this branch, only bug fixes. Patch applied to CVS HEAD (including API changes). Thanks for your contribution. Sorry about the delay.
I'm not sure whether there was much point in committing some of these changes (namely finalizer and _new functions) as these are GBoxed and therefore should use the framework introduced by the new memory management scheme.
I think we can modify the finalizer code and handle creation once we know what the final look of the GBoxed memory mgt stuff will be.