Skip to content

Instantly share code, notes, and snippets.

@xranby
Created July 22, 2015 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xranby/d658b9cb032cfdffed05 to your computer and use it in GitHub Desktop.
Save xranby/d658b9cb032cfdffed05 to your computer and use it in GitHub Desktop.
pi@raspberrypi ~/2.3.2 $ sh mousetracker.sh
RunnableTask.run(): A caught exception occured on thread main-Display-.x11_:0.0-1-EDT-1: RunnableTask[executed false, tTotal 0 ms, tExec 0 ms, tQueue 0 ms, attachment null, throwable java.lang.NullPointerException]
java.lang.NullPointerException
at jogamp.newt.driver.x11.ScreenDriver.collectNativeMonitorModesAndDevicesImpl(ScreenDriver.java:124)
at jogamp.newt.ScreenImpl.collectNativeMonitorModes(ScreenImpl.java:630)
at jogamp.newt.ScreenImpl.initMonitorState(ScreenImpl.java:566)
at jogamp.newt.ScreenImpl.createNative(ScreenImpl.java:196)
at jogamp.newt.ScreenImpl.addReference(ScreenImpl.java:235)
at jogamp.newt.WindowImpl.createNative(WindowImpl.java:437)
at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:964)
at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1015)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:133)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:372)
DefaultEDT.run(): Caught exception occured on thread main-Display-.x11_:0.0-1-EDT-1: RunnableTask[executed true, tTotal 354 ms, tExec 354 ms, tQueue 0 ms, attachment null, throwable java.lang.NullPointerException]
java.lang.NullPointerException
at jogamp.newt.driver.x11.ScreenDriver.collectNativeMonitorModesAndDevicesImpl(ScreenDriver.java:124)
at jogamp.newt.ScreenImpl.collectNativeMonitorModes(ScreenImpl.java:630)
at jogamp.newt.ScreenImpl.initMonitorState(ScreenImpl.java:566)
at jogamp.newt.ScreenImpl.createNative(ScreenImpl.java:196)
at jogamp.newt.ScreenImpl.addReference(ScreenImpl.java:235)
at jogamp.newt.WindowImpl.createNative(WindowImpl.java:437)
at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:964)
at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1015)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:133)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:372)
pi@raspberrypi ~/2.3.2 $ cat mousetracker.sh
java -cp jogl-demos/jar/jogl-demos.jar:jogamp-all-platforms/jar/gluegen-rt.jar:jogamp-all-platforms/jar/jogl-all.jar jogamp.newt.driver.x11.X11MouseTracker
@xranby
Copy link
Author

xranby commented Jul 22, 2015

/o\ -Dnewt.debug=all == no exception raised & no window seen :(
log below \o/

Def. Icon: data_size 1284 * elem_size 4 = data java.nio.DirectByteBuffer[pos=0 lim=5136 cap=5136]
Display.setEDTUtil(default): null -> null
Display.createEDTUtil(.x11_:0.0-1): jogamp.newt.DefaultEDTUtil
Display.create() NEW: NEWT-Display[.x11_:0.0-1, excl true, refCount 0, hasEDT true, edtRunning false, null] main
Screen.create() NEW: NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  0 x 0 ] [pixels], [ 0 / 0  0 x 0 ] [window], null, NEWT-Display[.x11_:0.0-1, excl true, refCount 0, hasEDT true, edtRunning false, null], monitors: null] main
Window.addWindow2List: GCed 0, size 1
Info: EDT start main, NEWT-Display[.x11_:0.0-1, excl true, refCount 0, hasEDT true, edtRunning false, null]
    [2]: jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:420)
    [3]: jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2133)
    [4]: jogamp.newt.WindowImpl.setSize(WindowImpl.java:1087)
    [5]: jogamp.newt.driver.x11.X11MouseTracker.<init>(X11MouseTracker.java:83)
    [6]: jogamp.newt.driver.x11.X11MouseTracker.<clinit>(X11MouseTracker.java:64)
