Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 62873 invoked from network); 23 Oct 2007 12:03:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Oct 2007 12:03:43 -0000 Received: (qmail 6815 invoked by uid 500); 23 Oct 2007 12:03:30 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 6801 invoked by uid 500); 23 Oct 2007 12:03:30 -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 6792 invoked by uid 99); 23 Oct 2007 12:03:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2007 05:03:30 -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; Tue, 23 Oct 2007 12:03:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 25FF0714201 for ; Tue, 23 Oct 2007 05:02:52 -0700 (PDT) Message-ID: <28125011.1193140972141.JavaMail.jira@brutus> Date: Tue, 23 Oct 2007 05:02:52 -0700 (PDT) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-4791) [classlib][awt][image] Harmony has problem in drawing medium-or-large size of png file if not guarded by MediaTracker In-Reply-To: <11646496.1189735112053.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-4791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexei Zakharov resolved HARMONY-4791. -------------------------------------- Resolution: Fixed Thanks Igor, there is no hangs with the new patch. I've applied it at the revision 587465. Please verify that everything is fine. > [classlib][awt][image] Harmony has problem in drawing medium-or-large size of png file if not guarded by MediaTracker > --------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-4791 > URL: https://issues.apache.org/jira/browse/HARMONY-4791 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Win32 > Reporter: Chunrong Lai > Assignee: Alexei Zakharov > Attachments: 10million.PNG, 40million.PNG, H-4791-2.patch, H-4791-3.patch, H-4791.patch > > > Sometimes I even observed that Harmony crashes in multi-threading environment but I have not reproducer yet. > Anyway with below reproducer Harmony draw a glittering 10million.png and the 40million.png breaks finally. > import java.io.*; > import java.awt.*; > import java.awt.image.*; > import javax.swing.*; > public class DrawImageTest extends JFrame { > public Image image; > public static void main(String[] args){ > DrawImageTest aTest = new DrawImageTest(); > if(args.length <1) { > System.out.println("Please input a valid image name"); > System.exit(0); > } > aTest.setSize(800, 600); > aTest.readImage(args[0]); > aTest.show(); > } > public DrawImageTest(){} > public void readImage(String imageName){ > if(image == null) { > image = Toolkit.getDefaultToolkit().getImage(imageName); > /******* > MediaTracker imageTracker = new MediaTracker(new JPanel()); > imageTracker.addImage(image, 0); > try{ > imageTracker.waitForID(0); > }catch(InterruptedException e){} > ********/ > if(image == null) System.out.println("we get an image of null"); > else System.out.println("we get an image of width " + image.getWidth(this) + " height " + image.getHeight(this)); > } > } > public void paint(Graphics g){ > super.paint(g); > g.drawImage(image, 0, 0, null); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.