Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 107925 - About dialog fails if image incorrect
Summary: About dialog fails if image incorrect
Status: RESOLVED DUPLICATE of bug 157689
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-24 15:41 EDT by Arif Kasim CLA
Modified: 2006-09-21 15:22 EDT (History)
2 users (show)

See Also:


Attachments
bad about image (235.52 KB, image/bmp)
2005-08-24 16:01 EDT, Arif Kasim CLA
no flags Details
good about image (235.52 KB, image/bmp)
2005-08-24 16:01 EDT, Arif Kasim CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arif Kasim CLA 2005-08-24 15:41:13 EDT
If the image specified for the about dialog is invalid, the about dialog fails 
to display.

Exception in the log:
!ENTRY org.eclipse.ui 4 0 Aug 18, 2005 11:13:12.816
!MESSAGE java.lang.NegativeArraySizeException
!STACK 0
java.lang.NegativeArraySizeException
        at org.eclipse.swt.internal.image.WinBMPFileFormat.loadData
(WinBMPFileFormat.java:345)
        at org.eclipse.swt.internal.image.WinBMPFileFormat.loadData
(WinBMPFileFormat.java:338)
        at org.eclipse.swt.internal.image.WinBMPFileFormat.loadFromByteStream
(WinBMPFileFormat.java:399)
        at org.eclipse.swt.internal.image.FileFormat.loadFromStream
(FileFormat.java:47)
        at org.eclipse.swt.internal.image.FileFormat.load(FileFormat.java:75)
        at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:124)
        at org.eclipse.swt.graphics.ImageData.<init>(ImageData.java:308)
        at org.eclipse.jface.resource.URLImageDescriptor.getImageData
(URLImageDescriptor.java:53)
        at org.eclipse.jface.resource.ImageDescriptor.createImage
(ImageDescriptor.java:152)
        at org.eclipse.jface.resource.ImageDescriptor.createImage
(ImageDescriptor.java:115)
        at org.eclipse.jface.resource.ImageDescriptor.createImage
(ImageDescriptor.java:97)
        at org.eclipse.ui.internal.dialogs.AboutDialog.createDialogArea
(AboutDialog.java:190)
        at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:632)
        at org.eclipse.jface.window.Window.create(Window.java:348)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:925)
        at org.eclipse.jface.window.Window.open(Window.java:637)


BMP was created with Acrylic beta from microsoft -- the bmp is supposed to be 
24bit bmp.   However, Windows XP Paint tool also refuses to display the image)

I will attach a sample file later.
Comment 1 Arif Kasim CLA 2005-08-24 16:01:16 EDT
Created attachment 26426 [details]
bad about image
Comment 2 Arif Kasim CLA 2005-08-24 16:01:54 EDT
Created attachment 26427 [details]
good about image
Comment 3 Arif Kasim CLA 2005-08-24 16:02:53 EDT
Here are two images.  One is created in Microsoft Acrylic and exported as a BMP
file.  This image causes the problem (exception).  

The second one is an image created by opening the "bad" image in an image viewer
and then re-saving it as a BMP file.  This one works fine as the about image in
Eclipse.

It seems like Microsoft Acrylic export is causing the image to be marked
strangely (where SWT will not recognize it -- though other image viewers seem to
work fine with it).
Comment 4 Carolyn MacLeod CLA 2005-09-13 14:26:11 EDT
There are 2 bugs here. I will look into why the BMP is not recognized by SWT.
MVM, since you were the last one to touch the AboutDialog code, can you please 
look into making sure that the dialog[s] does [do] something reasonable if the 
image does not load? Thanks...
Comment 5 Carolyn MacLeod CLA 2006-04-04 05:17:52 EDT
1) The bad image cannot be read by Adobe Photoshop, MS Internet Explorer, or MS Paint, so I don't feel too bad about not being able to read it <g>. I see that MS Picture Viewer and MGI PhotoSuite do read it, however, so I will leave this bug open to look at some day, but it will have to be fairly low priority.

2) Tod, can you please look into making sure that the About dialog does something reasonable if an image does not load? Thanks!
Comment 6 Tod Creasey CLA 2006-04-04 08:31:24 EDT
See Bug 134730 for the About portion of this issue
Comment 7 Carolyn MacLeod CLA 2006-09-21 15:22:21 EDT
This bug was fixed by the fix for bug 157689.
Marking this as a dup of that bug.

*** This bug has been marked as a duplicate of 157689 ***