Menu

#4 NPE on loading model

v1.0 (example)
open
5
2007-09-23
2007-09-18
Anonymous
No

A NullPointerException is thrown upon loading a model in MonkeyWorld3D 4.0 RC1 (latest release)
Screenshot is included.

System spec:
Microsoft Windows XP Professional
Version 5.1.2600 Build 2600

Processor: x86 Family 6 Model 4 Stepping 2 AuthenticAMD ~1101 Mhz

Total Physical Memory 320.00 MB
Total Virtual Memory 1.53 GB

Video card: NVIDIA RIVA TNT/AGP/3DNOW! (Version: 6.14.10.6177)

Discussion

  • Nobody/Anonymous

    Screenshot of the error

     
  • Andreas Blochberger

    Logged In: YES
    user_id=1405074
    Originator: NO

    Can you add the exception details that must have been logged in the file workspace/.metadata/.log?

     
  • Andreas Blochberger

    • assigned_to: nobody --> ablocham
     
  • Andreas Blochberger

    • assigned_to: ablocham --> tareqdoufish
     
  • Andreas Blochberger

    Logged In: YES
    user_id=1405074
    Originator: NO

    Maybe this exception occured:
    This happend when playing around with particles.
    There is no WorldBound even after setting a model bound
    java.lang.NullPointerException
    at com.mw3d.core.spatial.SpatialDebuger.calculateDebugCenter(SpatialDebuger.java:88)
    at com.mw3d.core.spatial.SpatialDebuger.setSpatial(SpatialDebuger.java:105)
    at com.mw3d.swt.ui.editors.SpatialEditor$SpatialDebugWrapper.selectionChanged(SpatialEditor.java:320)
    at com.mw3d.core.util.Runtime.fireSpatialChangedListener(Runtime.java:127)
    at com.mw3d.swt.ui.editors.SpatialEditor.setFocus(SpatialEditor.java:250)
    at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:318)
    at org.eclipse.ui.internal.EditorPane.setFocus(EditorPane.java:127)
    at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:614)
    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.WorkbenchPage.activatePart(WorkbenchPage.java:609)
    at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3380)
    at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2928)
    at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:265)
    at org.eclipse.ui.internal.EditorPane.requestActivation(EditorPane.java:98)
    at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:229)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
    at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1273)
    at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:2015)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3713)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291)
    at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1584)
    at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1753)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2259)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2259)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2259)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2259)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2259)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2259)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2259)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
    at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:2768)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3288)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
    at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at com.mw3d.swt.ui.Application.start(Application.java:49)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    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:585)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

     
  • ncomp

    ncomp - 2007-10-09

    Logged In: YES
    user_id=1908140
    Originator: NO

    this problem is occurring quite frequently on the mac also....
    a workaround is

    // --------------------------------------------- com.mw3d.core.spatial.SpatialDebuger : line 87

    BoundingBox box = (BoundingBox) selectedGeometry.getWorldBound();

    if(box == null)
    {
    // just dump any type of box otherwise Outline UI becomes unusable
    box = new BoundingBox(selectedGeometry.getWorldTranslation(), 100f, 100f, 100f);
    }
    // ---------------------------------------------

    however this affects picking etc...
    it seems that jme is not calculating the bounds of the particles correctly, as getWorldBounds on the selected particle geometry returns null...
    i've had issues with particles and bounds before and was advised only to use bounding boxes so it seems there may be problems there yet....

     

Log in to post a comment.