Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: UDIG 1.2.RC1
    • Fix Version/s: UDIG 1.2.RC2
    • Component/s: printing
    • Labels:
      None

      Description

      Printing has developed a NPE (I think due to a recent change hooking up catalog events!)

      Here is the stack trace:

      java.lang.Exception: java.lang.NullPointerException
      at net.refractions.udig.catalog.internal.CatalogImpl.fire(CatalogImpl.java:688)
      at net.refractions.udig.catalog.IGeoResource.getInfo(IGeoResource.java:230)
      at net.refractions.udig.project.internal.impl.LayerImpl.obtainBoundsFromResources(LayerImpl.java:2010)
      at net.refractions.udig.project.internal.impl.LayerImpl.getBounds(LayerImpl.java:1984)
      at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.validateBounds(BasicFeatureRenderer.java:427)
      at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:242)
      at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:106)
      at net.refractions.udig.project.ui.ApplicationGIS$1.render(ApplicationGIS.java:870)
      at net.refractions.udig.project.ui.ApplicationGIS$1.run(ApplicationGIS.java:813)
      at net.refractions.udig.ui.PlatformGIS$1.call(PlatformGIS.java:105)

        Activity

        Hide
        Jody Garnett added a comment - - edited
        Okay traced through the code ... one of the Boxes is being created with a null ID and a null Dimension! I added code to "skip" any invalid box list this for safety; but have been unable to debug the template code to see how this box was created.

        I also note the CreatePageAction is *evil* - it fails for me while copying a Map using the following code:
                Map oldMap = (Map) ((MapEditorInput) input).getProjectElement();
                project = oldMap.getProjectInternal();
                try {
                    map = (Map) EcoreUtil.copy(oldMap);
                }
                catch( Throwable t ){
                    // unable to copy map?
                    t.printStackTrace();
                    return;
                }
        But if I step through with a debugger it succeeds!

        The stack tract produced is:
        java.lang.IllegalArgumentException: The 'no null' constraint is violated
        at org.eclipse.emf.common.util.AbstractEList.validate(AbstractEList.java:101)
        at org.eclipse.emf.ecore.util.EcoreEList.validate(EcoreEList.java:69)
        at org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicEList.java:514)
        at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAllUnique(NotifyingListImpl.java:506)
        at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:478)
        at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:406)
        at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:374)
        at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:566)
        at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:486)
        at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:572)
        at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:486)
        at org.eclipse.emf.ecore.util.EcoreUtil.copy(EcoreUtil.java:360)
        at net.refractions.udig.printing.ui.actions.CreatePageAction.run(CreatePageAction.java:84)
        at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
        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$6.handleEvent(ActionContributionItem.java:452)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:136)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        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:368)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
        Show
        Jody Garnett added a comment - - edited Okay traced through the code ... one of the Boxes is being created with a null ID and a null Dimension! I added code to "skip" any invalid box list this for safety; but have been unable to debug the template code to see how this box was created. I also note the CreatePageAction is *evil* - it fails for me while copying a Map using the following code:         Map oldMap = (Map) ((MapEditorInput) input).getProjectElement();         project = oldMap.getProjectInternal();         try {             map = (Map) EcoreUtil.copy(oldMap);         }         catch( Throwable t ){             // unable to copy map?             t.printStackTrace();             return;         } But if I step through with a debugger it succeeds! The stack tract produced is: java.lang.IllegalArgumentException: The 'no null' constraint is violated at org.eclipse.emf.common.util.AbstractEList.validate(AbstractEList.java:101) at org.eclipse.emf.ecore.util.EcoreEList.validate(EcoreEList.java:69) at org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicEList.java:514) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAllUnique(NotifyingListImpl.java:506) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:478) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:406) at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:374) at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:566) at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:486) at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:572) at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:486) at org.eclipse.emf.ecore.util.EcoreUtil.copy(EcoreUtil.java:360) at net.refractions.udig.printing.ui.actions.CreatePageAction.run(CreatePageAction.java:84) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) 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$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:136) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
        Hide
        Jody Garnett added a comment -
        Turned off notifications when GeoResoruce.getInfo is available for the first time. The GeoResource wrapper used by layer; ends up trying to issue these notifications as it is being copied by the printing code.

        Committed as of -r31618
        Show
        Jody Garnett added a comment - Turned off notifications when GeoResoruce.getInfo is available for the first time. The GeoResource wrapper used by layer; ends up trying to issue these notifications as it is being copied by the printing code. Committed as of -r31618

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Jody Garnett
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: