You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Chunrong Lai (JIRA)" <ji...@apache.org> on 2007/09/14 09:58:32 UTC
[jira] Commented: (HARMONY-4791) [classlib][awt][image] Harmony has
problem in drawing medium-or-large size of png file if not guarded by
MediaTracker
[ https://issues.apache.org/jira/browse/HARMONY-4791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527395 ]
Chunrong Lai commented on HARMONY-4791:
---------------------------------------
I'd like to also show the call-stack when meeting the crash here.
1: Harmonyvm.dll!GetPrimitiveArrayCritical()
2: gl.dll!gl_info_callback()
3: gl.dll!_png_push_read_chunk()
4: gl.dll!_png_process_data()
5: gl.dll!processData()
6: gl.dll!Java_org_apache_harmony_awt_gl_image_PngDecoder_decode().
It is seen that gl_info_callback() just gets a NULL java array (decoderInfo->jImageData) for image data while decoderInfo->colorType == PNG_COLOR_TYPE_RGB_ALPHA.
> [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
>
>
> 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.