NullPointerException in PlaybackControlPanel class
Hi,
I have a TS file that when I try to open consistently throws the following exception. VLC and other player programs can play the file without any issue.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "org.jmisb.api.video.IVideoFileInput.getPosition()" because "this.videoFileInput" is null at org.jmisb.viewer.PlaybackControlPanel.lambda$onVideoReceived$2(PlaybackControlPanel.java:196) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716) 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:741) 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)
- OS: Windows and Mac
- JDK17.0.5 and JDK1.8.0_341
- jMISB version: 2.x and 1.12.0
Any help to debug the issue is appreciated.
Can you make the file available?
Unfortunately, I am not able to do that.
That is OK, but you'll obviously be doing the debugging yourself. I can only suggest making sure you have a consistent build (i.e. a full clean build / install cycle), and setting appropriate debug breakpoints in places where the videoFileInput is being set, such as
https://github.com/WestRidgeSystems/jmisb/blob/main/viewer/src/main/java/org/jmisb/viewer/PlaybackControlPanel.java#L172
and
https://github.com/WestRidgeSystems/jmisb/blob/main/viewer/src/main/java/org/jmisb/viewer/PlaybackControlPanel.java#L177
Thank you, Brad! I will keep you posted about my progress. Best.