Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 8325 invoked from network); 18 Apr 2007 14:35:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2007 14:35:40 -0000 Received: (qmail 24435 invoked by uid 500); 18 Apr 2007 14:35:43 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 24415 invoked by uid 500); 18 Apr 2007 14:35:43 -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 24400 invoked by uid 99); 18 Apr 2007 14:35:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2007 07:35:43 -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, 18 Apr 2007 07:35:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4D11771408C for ; Wed, 18 Apr 2007 07:35:16 -0700 (PDT) Message-ID: <21436436.1176906916312.JavaMail.jira@brutus> Date: Wed, 18 Apr 2007 07:35:16 -0700 (PDT) From: "Vasily Zakharov (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_12489758 ] Vasily Zakharov commented on HARMONY-3602: ------------------------------------------ By the way, the test ButtonRTest.testHarmony2305() for HARMONY-2305 fails on my WinXP after this patch is applied. > [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.