Project: SWT
Bug 222381 AIOOBE in GIFFileFormat
Reported: 2008-03-12 06:47:29 | Status: resolved fixed

I20080304-1113 With the subversive plugin enabled (version 1.1.7) 1. Go to SVN Repository exploring 2. Expand a repository location Is: org.eclipse.swt.SWTException: i/o error (java.lang.ArrayIndexOutOfBoundsException: 7) at org.eclipse.swt.SWT.error(SWT.java:3756) at org.eclipse.swt.SWT.error(SWT.java:3674) at org.eclipse.swt.internal.image.GIFFileFormat.readApplicationExtension(GIFFileFormat.java:334) at org.eclipse.swt.internal.image.GIFFileFormat.readExtension(GIFFileFormat.java:182) at org.eclipse.swt.internal.image.GIFFileFormat.getExtensions(GIFFileFormat.java:154) at org.eclipse.swt.internal.image.GIFFileFormat.loadFromByteStream(GIFFileFormat.java:102) at org.eclipse.swt.internal.image.FileFormat.loadFromStream(FileFormat.java:48) at org.eclipse.swt.internal.image.FileFormat.load(FileFormat.java:84) at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:127) at org.eclipse.swt.graphics.ImageDataLoader.load(ImageDataLoader.java:22) at org.eclipse.swt.graphics.ImageData.<init>(ImageData.java:328) at org.eclipse.jface.resource.URLImageDescriptor.getImageData(URLImageDescriptor.java:57) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:273) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:205) at org.eclipse.ui.model.WorkbenchLabelProvider.getImage(WorkbenchLabelProvider.java:157) at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getImage(WrappedViewerLabelProvider.java:117) at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:165) at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:142) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:932) at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:102) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:857) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1012) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:857) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2041) at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:827) at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:802) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:776) at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:627) at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1442) at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:918) at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(AbstractTreeViewer.java:1453) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:125) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011) at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7145) at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4707) at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1761) at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4337) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3830) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4472) at org.eclipse.swt.internal.win32.OS.$$YJP$$CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(OS.java) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2250) at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1497) at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6121) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3811) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5662) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4485) at org.eclipse.swt.internal.win32.OS.$$YJP$$DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(OS.java) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3369) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2368) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2332) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:476) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:471) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) Caused by: java.lang.ArrayIndexOutOfBoundsException: 7 at org.eclipse.swt.internal.image.GIFFileFormat.readApplicationExtension(GIFFileFormat.java:327) ... 81 more Maybe corrupt images?

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java