APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

NullPointerException when using mp4's downloaded from youtube post and replies

Return to the NullPointerException when using mp4's downloaded from youtube thread
Login to post to this thread

NullPointerException when using mp4's downloaded from youtube
Jason Cims
1 Posts

Hi Mr Brown,

First, thank you so much for the time and effort you put into this application. It's amazing.

I just wanted to let you know of an issue i've been experiencing as of late. I'm running windows 8 with 32-bit jvm from Oracle 7.60. I tinker with analysis from various youtube videos from time to time, and recently have been trying to use tracker to track club head speed in this video:

https://www.youtube.com/watch?v=gZJw3egz9qk

Using keepvid.com, I downloaded an mp4 of the above video in 720p, and am unable to seek around or insert a point mass to track without Tracker crashing. I've enabled logging to a file and see the following stacktrace:

05:03:51.888 [AWT-EventQueue-0] DEBUG com.xuggle.xuggler - Closing dangling StreamCoder (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:82)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.opensourcephysics.media.xuggle.XuggleVideo.reload(Unknown Source)
at org.opensourcephysics.media.xuggle.XuggleVideo.resetContainer(Unknown Source)
at org.opensourcephysics.media.xuggle.XuggleVideo.getKeyPacket(Unknown Source)
at org.opensourcephysics.media.xuggle.XuggleVideo.getKeyPacketForFrame(Unknown Source)
at org.opensourcephysics.media.xuggle.XuggleVideo.loadPicture(Unknown Source)
at org.opensourcephysics.media.xuggle.XuggleVideo.getImage(Unknown Source)
at org.opensourcephysics.media.xuggle.XuggleVideo.setFrameNumber(Unknown Source)
at org.opensourcephysics.media.core.StepperClipControl$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
05:03:53.757 [AWT-EventQueue-0] WARN  com.xuggle.xuggler - Attempt to seekKeyFrame but container is not open (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:821)

Converting the video to AVI alleviates this problem.

I did try insalling quicktime to see if that would work but it doesn't seem to want to use that video engine.  I'm happy to just convert the AVI so it's not a big deal.

Thanks again!

Post edited December 31, 2014 at 5:20 AM EST.


Replies to NullPointerException when using mp4's downloaded from youtube

Re: NullPointerException when using mp4's downloaded from youtube -
Douglas Brown Avatar
Douglas Brown
339 Posts

Hi Jason,

Thanks for your very complete bug report and workaround. I will modify XuggleVideo to catch this null pointer exception, and hopefully that will prevent Tracker from crashing, but unfortunately Xuggle may still be unable to play your downloaded MP4.

best regards,

Doug



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book