Bug 148208 - Printing causes a null pointer exception
Summary: Printing causes a null pointer exception
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 major
Target Milestone: 1.0.1   Edit
Assignee: Syed Atif CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-06-22 09:26 EDT by Michael Hanner CLA
Modified: 2010-07-19 21:55 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hanner CLA 2006-06-22 09:26:08 EDT
Problem:
An error dialog shows up with the text "Null".  Clicking on Details shows a "java.lang.NullPointerException".  An exception appears in the log.  The diagram prints out as expected.

Expected:
There should be no exceptions in the log


Steps:
1. Switch to the modeling perspective
2. Create a new UML project and blank model
3. Create a new class diagram
4. Add several classes to the diagram
5. With the diagram in focus, select File->Print.
6. Keep the defaults, click on Ok

Stack Trace:
java.lang.NullPointerException
at org.eclipse.gmf.runtime.draw2d.ui.internal.graphics.PrinterGraphics.dispose(PrinterGraphics.java:73)
at org.eclipse.gmf.runtime.diagram.ui.printing.internal.util.DiagramPrinter.dispose(DiagramPrinter.java:533)
at org.eclipse.gmf.runtime.diagram.ui.printing.internal.util.DiagramPrinter.run(DiagramPrinter.java:213)
at org.eclipse.gmf.runtime.diagram.ui.printing.util.DiagramPrinterUtil.printDiagrams(DiagramPrinterUtil.java:66)
at org.eclipse.gmf.runtime.diagram.ui.printing.util.DiagramPrinterUtil.printWithSettings(DiagramPrinterUtil.java:196)
at com.ibm.xtools.modeler.ui.internal.printing.ModelerPrintActionHelper.doPrint(ModelerPrintActionHelper.java:69)
at com.ibm.xtools.modeler.ui.internal.providers.globalActionHandler.ModelerGlobalActionHandler.doPrint(ModelerGlobalActionHandler.java:194)
at org.eclipse.gmf.runtime.diagram.ui.printing.providers.DiagramWithPrintGlobalActionHandler.getCommand(DiagramWithPrintGlobalActionHandler.java:48)
at com.ibm.xtools.modeler.ui.internal.providers.globalActionHandler.ModelerGlobalActionHandler.getCommand(ModelerGlobalActionHandler.java:184)
at org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction.doRun(GlobalAction.java:109)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:288)
at org.eclipse.gmf.runtime.common.ui.action.ActionManager$1.run(ActionManager.java:225)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:223)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:306)
at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 1 Syed Atif CLA 2006-06-30 15:58:22 EDT
To avoid patch collision, the fix to this bug is given in the patches submitted at Bug 134767.
Comment 2 Syed Atif CLA 2006-07-18 11:43:37 EDT
referenced patch committed for 1.0.100
Comment 3 Eclipse Webmaster CLA 2010-07-19 21:55:57 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Common was the original product and component for this bug