[Java-gnome-developer] UIManager crash with sun java 1.5, and patch
Brought to you by:
afcowie
From: Khiraly <khi...@gm...> - 2006-05-13 08:46:38
|
Hi! The UIManagerExample.java crash the sun 1.5 jvm when I click on a toggle item on the menubar (so it cant handle the RadioActionEntry[]) So it crash when I click on: Preferences->color->Red Preferences->color->Green Preferences->color->Blue Preferences->Shape->Square Preferences->Shape->Rectangle Preferences->Shape->Oval The error report files is attached. (3 crashes) It is reproducable. There is a (related) crash(hs_err_pid6153), when I click Ctrl-B to toggle the Preferences->Bold button. Is it a java-gnome bug, or should I report to sun's bugzilla? ---- Other: There is a missing toolbar in the UIManagerExample.java. So there are toolbar entry in the uiInfo string, but there is not added to the window. However there are a 'Sepq' (line 116) item, which is not in the entries array. So there is an error message when I launch the program: java.lang.Exception: Sepq: missing action at org.gnu.glib.GObject.printStackTrace(GObject.java:692) at org.gnu.gtk.UIManager.gtk_ui_manager_get_widget(Native Method) at org.gnu.gtk.UIManager.getWidget(UIManager.java:77) at uimanager.UIManagerExample.<init>(UIManagerExample.java:157) at uimanager.UIManagerExample.main(UIManagerExample.java:217) I have created a patch which is: 1. add a Sepq item to the toolbar (why is this btw?) 2. pack the toolbar to the Vbox The patch(also attached too): --- uimanager/UIManagerExample.java 2006-03-21 01:45:51.000000000 +0100 +++ uimanager-modified/UIManagerExample.java 2006-05-13 00:04:41.000000000 +0200 @@ -56,6 +56,7 @@ new ActionEntry("ColorMenu", null, "_Color"), new ActionEntry("ShapeMenu", null, "_Shape"), new ActionEntry("HelpMenu", null, "_Help"), + new ActionEntry("Sepq", null, "_Sepq", null, null, this), new ActionEntry("New", GtkStockItem.NEW.getString(), "_New", "<control>N", "Create a new file", this), new ActionEntry("Open", GtkStockItem.OPEN.getString(), "_Open", @@ -155,7 +156,8 @@ // add the menu bar from the ui by specifying the path box1.packStart(ui.getWidget("/MenuBar"), false, false, 0); - + box1.packStart(ui.getWidget("/ToolBar"), false, false, 0); + Label label = new Label("UIManager\nExample\nApplication"); label.setMinimumSize(200, 200); label.setAlignment(0.5, 0.5); |