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 171427 - Application crashes after a DrawingArea has gotten a number of expose events
Application crashes after a DrawingArea has gotten a number of expose events
Status: VERIFIED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
Really Ancient
Other All
: High critical
: ---
Assigned To: Ismael Juma
Ismael Juma
: 303391 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-03-23 23:25 UTC by Jacob Kroon
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test Case (2.10 KB, text/plain)
2005-08-03 14:49 UTC, Adam Jocksch
Details

Description Jacob Kroon 2005-03-23 23:25:43 UTC
Steps to reproduce:


Stack trace:
*** glibc detected *** ./camel: double free or corruption (fasttop): 0x09960748 ***
======= Backtrace: =========
/lib/tls/libc.so.6[0x3676e0]
/lib/tls/libc.so.6(__libc_free+0x77)[0x367cb2]
/usr/lib/libglib-2.0.so.0(g_free+0x22)[0x784bf4]
/usr/lib/libgdk-x11-2.0.so.0(gdk_region_destroy+0x25)[0x206077]
/usr/lib/libgtkjni-2.6.so(Java_org_gnu_gdk_Region_gdk_1region_1destroy+0x2c)[0x8569fc]
/usr/lib/libgtkjava-2.6.so(_ZN3org3gnu3gdk6Region18gdk_region_destroyEPNS0_4glib6HandleE+0x40)[0xbbe894]
/usr/lib/libgtkjava-2.6.so(_ZN3org3gnu3gdk6Region8finalizeEv+0x2d)[0xbbe8f9]
/usr/lib/libgcj.so.6(_Z18_Jv_FinalizeObjectPN4java4lang6ObjectE+0x1f)[0x493e335]
/usr/lib/libgcj.so.6[0x4c74235]
/usr/lib/libgcj.so.6(GC_invoke_finalizers+0x7a)[0x4c7c0da]
/usr/lib/libgcj.so.6(_Z17_Jv_RunFinalizersv+0x17)[0x4c74293]
/usr/lib/libgcj.so.6(_ZN3gnu3gcj7runtime15FinalizerThread3runEv+0x100)[0x49335ec]
/usr/lib/libgcj.so.6(_Z13_Jv_ThreadRunPN4java4lang6ThreadE+0x27)[0x4943c25]
/usr/lib/libgcj.so.6[0x4c75ad6]
/usr/lib/libgcj.so.6(GC_start_routine+0xbb)[0x4c866b0]
/lib/tls/libpthread.so.0[0x46db17]
/lib/tls/libc.so.6(__clone+0x5e)[0x3ca84e]

Other information:
I'm not sure how valuable the backtrace is, I dont have any special debugging
flags turned on. I'm using a DrawingArea, have implemented the ExposeListener
interface, the exposeEvent() method does absolutley nothing except return true.

This simple test-case reveals the bug, you have make sure enough expose-events
get generated before the app aborts:

import org.gnu.gtk.*;
import org.gnu.gtk.event.*;

class TestExpose implements ExposeListener {
	public TestExpose() {
		Window window = new Window(WindowType.TOPLEVEL);
		DrawingArea darea = new DrawingArea();
		window.add(darea);
		darea.addListener(this);
		window.showAll();
	}

	public boolean exposeEvent(ExposeEvent event) {
		System.out.print("expose-event");
		return true;
	}

	public static void main(String[] args) {
		Gtk.init(args);
		new TestExpose();
		Gtk.main();
	}
}
Comment 1 Jacob Kroon 2005-03-24 09:58:39 UTC
This bug may seem hard to generate using the above example, but if you make the
exposeEvent actually render some lines and stuff to the Gdk.Window, the
application aborts more quickly.
Comment 2 Jeffrey Morgan 2005-03-29 03:02:26 UTC
Jacob, is there any possibility you could try this with a more recent version of
libgtk-java ?
Comment 3 Jacob Kroon 2005-03-29 12:20:02 UTC
I'm afraid not, I'm running Fedora Rawhide, and it is using libgtk-java 2.6.1. I
don't have enough time/experience maintaining a jhbuild of Gnome.
Comment 4 Joao Victor 2005-03-29 19:05:11 UTC
Is Rawhide == FC3? Because if so... well, the rpms for FC3
(http://people.redhat.com/fitzsim/java-gnome/i386/) don't have gtk-java 2.6...
so how did you get it without doing it from CVS?
Comment 5 Joao Victor 2005-03-29 19:16:34 UTC
Hmmm after a little googling, it seems rawhide is like "debian sid"... gotta try
running the example later when i get home...
Comment 6 Jacob Kroon 2005-03-29 20:48:45 UTC
Yes Rawhide is somewhat similar to Debian Sid, I have the latest test release
FC4-test1 installed + updates from rawhide. I don't think this bug is specific
to FC4-test1 though, as neither Gtk or Gtk# has this problem.
Comment 7 Yair Hershkovitz 2005-05-06 13:08:35 UTC
i have the exact same problem when using a drawing area
i'm using libgtk-java 2.48 on gentoo
i'll install 2.6 and try again

it seems (atleast for me) that the crash happens when resizing smaller the window
Comment 8 Yair Hershkovitz 2005-05-06 14:11:51 UTC
this only happens to me when i'm using blackdown-jdk 1.4.2
with sun jdk1.4.2 it doesn't crash
Comment 9 Yair Hershkovitz 2005-05-07 17:00:49 UTC
crashes also with sun-jdk
Comment 10 Yair Hershkovitz 2005-05-08 22:58:15 UTC
*** Bug 303391 has been marked as a duplicate of this bug. ***
Comment 11 Nicholas Rahn 2005-06-15 12:49:12 UTC
I have tested this with the current CVS HEAD and was not able to duplicate the
error.  CVS HEAD is undergoing a large amount of changes for memory management
improvements.  As this is probably a memory management issue, it should be
resolved with the next version.
Comment 12 Adam Jocksch 2005-08-03 14:49:55 UTC
Created attachment 50174 [details]
Test Case

I get a similar error using CVS HEAD. Note that the app I included needs to be
built with the fixes in bug 303391 built into Java-Gnome.
Comment 13 Adam Jocksch 2005-08-03 14:51:07 UTC
Sorry, I meant bug 312408 (disregard earlier bug number)  
:) 
Comment 14 Ismael Juma 2005-08-03 23:56:32 UTC
Thanks for reporting this bug. I was able to reproduce the bug using Adam's test
case. I have identified a few problems and I have fixed them in my local copy. I
will clean it up and commit these changes soon.
Comment 15 Ismael Juma 2005-08-08 16:12:14 UTC
After several changes that have now been commited to CVS HEAD, I can't reproduce
this anymore. Closing it. Please re-open if you can still see this issue.
Comment 16 Ismael Juma 2005-09-25 12:19:07 UTC
*** Bug 303391 has been marked as a duplicate of this bug. ***