Thread[main,5,main]: Default-EDT reset - edt: Thread[Display-.x11_:0.0-1,5,main]
Thread[main,5,main]: Default-EDT START - edt: Thread[main-Display-.x11_:0.0-1-EDT-1,5,main]
main-Display-.x11_:0.0-1-EDT-1: Default-EDT run() START main-Display-.x11_:0.0-1-EDT-1
Window setSize: START force false, 128x128 -> 200x140, fs false, windowHandle 0x0, visible false
defineSize: win[128x128 -> 200x140], pixel[128x128 -> 200x140]
Window setSize: END 200x140, visibleAction 0
Window setPosition: 64/64 -> 300/400, fs false, windowHandle 0x0
definePosition: 64/64 -> 300/400
Window setVisible: START (main) 300/400 200x140, fs false, windowHandle 0x0, visible: false -> true, parentWindowHandle 0x0, parentWindow false
Window.createNative() START (main-Display-.x11_:0.0-1-EDT-1, jogamp.newt.driver.x11.WindowDriver[Config null,
 NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  0 x 0 ] [pixels], [ 0 / 0  0 x 0 ] [window], null, NEWT-Display[.x11_:0.0-1, excl true, refCount 0, hasEDT true, edtRunning true, null], monitors: null],
 ParentWindow null,
 ParentWindowHandle 0x0 (false),
 WindowHandle 0x0,
 SurfaceHandle 0x0 (lockedExt window false, surface false),
 window[300/400 (auto false) 200x140], pixel[200x140],
 Visible false, focus false,
 Undecorated false (false),
 AlwaysOnTop false, Fullscreen false,
 WrappedSurface null,
 ChildWindows 0, SurfaceUpdatedListeners num 0 [], WindowListeners num 0 [], MouseListeners num 0 [], PointerGestures default true, custom 0 [], KeyListeners num 0 [], windowLock <1045d8c, 6cb48>[count 1, qsz 0, owner <main-Display-.x11_:0.0-1-EDT-1>], surfaceLockCount 0])
Screen.addReference() (main-Display-.x11_:0.0-1-EDT-1): 0 -> 1
Screen.createNative() START (main-Display-.x11_:0.0-1-EDT-1, NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  0 x 0 ] [pixels], [ 0 / 0  0 x 0 ] [window], null, NEWT-Display[.x11_:0.0-1, excl true, refCount 0, hasEDT true, edtRunning true, null], monitors: null])
Display.addReference() (main-Display-.x11_:0.0-1-EDT-1): 0 -> 1
Display.createNative() START (main-Display-.x11_:0.0-1-EDT-1, NEWT-Display[.x11_:0.0-1, excl true, refCount 0, hasEDT true, edtRunning true, null])
Display.createNative() END (main-Display-.x11_:0.0-1-EDT-1, NEWT-Display[.x11_:0.0-1, excl true, refCount 0, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]]], active 1)
Using RandR13[version 1.3.0]
ScreenVirtualSize: 1280x1024 339x271 mm
XRRGetScreenSizeRange: 1280x1024 .. 1280x1024
XRRScreenResources 0x4bf700: Crtc count 1
Crtc[0] 0x1a9: 0/0 1280x1024, rot 0x1, mode.id 0x1ab
    Crtc[0].Output[0].id 0x1aa
        : Output[0]: id 0x1aa, crtx 0x1A9, name default (4979744), 0x0, ncrtc 1, nclone 0, nmode 1 (preferred 0), primary 0
        : Output[63234].Crtc[0].id 0x1a9
        : Output[63234].Mode[0].id 0x1ab
