Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355629

Summary: Exception when generating gif image
Product: [SOA] BPMN2Modeler Reporter: Robert Brodt <bbrodt>
Component: UIAssignee: Robert Brodt <bbrodt>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: ralph.soika
Version: 0.0.1   
Target Milestone: future   
Hardware: PC   
OS: Windows 7   
URL: https://issues.jboss.org/browse/JBPM-3088
Whiteboard:

Description Robert Brodt CLA 2011-08-24 05:51:54 EDT
https://issues.jboss.org/browse/JBPM-3088
Comment 1 Robert Brodt CLA 2011-08-24 06:50:33 EDT
Created a simple choreography model with start event, two choreo tasks and end event all connected by sequence links. The only other thing on the canvas is a message (not connected).

Selected the "Save as image" from the canvas context menu, image type gif and just pressed ok (i.e. accepted the defaults). Got an error window saying couldn't save due to number of colours and the following exception in the error log:

eclipse.buildId=I20100608-0911
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.jee.product

Error
Wed Mar 09 12:46:14 GMT 2011
Method 'startSaveAsImageDialog(graphicalViewer)': Can not save image:
Details: java.lang.Exception: Image contains more than 256 colors.
Automated color reduction is currently not supported.
at org.eclipse.graphiti.ui.internal.services.impl.UiService.create8BitIndexedPaletteImage(UiService.java:108)
at org.eclipse.graphiti.ui.internal.services.impl.UiService.createImage(UiService.java:65)
at org.eclipse.graphiti.ui.internal.services.impl.UiService.startSaveAsImageDialog(UiService.java:160)
at org.eclipse.graphiti.ui.internal.action.SaveImageAction.run(SaveImageAction.java:58)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3552)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3171)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Comment 2 Brian Fitzpatrick CLA 2011-12-09 13:21:26 EST
Posted a question in the Graphiti forums on this one:
http://www.eclipse.org/forums/index.php/t/264751/
Comment 3 Ralph Soika CLA 2015-05-09 08:40:21 EDT
As Michael Wenz replied in the comment http://www.eclipse.org/forums/index.php/t/264751/ 

the gif format is not fully supported by Graphiti. 
I tested this once again and can confirm that this is still an issue.

I would suggest to remove the export format 'GIF' from the list if this is possible. But I can not find the definition of the export dialog.
Comment 4 Robert Brodt CLA 2015-05-11 09:38:27 EDT
This option is actually contained in a Graphiti internal dialog and needs to be fixed by the Graphiti team.

I have reported this in Bug 467002.