Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 64314 invoked from network); 23 May 2007 13:34:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 May 2007 13:34:39 -0000 Received: (qmail 33597 invoked by uid 500); 23 May 2007 13:34:44 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 33546 invoked by uid 500); 23 May 2007 13:34:44 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 33533 invoked by uid 99); 23 May 2007 13:34:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 06:34:44 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 06:34:37 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B4F8F71406D for ; Wed, 23 May 2007 06:34:17 -0700 (PDT) Message-ID: <5305282.1179927257738.JavaMail.jira@brutus> Date: Wed, 23 May 2007 06:34:17 -0700 (PDT) From: "Andrey Pavlenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-3602) [classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts current thread In-Reply-To: <9320152.1176145172583.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498233 ] Andrey Pavlenko commented on HARMONY-3602: ------------------------------------------ Great! So, now I think this issue is completely fixed and should be closed. > [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 > Assigned To: Alexei 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.