After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350092 - Duplication of struct_hash in gtk_java.c causes problems
Duplication of struct_hash in gtk_java.c causes problems
Status: RESOLVED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
mainline
Other All
: High major
: ---
Assigned To: java-gnome bindings maintainers
java-gnome bindings maintainers
Depends on:
Blocks: 350931
 
 
Reported: 2006-08-05 19:54 UTC by Sean Coughlan
Modified: 2007-01-05 00:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
patch to remove redundant methods in gtk_java.c (14.85 KB, patch)
2006-08-05 19:54 UTC, Sean Coughlan
committed Details | Review

Description Sean Coughlan 2006-08-05 19:54:23 UTC
Please describe the problem:
everything in gtk_java.c has been pushed to glib_java.c - methods and variables (struct_hash for example) with the exact same name cause me exceptions when running one or two of my java-gnome projects.

The only method that should be left in gtk_java.c after the patch is initGObject, which is still bad. The next patch to follow will rename this to initGTKObject, introduce methods like getGTKObjectHandle and such.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Sean Coughlan 2006-08-05 19:54:57 UTC
Created attachment 70275 [details] [review]
patch to remove redundant methods in gtk_java.c
Comment 2 Andrew Cowie 2006-08-06 01:53:56 UTC
Remy, I recall as part of the grand plan that there were one or two house keeping tasks that you meant to do anon. Is this one of them, or a new glitch? Either way, perhaps we should get on with this cleanup now (I can attest from my own work that more or less things are still stable when using the full stack)

AfC
Comment 3 Remy Suen 2006-08-06 02:12:13 UTC
Removing "everything" wasn't what I had originally thought since I had misinterpreted what Ismael said when he said "make a copy of gtk_java.[ch]". I took that literally, which was a mistake.

As to the patch, it as a whole is not really safe to commit right now in my opinion since the GtkObject variants of all the getGObject-related methods have not been thrown in. A lot of search/replace also needs to happen, but I think Sean mentioned that he'd be tackling that in due time.
Comment 4 Andrew Cowie 2006-09-15 05:59:44 UTC
This isn't actually a show stopper for libgtk-java 2.10, is it? I mean, it may well be necessary clean up, but it this not having been done doesn't seem to be breaking anything [i.e. I'm running apps against glib0.4-0.3.2.jar and gtk2.10-2.9.3.jar with no problems]

AfC
Comment 5 Andrew Cowie 2006-10-20 00:54:37 UTC
I gather that Sean has a better version of this patch based on work since Remy's comment. We'll either wait for that, or see if someone does something equivalent.

AfC
Comment 6 Andrew Cowie 2006-10-23 14:57:28 UTC
Mike Cvet gave this a whirl the other day to see if it would solve his bug #353298, but no joy. Nevertheless, the patch cleanly applied for him and didn't seem to crash anything.

I just tested it in my equivalence build environment and it went fine.

So as necessary cleanup we'll apply this now.

I have a bad feeling that there's something else lurking in there which needs fixing, but Sean is the only one pushing the non-GTK use case, and he's gone AWOL, so it'll wait for that to resolve itself in due course. He does have commit access so he can fix at his convenience as necessary.

AfC