Watch, Follow, &
Connect with Us
Public Report
Report From: JBuilder/Designers/UI Designer    [ Add a report in this area ]  
Report #:  9942   Status: Closed
Opening UI Designer causes VM crash
Project:  JBuilder Build #:  11.0.280.0 Up 1
Version:    12 Submitted By:   Ben ABC
Report Type:  Crash / Data loss / Total failure Date Reported:  12/19/2004 11:48:07 AM
Severity:    Critical / Show Stopper Last Updated: 3/20/2012 2:24:39 AM
Platform:    Internal Tracking #:   227713
Resolution: Retest (Resolution Comments) Resolved in Build: : 012.000.173.000
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
5.00 out of 5
Total Votes: 6
Description
If a UI element that the UI designer tries to load uses asserts or calls certain java.lang.Class methods during loading then the VM aborts.
The Class method I was using was getDeclaredClasses.
I have not been able to reproduce this in a simple set of classes.

Linux Fedora Core 2 running KDE 3.3.1.
Steps to Reproduce:
Create a new project (untitled1).
Change project to compile to 1.5 (don't think this is required).
Create a new Application (untitled1.Application1,untitled1.Frame1)
Create a new JPanel subclass in a subpackage of the main package. (untitled1.a.Untitled1.java)
Using the designer Add a new JButton to the subclass.
Double-click the button to return to the code and the action_performed method.
Add this line of code: assert e==e;
Save and close all windows.
Run Project->Make.
Open Frame1.java.
Switch to the the Designer tab.
Select the Bean Chooser button and click Select on the popup menu.
Choose the JPanel subclass. (untitled1.a.Untitled1.java)
Click on the pane to add it to the JFrame. The VM should abort.

If you remove the assert line and recompile, then it does not abort.

It will also crash if you add the panel before you add the assertion, save and go back to the source, add the assertion, and then reload the designer.

The attachment has a project created from these steps and the error log.
Workarounds
None
Attachment
untitled1.zip
Comments

Markus Schlegel at 7/26/2005 4:48:44 AM -
This Bug is a show stopper here, since we use assert's all around our code (2000 classes).
The UI-Designer crashes immediately when trying to load a class which contains an assert statement.

Following the hs_err_pid_xxx.log file:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x7363696E
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:

at java.lang.Class.getClassLoader0(Native Method)

at java.lang.Class.getClassLoader(Class.java:508)

at java.lang.Class.desiredAssertionStatus(Class.java:2055)

at com.deron.ui.app.AbstractMOEditorPanel.<clinit>(AbstractMOEditorPanel.java:28)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at com.borland.jbuilder.java.interpreter.ClassInstanceContext.getProxyObject(Unknown Source)

at com.borland.jbuilder.java.interpreter.InstanceContext.getProxyObject(Unknown Source)

at com.borland.jbuilder.java.interpreter.InstanceContext.invokeNonVirtual(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter$ContextInvokeable.invoke(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.visitApply(Unknown Source)

at com.borland.jbuilder.cmt2.DesignerJavaInterpreter.visitApply(Unknown Source)

at com.sun.tools.javac.tree.Tree$Apply.accept(Tree.java:853)

at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.evaluateExpression(Unknown Source)

at com.borland.jbuilder.java.interpreter.ResultStoringJavaInterpreter.evaluateExpression(Unknown Source)

at com.borland.jbuilder.cmt2.DesignerJavaInterpreter.evaluateExpression(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.visitExec(Unknown Source)

at com.sun.tools.javac.tree.Tree$Exec.accept(Tree.java:768)

at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.executeStatement(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.executeStatements(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.visitBlock(Unknown Source)

at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:571)

at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.executeStatement(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.visitMethodDef(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter$InterpreterInvokeable.invoke(Unknown Source)

at com.borland.jbuilder.cmt2.CmtClassInstanceContext.newInstance(Unknown Source)

at com.borland.jbuilder.java.interpreter.JavaInterpreter.invokeConstructor(Unknown Source)

at com.borland.jbuilder.cmt2.jb.JbComponent.a(Unknown Source)

at com.borland.jbuilder.cmt2.jb.JbComponent.getInterpreter(Unknown Source)

at com.borland.jbuilder.cmt2.jb.JbComponent.getInterpreter(Unknown Source)

at com.borland.jbuilder.cmt2.jb.JbComponent.a(Unknown Source)

at com.borland.jbuilder.cmt2.jb.JbComponent.getSubcomponents(Unknown Source)

at com.borland.jbuilder.cmt2.designer.DesignerManager.a(Unknown Source)

at com.borland.jbuilder.cmt2.designer.DesignerViewer.l(Unknown Source)

- locked <0x159821f0> (a com.borland.jbuilder.cmt2.designer.DesignerViewer)

at com.borland.jbuilder.cmt2.designer.DesignerViewer.o(Unknown Source)

at com.borland.jbuilder.cmt2.designer.DesignerViewer.viewerActivated(Unknown Source)

at com.borland.jbuilder.cmt2.designer.DesignerViewer$0.run(Unknown Source)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Markus Schlegel at 7/26/2005 4:58:36 AM -
Oh, sorry, I am using Windows XP.

Markus Schlegel at 7/26/2005 4:57:18 AM -
After commenting out all assertions temporarily, JBuilder does not crash anymore, but hangs (not responding) without using CPU
:-((

Markus Schlegel at 8/30/2005 4:28:05 AM -
I was able to get a workaround for this problem:
Simply set the Target VM to 1.4 (LanguageFeatures can still be 5.0) to work inside JBuilder (of corse you have to recompile all then).

Server Response from: ETNACODE01