XRRScreenResources.outputs: Output[0]: id 0x1aa, crtx 0x1A9, name default (4979744), 0x0, ncrtc 1, nclone 0, nmode 1 (preferred 0), primary 0
XRRScreenResources.outputs: Output[-1409227636].Crtc[0].id 0x1a9
XRRScreenResources.outputs: Output[-1409227636].Mode[0].id 0x1ab
XRRScreenResources 0x4bf700: Mode count 1
Mode[0, id 0x1ab]: 1280x1024@0.000000, name 1280x1024
Screen.initMonitorState() START (main-Display-.x11_:0.0-1-EDT-1, NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  0 x 0 ] [pixels], [ 0 / 0  0 x 0 ] [window], X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0], NEWT-Display[.x11_:0.0-1, excl true, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]]], monitors: null])
ScreenImpl.collectNativeMonitorModes: MonitorDevice number : 1
ScreenImpl.collectNativeMonitorModes: MonitorMode number   : 1
ScreenImpl.collectNativeMonitorModes: SizeAndRate number   : 1
ScreenImpl.collectNativeMonitorModes: SurfaceSize number   : 1
ScreenImpl.collectNativeMonitorModes: Resolution number    : 1
WARNING: Fallback primary: Monitor[Id 0x1a9 [primary], 0 x 0 mm, pixelScale [1.0, 1.0], viewport [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], orig [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], curr [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], modeChanged false, modeCount 1]
All[0]: [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr]
[0]: Monitor[Id 0x1a9 [primary], 0 x 0 mm, pixelScale [1.0, 1.0], viewport [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], orig [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], curr [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], modeChanged false, modeCount 1]
[0][0]: [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr]
Primary: Monitor[Id 0x1a9 [primary], 0 x 0 mm, pixelScale [1.0, 1.0], viewport [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], orig [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], curr [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], modeChanged false, modeCount 1]
ScreenMonitorState.map .x11_:0.0-1-s0 -> jogamp.newt.ScreenMonitorState@b7bfbd
Screen.initMonitorState() END dt 717.116427ms
X11Screen.calcVirtualScreenOriginAndSize: Querying X11: [ 0 / 0  0 x 0 ] -> [ 0 / 0  1280 x 1024 ]
Updated virtual screen viewport @ main-Display-.x11_:0.0-1-EDT-1: [ 0 / 0  1280 x 1024 ] [pixel], [ 0 / 0  1280 x 1024 ] [window]
Screen.createNative() END (main-Display-.x11_:0.0-1-EDT-1, NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0], NEWT-Display[.x11_:0.0-1, excl true, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]]], monitors: [Monitor[Id 0x1a9 [primary], 0 x 0 mm, pixelScale [1.0, 1.0], viewport [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], orig [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], curr [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], modeChanged false, modeCount 1]]]), active 1, total 1580.228036ms
ScreenMonitorState.addListener (size: 1): NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0], NEWT-Display[.x11_:0.0-1, excl true, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]]], monitors: [Monitor[Id 0x1a9 [primary], 0 x 0 mm, pixelScale [1.0, 1.0], viewport [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], orig [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], curr [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], modeChanged false, modeCount 1]]]
X11Window.createNativeImpl() factory: jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl@c4b4ba, chosen config: DefaultGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4e93d8, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0],
    chosen    Caps[rgba 8/8/8/0, opaque, on-scr.]],
    requested Caps[rgba 8/8/8/0, opaque, on-scr.]]]
RunnableTask.run(): A caught exception occured on thread main-Display-.x11_:0.0-1-EDT-1: RunnableTask[executed false, tTotal 12 ms, tExec 0 ms, tQueue 12 ms, attachment null, throwable com.jogamp.nativewindow.NativeWindowException: Chosen Configuration w/o native visual ID: DefaultGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4e93d8, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0],
    chosen    Caps[rgba 8/8/8/0, opaque, on-scr.]],
    requested Caps[rgba 8/8/8/0, opaque, on-scr.]]]]
com.jogamp.nativewindow.NativeWindowException: Chosen Configuration w/o native visual ID: DefaultGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4e93d8, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0],
    chosen    Caps[rgba 8/8/8/0, opaque, on-scr.]],
    requested Caps[rgba 8/8/8/0, opaque, on-scr.]]]
    at jogamp.newt.driver.x11.WindowDriver.createNativeImpl(WindowDriver.java:123)
    at jogamp.newt.WindowImpl.createNative(WindowImpl.java:453)
    at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:964)
    at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1015)
    at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:133)
    at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:372)
