Ludii Forum
Game Screenshot causes Exception - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Ludii Player Problems (https://ludii.games/forums/forumdisplay.php?fid=6)
+--- Thread: Game Screenshot causes Exception (/showthread.php?tid=1288)



Game Screenshot causes Exception - fuerchter - 10-04-2022

Hi,
using the "Game Screenshot" feature causes the following exception:
Code:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.io.File.mkdirs()" because the return value of "java.io.File.getParentFile()" is null
        at app.display.screenCapture.ScreenCapture.lambda$gameScreenshot$0(ScreenCapture.java:67)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Tested on Ludii 1.3.6 on Windows 11 and a Ubuntu 22.04.1 LTS VM.


RE: Game Screenshot causes Exception - MatthewStephenson - 10-05-2022

Hi,

Thanks for letting us know. I've fixed this for the next release.

Cheers,
Matthew


RE: Game Screenshot causes Exception - fuerchter - 10-30-2022

Yes, this looks fixed in 1.3.7