I hate to ask this kind of question, but I am pretty much stumped.
Our Swing-based app (with a JNI lib) has developed a nasty feature -
it hangs up while launching about 1/4 of the time. I can launch it 3
times with no problem, and then on the fourth time it will only
partially load, and become completely unresponsive. I then have to
use Force Quit Application to kill it.
I have tried to debug this, with no luck. My reading has made me
suspect that some sort of thread problem might be causing this, or
perhaps some sort of problem attempting to enable some UI elements
during resource loading.
If I pause the Xcode debugger when the app gets into this hung state,
I see that in the main() thread there is a stack of Component.enable
()'s:
#0 0x0000000e in java.awt.Component.enable() at Component.java:1127
#1 0x00000009 in javax.swing.JComponent.enable() at JComponent.java:3371
#2 0x00000005 in java.awt.Component.enable() at Component.java:1151
#3 0x00000002 in java.awt.Component.setEnabled() at Component.java:1116
#4 0x00000007 in javax.swing.JComponent.setEnabled() at
JComponent.java:2572
#5 0x0000001c in javax.swing.AbstractButton.setEnabled() at
AbstractButton.java:1951
#6 0x0000004c in jmadonna.JMadonna$MadToolBar.refreshButtons() at
JMadonna.java:912
#7 0x00000031 in jmadonna.JMadonna.updateTitle() at JMadonna.java:425
#8 0x0000006f in jmadonna.Document.updateTitle() at Document.java:1612
#9 0x0000000e in jmadonna.Document.setDirty() at Document.java:231
#10 0x0000001d in jmadonna.EquationPanel
$MyDocumentListener.insertUpdate() at EquationPanel.java:292
#11 0x00000028 in javax.swing.text.AbstractDocument.fireInsertUpdate
() at AbstractDocument.java:184
#12 0x000000a2 in javax.swing.text.AbstractDocument.handleInsertString
() at AbstractDocument.java:754
#13 0x0000002e in javax.swing.text.AbstractDocument.insertString() at
AbstractDocument.java:711
#14 0x00000155 in javax.swing.text.DefaultEditorKit.read() at
DefaultEditorKit.java:254
#15 0x00000034 in javax.swing.JEditorPane.setText() at
JEditorPane.java:1314
#16 0x00000005 in jmadonna.EquationPanel.setEquations() at
EquationPanel.java:379
#17 0x000000a1 in jmadonna.Document.addUntitledDocument() at
Document.java:1177
#18 0x00000062 in jmadonna.JMadonna.run() at JMadonna.java:281
#19 0x00000034 in jmadonna.JMadonna.main() at JMadonna.java:264
#20 0xffffffff in sun.reflect.NativeMethodAccessorImpl.invoke0() at
NativeMethodAccessorImpl.java:4294967295 <<< PROBLEM????
#21 0x00000057 in sun.reflect.NativeMethodAccessorImpl.invoke() at
NativeMethodAccessorImpl.java:39
#22 0x00000006 in sun.reflect.DelegatingMethodAccessorImpl.invoke()
at DelegatingMethodAccessorImpl.java:25
#23 0x0000006f in java.lang.reflect.Method.invoke() at Method.java:585
#24 0x0000004c in apple.launcher.LaunchRunner.run() at
LaunchRunner.java:88
#25 0x00000001 in apple.launcher.LaunchRunner.callMain() at
LaunchRunner.java:50
#26 0x0000000a in apple.launcher.JavaApplicationLauncher.launch() at
JavaApplicationLauncher.java:52
Now, as I am copying this into this message, I see that #20 there is
a very suspect address. However, this observation is not of much use
to me, as I don't know how to interpret it.
As I mentioned, this app uses a JNI library which we are loading
early on. I think I read somewhere that JNI and AWT-toolkit loading
can get wrapped around the axle if not done correctly, but I don't
know what the guidelines for this process are.
Does anyone have any insights to share? I am not getting anything in
the debug console (no exceptions get thrown), and there does not seem
to be any logical debugging approach.
Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden