You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2007/05/11 17:20:15 UTC
[jira] Updated: (HARMONY-3602) [classlib][awt][drlvm][netbeans]
ImageDecoder.terminate() interrupts current thread
[ https://issues.apache.org/jira/browse/HARMONY-3602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-3602:
-------------------------------------
Patch Info: [Patch Available]
> [classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts current thread
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-3602
> URL: https://issues.apache.org/jira/browse/HARMONY-3602
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib, DRLVM
> Reporter: Vasily Zakharov
> Attachments: HARMONY-3602-ImageDecoder.patch, test.gif
>
>
> The following piece of code causes the current thread to be interrupted:
> public class Test {
> public static void main(String args[]) throws Exception {
> java.awt.Image img = java.awt.Toolkit.getDefaultToolkit().createImage(Thread.currentThread().getContextClassLoader().getResource("test.gif"));
> new javax.swing.ImageIcon(img); // Loads the image.
> img.flush(); // ERROR: Calls Thread.currentThread().interrupt().
> System.out.println(Thread.currentThread().isInterrupted() ? "FAIL" : "SUCCESS");
> }
> }
> Please put the attached test.gif (it's a trivial image, nothing special, but it should exist) to current directory before running the test.
> The stack of calls causing the current thread to be interrupted is:
> org.apache.harmony.awt.gl.image.ImageDecoder.terminate() :128
> org.apache.harmony.awt.gl.image.DecodingImageSource.removeConsumer(ImageConsumer) :105
> org.apache.harmony.awt.gl.image.OffscreenImage.stopProduction() :426
> org.apache.harmony.awt.gl.image.OffscreenImage.flush() :133
> Probably ImageDecoder.terminate() should not use Thread.currentThread() do determine a thread to interrupt.
> Output on RI:
> SUCCESS
> Output on Harmony/IBM VM:
> SUCCESS
> Output on Harmony/DRL VM:
> FAIL
> This looks like a clear AWT problem, however the problem only occurs on DRL VM, so probably some issue (race condition, lack of synchronization or something like that) exists there also.
> The problem was discovered while trying to run NetBeans on Harmony.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
RE: [jira] Updated: (HARMONY-3602) [classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts current thread
Posted by "Pavlenko, Andrey A" <an...@intel.com>.
I think it's caused by the threading issue HARMONY-3641
-----Original Message-----
From: Mikhail Loenko [mailto:mloenko@gmail.com]
Sent: Saturday, May 12, 2007 12:24 AM
To: dev@harmony.apache.org
Subject: Re: [jira] Updated: (HARMONY-3602)
[classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts
current thread
why the test passed on J9 if it's a clear API issue?
Thanks,
Mikhail
2007/5/11, Vasily Zakharov (JIRA) <ji...@apache.org>:
>
> [
https://issues.apache.org/jira/browse/HARMONY-3602?page=com.atlassian.ji
ra.plugin.system.issuetabpanels:all-tabpanel ]
>
> Vasily Zakharov updated HARMONY-3602:
> -------------------------------------
>
> Patch Info: [Patch Available]
>
> > [classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts
current thread
> >
------------------------------------------------------------------------
-----------
> >
> > Key: HARMONY-3602
> > URL:
https://issues.apache.org/jira/browse/HARMONY-3602
> > Project: Harmony
> > Issue Type: Bug
> > Components: App-Oriented Bug Reports, Classlib, DRLVM
> > Reporter: Vasily Zakharov
> > Attachments: HARMONY-3602-ImageDecoder.patch, test.gif
> >
> >
> > The following piece of code causes the current thread to be
interrupted:
> > public class Test {
> > public static void main(String args[]) throws Exception {
> > java.awt.Image img =
java.awt.Toolkit.getDefaultToolkit().createImage(Thread.currentThread().
getContextClassLoader().getResource("test.gif"));
> > new javax.swing.ImageIcon(img); // Loads the image.
> > img.flush(); // ERROR: Calls
Thread.currentThread().interrupt().
> > System.out.println(Thread.currentThread().isInterrupted() ?
"FAIL" : "SUCCESS");
> > }
> > }
> > Please put the attached test.gif (it's a trivial image, nothing
special, but it should exist) to current directory before running the
test.
> > The stack of calls causing the current thread to be interrupted is:
> > org.apache.harmony.awt.gl.image.ImageDecoder.terminate() :128
> >
org.apache.harmony.awt.gl.image.DecodingImageSource.removeConsumer(Image
Consumer) :105
> >
org.apache.harmony.awt.gl.image.OffscreenImage.stopProduction() :426
> > org.apache.harmony.awt.gl.image.OffscreenImage.flush() :133
> > Probably ImageDecoder.terminate() should not use
Thread.currentThread() do determine a thread to interrupt.
> > Output on RI:
> > SUCCESS
> > Output on Harmony/IBM VM:
> > SUCCESS
> > Output on Harmony/DRL VM:
> > FAIL
> > This looks like a clear AWT problem, however the problem only occurs
on DRL VM, so probably some issue (race condition, lack of
synchronization or something like that) exists there also.
> > The problem was discovered while trying to run NetBeans on Harmony.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Re: [jira] Updated: (HARMONY-3602) [classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts current thread
Posted by Mikhail Loenko <ml...@gmail.com>.
why the test passed on J9 if it's a clear API issue?
Thanks,
Mikhail
2007/5/11, Vasily Zakharov (JIRA) <ji...@apache.org>:
>
> [ https://issues.apache.org/jira/browse/HARMONY-3602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Vasily Zakharov updated HARMONY-3602:
> -------------------------------------
>
> Patch Info: [Patch Available]
>
> > [classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts current thread
> > -----------------------------------------------------------------------------------
> >
> > Key: HARMONY-3602
> > URL: https://issues.apache.org/jira/browse/HARMONY-3602
> > Project: Harmony
> > Issue Type: Bug
> > Components: App-Oriented Bug Reports, Classlib, DRLVM
> > Reporter: Vasily Zakharov
> > Attachments: HARMONY-3602-ImageDecoder.patch, test.gif
> >
> >
> > The following piece of code causes the current thread to be interrupted:
> > public class Test {
> > public static void main(String args[]) throws Exception {
> > java.awt.Image img = java.awt.Toolkit.getDefaultToolkit().createImage(Thread.currentThread().getContextClassLoader().getResource("test.gif"));
> > new javax.swing.ImageIcon(img); // Loads the image.
> > img.flush(); // ERROR: Calls Thread.currentThread().interrupt().
> > System.out.println(Thread.currentThread().isInterrupted() ? "FAIL" : "SUCCESS");
> > }
> > }
> > Please put the attached test.gif (it's a trivial image, nothing special, but it should exist) to current directory before running the test.
> > The stack of calls causing the current thread to be interrupted is:
> > org.apache.harmony.awt.gl.image.ImageDecoder.terminate() :128
> > org.apache.harmony.awt.gl.image.DecodingImageSource.removeConsumer(ImageConsumer) :105
> > org.apache.harmony.awt.gl.image.OffscreenImage.stopProduction() :426
> > org.apache.harmony.awt.gl.image.OffscreenImage.flush() :133
> > Probably ImageDecoder.terminate() should not use Thread.currentThread() do determine a thread to interrupt.
> > Output on RI:
> > SUCCESS
> > Output on Harmony/IBM VM:
> > SUCCESS
> > Output on Harmony/DRL VM:
> > FAIL
> > This looks like a clear AWT problem, however the problem only occurs on DRL VM, so probably some issue (race condition, lack of synchronization or something like that) exists there also.
> > The problem was discovered while trying to run NetBeans on Harmony.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>