Skip to main content

CVM hangs on running basis.demos.ImageDemo

3 replies [Last post]
sschang123
Offline
Joined: 2007-07-05
Points: 0

Hi, all:
I got a strange error while running CVM on Redhat Linux/x86. It seems thread deadlock. Here is the thread dump. Could someone provide me suggestions? Thanks very much.

Start thread dump:
======================================
Thread 1: ee 0x8cdd660 JNI Frame java.lang.Object.wait(J)V(Native Method)
Java Frame java.lang.Object.wait()V(Object.java:446)
Java Frame sun.awt.PostEventQueue.run()V(SunToolkit.java:308)
Java Frame java.lang.Thread.startup(Z)V(Thread.java:767)
Transition Frame java.lang.Thread.startup(Z)V(Transition Method)
Free List Frame (JNI Local Frame)
======================================
Thread 2: ee 0x8ccf608 JNI Frame java.lang.Object.wait(J)V(Native Method)
Java Frame java.lang.Object.wait()V(Object.java:446)
Java Frame java.awt.EventQueueProxy.getNextEvent()Ljava/awt/AWTEvent;(EventDispatchThread.java:260)
Java Frame java.awt.EventDispatchThread.pumpOneEvent(I)Z(EventDispatchThread.java:110)
Java Frame java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V(EventDispatchThread.java:102)
Java Frame java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V(EventDispatchThread.java:97)
Java Frame java.awt.EventDispatchThread.run()V(EventDispatchThread.java:88)
Java Frame java.lang.Thread.startup(Z)V(Thread.java:767)
Transition Frame java.lang.Thread.startup(Z)V(Transition Method)
Free List Frame (JNI Local Frame)
======================================
Thread 3: ee 0x8ca1010 JNI Frame java.lang.Object.wait(J)V(Native Method)
Java Frame java.lang.ref.ReferenceQueue.remove(J)Ljava/lang/ref/Reference;(ReferenceQueue.java:126)
Java Frame java.lang.ref.ReferenceQueue.remove()Ljava/lang/ref/Reference;(ReferenceQueue.java:142)
Java Frame java.lang.ref.Finalizer$FinalizerThread.run()V(Finalizer.java:212)
Java Frame java.lang.Thread.startup(Z)V(Thread.java:767)
Transition Frame java.lang.Thread.startup(Z)V(Transition Method)
Free List Frame (JNI Local Frame)
======================================
Thread 4: ee 0x8c9f548 JNI Frame java.lang.Object.wait(J)V(Native Method)
Java Frame java.lang.Object.wait()V(Object.java:446)
Java Frame java.lang.ref.Reference$ReferenceHandler.run()V(Reference.java:142)
Java Frame java.lang.Thread.startup(Z)V(Thread.java:767)
Transition Frame java.lang.Thread.startup(Z)V(Transition Method)
Free List Frame (JNI Local Frame)
======================================
Thread 5: ee 0x839484 JNI Frame java.lang.Object.wait(J)V(Native Method)
Java Frame java.lang.Object.wait()V(Object.java:446)
Java Frame java.awt.MWGraphicsEnvironment.()V(MWGraphicsEnvironment.java:60)
Java Frame java.awt.MWToolkit.()V(MWToolkit.java:25)
Transition Frame java.awt.MWToolkit.()V(Transition Method)
Java Frame java.lang.reflect.Constructor.newInstance([Ljava/lang/Object;)Ljava/lang/Object;(Constructor.java:280)
Java Frame java.lang.Class.newInstance()Ljava/lang/Object;(Class.java:281)
Java Frame java.awt.Toolkit$1.run()Ljava/lang/Object;(Toolkit.java:183)
Java Frame java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;(AccessController.java:294)
Java Frame java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AccessController.java:268)
Java Frame java.awt.Toolkit.getDefaultToolkit()Ljava/awt/Toolkit;(Toolkit.java:177)
Java Frame java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment()Ljava/awt/GraphicsEnvironment;(GraphicsEnvironment.java:61)
Java Frame java.awt.Window.(Ljava/awt/GraphicsConfiguration;)V(Window.java:207)
Java Frame java.awt.Frame.(Ljava/lang/String;Ljava/awt/GraphicsConfiguration;)V(Frame.java:289)
Java Frame java.awt.Frame.()V(Frame.java:241)
Java Frame basis.DemoFrame.(Ljava/util/ArrayList;Ljava/awt/Dimension;)V(DemoFrame.java:107)
Java Frame basis.DemoFrame.main([Ljava/lang/String;)V(DemoFrame.java:50)
Transition Frame basis.DemoFrame.main([Ljava/lang/String;)V(Transition Method)
Java Frame java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Method.java:316)
Java Frame sun.misc.CVM.runMain()V(CVM.java:478)
Transition Frame sun.misc.CVM.runMain()V(Transition Method)
Free List Frame (JNI Local Frame)
======================================
End thread dump

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi, all:
> I got a strange error while running CVM on Redhat Linux/x86. It seems thread deadlock. Here is the thread dump. Could someone provide me suggestions? Thanks very much

What does your application code look like? Which Microwindows library
did you install on your Red Hat Linux/x86 system?

I can see you are trying to run the Microwindows port of CDC/PP, but
Microwindows is not installed by default on a Red Hat Linux/x86 system.
Why are you trying to run a Microwindows port of CDC/PP on your Red Hat
Linux/x86 system, when instead Qt/X11 should be installed by default and
you could use the CDC/PP Qt build instead?

Thread 5: ee 0x839484 JNI Frame java.lang.Object.wait(J)V(Native Method)
Java Frame java.lang.Object.wait()V(Object.java:446)
Java Frame java.awt.MWGraphicsEnvironment.()V(MWGraphicsEnvironment.java:60)
^^^ Microwindows
Java Frame java.awt.MWToolkit.()V(MWToolkit.java:25)
Transition Frame java.awt.MWToolkit.()V(Transition Method)

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

ssc123
Offline
Joined: 2006-12-08
Points: 0

Hi,
Thanks for reply. Following is the application codes that is provided by Sun.
It locates at src/basis/demo.
public ImageDemo() {
gif = loadImage(this, "images/duke.gif");
jpg = loadImage(this, "images/duke.jpg");
png = loadImage(this, "images/duke.png");
logo = loadImage(this, "images/logo.gif");
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gd.getDefaultConfiguration();
int w = gif.getWidth(this);
int h = gif.getHeight(this);
bi = gc.createCompatibleImage(w, h);
while (bi == null) {
try {
Thread.sleep(100);
} catch (InterruptedException ie) {}
}
Graphics big = bi.getGraphics();
big.setColor(Builder.SUN_RED);
big.fillRect(0, 0, w, h);
big.drawImage(gif, 0, 0, w, h, 0, 0, w, h, this);
addMouseMotionListener(this);
addMouseListener(this);
}

I found CVM will hang at the third loadImage() in the code.
The microwindows library I used is Sun provided at http://www.experimentalstuff.com/Technologies/mwpbp/download.html.
The microwindows library is placed in lib directory of CVM.
Any idea about this situation? Thanks very much.

Hinkmond Wong

Hi,

phonemeadvanced@mobileandembedded.org wrote:
> Hi,
> Thanks for reply. Following is the application codes that is provided by Sun.
> It locates at src/basis/demo.
> ...
> I found CVM will hang at the third loadImage() in the code.
> The microwindows library I used is Sun provided at http://www.experimentalstuff.com/Technologies/mwpbp/download.html.
> The microwindows library is placed in lib directory of CVM.
> Any idea about this situation? Thanks very much

Please try rebuilding with "CVM_DEBUG=true" as an additional build flag
to produced a debug binary. This should at least give you a good stack
trace when the CVM hangs and you kill it. When it hangs, try in another
window, doing a "kill -11
" of the CVM process that is hanging to
force it to dump a stack trace.

Does it provide anything useful?

Also, if you comment out this line in ImageDemo.java:
png = loadImage(this, "images/duke.png");
does it proceed further?

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net