Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 39264 invoked from network); 15 Mar 2007 18:12:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Mar 2007 18:12:30 -0000 Received: (qmail 41805 invoked by uid 500); 15 Mar 2007 18:12:39 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 41706 invoked by uid 500); 15 Mar 2007 18:12:38 -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 41697 invoked by uid 99); 15 Mar 2007 18:12:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2007 11:12:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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; Thu, 15 Mar 2007 11:12:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B91BF714082 for ; Thu, 15 Mar 2007 11:12:09 -0700 (PDT) Message-ID: <21305365.1173982329755.JavaMail.jira@brutus> Date: Thu, 15 Mar 2007 11:12:09 -0700 (PDT) From: "Andrey Pavlenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-3135) [classlib][awt] unexpected InterruptedException after loading png-image In-Reply-To: <22177137.1170924066139.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-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481266 ] Andrey Pavlenko commented on HARMONY-3135: ------------------------------------------ This issue is caused by inappropriate usage of the image decoder, implemented in the AWT module. In the decoder's implementation it's expected that all images are loaded in a separate thread. ImageIO.read() loads images in the same thread that causes changing of the interrupted status of the current thread. Thus, this is not awt but imageio issue. Could somebody change the component of this issue to imageio? I'll attach a patch against the imageio module. > [classlib][awt] unexpected InterruptedException after loading png-image > ----------------------------------------------------------------------- > > Key: HARMONY-3135 > URL: https://issues.apache.org/jira/browse/HARMONY-3135 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: win32, lnx32, > Reporter: Evgeniya Maenkova > Priority: Critical > Attachments: golden_0400.png, Sync.java > > > The test is: (to be attached) > import java.io.IOException; > import java.net.URL; > > import javax.imageio.ImageIO; > > public class Sync { > > public static void main(String[] args) { > URL imageURL = Sync.class.getResource("golden_0400.png"); > System.out.println(imageURL); > try { > ImageIO.read(imageURL.openStream()); > } catch (IOException e) { > } > > Thread b = new Thread(); > b.start(); > try { > b.join(); > } catch (Exception e) { > System.out.println((e instanceof InterruptedException)); > e.printStackTrace(); > } > > int res = 1; > for (int i = 1; i < 10000; i ++) { > res = (res * i) % 107 + 1; > } > System.out.println("End " + res); > > } > } > > DRL vm output: > C:\ecl_311_ws\Test>C:\Harmony\trunk\working_vm\build\deploy\jdk\jre\bin\java -Xem:server Sync > file:/C:/ecl_311_ws/Test/./golden_0400.png > true > java.lang.InterruptedException > at java.lang.Object.wait(Object.java:100) > at java.lang.Thread.join(Thread.java:591) > at Sync.main(Sync.java:19) > End 26 > > RI output: > file:/C:/ecl_311_ws/Test/golden_0400.png > End 26 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.