Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 37339 invoked from network); 24 Sep 2007 13:07:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Sep 2007 13:07:14 -0000 Received: (qmail 15430 invoked by uid 500); 24 Sep 2007 13:07:05 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 15414 invoked by uid 500); 24 Sep 2007 13:07:04 -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 15405 invoked by uid 99); 24 Sep 2007 13:07:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2007 06:07:04 -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; Mon, 24 Sep 2007 13:09:24 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0127D714212 for ; Mon, 24 Sep 2007 06:06:51 -0700 (PDT) Message-ID: <26780683.1190639211001.JavaMail.jira@brutus> Date: Mon, 24 Sep 2007 06:06:51 -0700 (PDT) From: "Xiao-Feng Li (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (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: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4791?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529853 ]=20 Xiao-Feng Li commented on HARMONY-4791: --------------------------------------- =EF=BC=A3=EF=BD=88=EF=BD=95=EF=BD=8E=EF=BD=92=EF=BD=8F=EF=BD=8E=EF=BD=87=EF= =BC=8C=E3=80=80I=E3=80=80=EF=BD=8A=EF=BD=95=EF=BD=93=EF=BD=94=E3=80=80=EF= =BD=92=EF=BD=85=EF=BD=81=EF=BD=8C=EF=BD=89=EF=BD=9A=EF=BD=85=EF=BD=84=E3=80= =80=EF=BD=94=EF=BD=88=EF=BD=85=E3=80=80=EF=BD=89=EF=BD=8D=EF=BD=81=EF=BD=87= =EF=BD=85=E3=80=80=EF=BD=89=EF=BD=93=E3=80=80=EF=BC=91=EF=BC=90=EF=BC=AD=EF= =BD=89=EF=BD=8C=EF=BD=8C=EF=BD=89=EF=BD=8F=EF=BD=8E=E3=80=80=EF=BC=B2=EF=BC= =AD=EF=BC=A2=E3=80=80=EF=BD=8D=EF=BD=8F=EF=BD=8E=EF=BD=85=EF=BD=99=EF=BC=81= =E3=80=80=EF=BC=B0=EF=BD=92=EF=BD=8F=EF=BD=82=EF=BD=81=EF=BD=82=EF=BD=8C=EF= =BD=99=E3=80=80=EF=BD=94=EF=BD=88=EF=BD=85=EF=BD=99=E3=80=80=EF=BD=81=EF=BD= =92=EF=BD=85=E3=80=80=EF=BD=94=EF=BD=8F=EF=BD=8F=E3=80=80=EF=BD=88=EF=BD=85= =EF=BD=81=EF=BD=96=EF=BD=99=E3=80=80=EF=BD=94=EF=BD=8F=E3=80=80=EF=BD=82=EF= =BD=85=E3=80=80=EF=BD=8C=EF=BD=8F=EF=BD=81=EF=BD=84=EF=BD=85=EF=BD=84=E3=80= =80=EF=BD=93=EF=BD=99=EF=BD=8E=EF=BD=83=EF=BD=88=EF=BD=92=EF=BD=8F=EF=BD=8E= =EF=BD=8F=EF=BD=95=EF=BD=93=EF=BD=8C=EF=BD=99=EF=BC=9F=E3=80=80 =EF=BC=A1=EF=BD=8E=EF=BD=99=EF=BD=97=EF=BD=81=EF=BD=99=EF=BC=8C=E3=80=80=EF= =BC=A9=E3=80=80=EF=BD=94=EF=BD=88=EF=BD=89=EF=BD=8E=EF=BD=8B=E3=80=80=EF=BD= =94=EF=BD=88=EF=BD=89=EF=BD=93=E3=80=80=EF=BD=82=EF=BD=95=EF=BD=87=E3=80=80= =EF=BD=89=EF=BD=93=E3=80=80=EF=BD=86=EF=BD=89=EF=BD=98=EF=BD=85=EF=BD=84=EF= =BC=8E=E3=80=80 > [classlib][awt][image] Harmony has problem in drawing medium-or-large siz= e 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 > > > Sometimes I even observed that Harmony crashes in multi-threading enviro= nment 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 =3D 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 =3D=3D null) { > image =3D Toolkit.getDefaultToolkit().getImage(imageName); > /******* > MediaTracker imageTracker =3D new MediaTracker(new JPanel()); > imageTracker.addImage(image, 0); > try{ > imageTracker.waitForID(0); > }catch(InterruptedException e){} > ********/ > if(image =3D=3D null) System.out.println("we get an image of nul= l"); > else System.out.println("we get an image of width "= + image.getWidth(this) + " height " + image.getHeight(this)); > } > } =20 > public void paint(Graphics g){ > super.paint(g); > g.drawImage(image, 0, 0, null); > } > } --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.