Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 14110 invoked from network); 11 May 2007 20:24:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 May 2007 20:24:51 -0000 Received: (qmail 61185 invoked by uid 500); 11 May 2007 20:24:52 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 60636 invoked by uid 500); 11 May 2007 20:24:51 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 60627 invoked by uid 99); 11 May 2007 20:24:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2007 13:24:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mloenko@gmail.com designates 209.85.132.251 as permitted sender) Received: from [209.85.132.251] (HELO an-out-0708.google.com) (209.85.132.251) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2007 13:24:44 -0700 Received: by an-out-0708.google.com with SMTP id b33so356383ana for ; Fri, 11 May 2007 13:24:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ITWZS6cPFbMg06Wb7jxFlQQ/WdwEHX6+DkuWX64CLpm74ilp1EOrYr8Ai8Sh4dLzFgIDGhwjGHkjxPDbFRtXjyaM4J5cCh99wWVYDD0jZw6+Fz/pXzkCJ1YI7wAcgD80MYoVIrqw4IbpYElhGBxE13VcL/dw7fQnTK1kq/PoWmI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FTal1uFPC8tpyypmoiukXuXzmmO+RGJS8laBagaiHOiWvqoEdvsKNCfhTD5zOI/UnArA89aVOJcOa9IDRroMLySkhDfEqqYQhNxBqYDDasDyn/TgOT/DD1aTTI58kPIT132p2zW2VQ4YonyUQwfDTcch0tSLI1/m4TKpV/AytXI= Received: by 10.100.12.18 with SMTP id 18mr2515993anl.1178915063561; Fri, 11 May 2007 13:24:23 -0700 (PDT) Received: by 10.100.33.18 with HTTP; Fri, 11 May 2007 13:24:23 -0700 (PDT) Message-ID: <906dd82e0705111324x20454debqbc8aaf917c35587e@mail.gmail.com> Date: Fri, 11 May 2007 13:24:23 -0700 From: "Mikhail Loenko" To: dev@harmony.apache.org Subject: Re: [jira] Updated: (HARMONY-3602) [classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts current thread In-Reply-To: <31125935.1178896815760.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9320152.1176145172583.JavaMail.jira@brutus> <31125935.1178896815760.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org why the test passed on J9 if it's a clear API issue? Thanks, Mikhail 2007/5/11, Vasily Zakharov (JIRA) : > > [ 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. > >