DefaultEDT.run(): Caught exception occured on thread main-Display-.x11_:0.0-1-EDT-1: RunnableTask[executed true, tTotal 2075 ms, tExec 2063 ms, tQueue 12 ms, attachment null, throwable com.jogamp.nativewindow.NativeWindowException: Chosen Configuration w/o native visual ID: DefaultGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4e93d8, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0],
    chosen    Caps[rgba 8/8/8/0, opaque, on-scr.]],
    requested Caps[rgba 8/8/8/0, opaque, on-scr.]]]]
com.jogamp.nativewindow.NativeWindowException: Chosen Configuration w/o native visual ID: DefaultGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4e93d8, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0],
    chosen    Caps[rgba 8/8/8/0, opaque, on-scr.]],
    requested Caps[rgba 8/8/8/0, opaque, on-scr.]]]
    at jogamp.newt.driver.x11.WindowDriver.createNativeImpl(WindowDriver.java:123)
    at jogamp.newt.WindowImpl.createNative(WindowImpl.java:453)
    at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:964)
    at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1015)
    at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:133)
    at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:372)
Window.shutdownAll 1 instances, on thread NativeWindowFactory_ShutdownHook
Window.shutdownAll[1/1]: 0x0, GCed false
Screen.shutdownAll 1 instances, on thread NativeWindowFactory_ShutdownHook
Screen.shutdownAll[1/1]: NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 1, vsize [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]], idx 0], NEWT-Display[.x11_:0.0-1, excl true, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]]], monitors: [Monitor[Id 0x1a9 [primary], 0 x 0 mm, pixelScale [1.0, 1.0], viewport [ 0 / 0  1280 x 1024 ] [pixels], [ 0 / 0  1280 x 1024 ] [window], orig [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], curr [Id 0x1ab, [ 1280 x 1024 pixels x 32 bpp ] @ 0.0 Hz, flags [], 0 degr], modeChanged false, modeCount 1]]], GCed false
ScreenMonitorState.unmap .x11_:0.0-1-s0 -> jogamp.newt.ScreenMonitorState@b7bfbd
Display.shutdownAll 1 instances, on thread NativeWindowFactory_ShutdownHook DisplayList[] entries: 1 - NativeWindowFactory_ShutdownHook
  [0] : NEWT-Display[.x11_:0.0-1, excl true, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]]], GC'ed false
Display.shutdownAll[1/1]: NEWT-Display[.x11_:0.0-1, excl true, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x4bcc50, owner true, NullToolkitLock[obj 0xcdbe36]]], GCed false
Thread[NativeWindowFactory_ShutdownHook,5,main]: Default-EDT.invokeStop wait false
    [2]: jogamp.newt.DefaultEDTUtil.invokeStop(DefaultEDTUtil.java:148)
    [3]: jogamp.newt.DisplayImpl.shutdownAll(DisplayImpl.java:516)
    [4]: jogamp.newt.DisplayImpl$1.run(DisplayImpl.java:75)
    [5]: com.jogamp.nativewindow.NativeWindowFactory.shutdown(NativeWindowFactory.java:269)
    [6]: com.jogamp.nativewindow.NativeWindowFactory$2$1.run(NativeWindowFactory.java:187)
    [7]: java.lang.Thread.run(Thread.java:744)
main-Display-.x11_:0.0-1-EDT-1: Default-EDT finished w/ 0 left, null
main-Display-.x11_:0.0-1-EDT-1: Default-EDT finished w/ 0 left EXIT, exception: null
Thread[NativeWindowFactory_ShutdownHook,5,main]: Default-EDT signal STOP X edt: Thread[main-Display-.x11_:0.0-1-EDT-1,5,]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment