FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 961 : Movie cannot be read straight after load
Last modified: 2008-10-19 04:42
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
polymonkey
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2008-10-18 17:27
On Processing 151 the video library reports a NullPointerException when
trying to read the movie during setup. Works fine in Processing 148
This is the bug
Exception in thread "Animation Thread" java.lang.NullPointerException
at processing.video.Movie.read(Movie.java:415)
at Loop.setup(Loop.java:37)
at processing.core.PApplet.handleDraw(PApplet.java:1372)
at processing.core.PApplet.run(PApplet.java:1300)
at java.lang.Thread.run(Thread.java:613)
To reproduce load the video loop example and add myMovie.read() to the line
below myMovie.loop()
MattD
Additional Comment
#1 From polymonkey 2008-10-18 17:34
In addition there appears to be many problems in the Video library examples
caused by the movie not being initialised in time.
For example the ASCIIVideo, colorSorting and Disgrand examples now throw an
ArrayIndexOutOfBoundsException
Additional Comment
#2 From fry 2008-10-18 18:13
nuts, this is due to a fix for
bug #882
. will look into whether it's just
exposing a problem in how the examples are written, or whether the fix is
just breaking things. thanks for the report.
Additional Comment
#3 From fry 2008-10-18 18:14
also, in the meantime use movie.available() before calling read(), and let
me know if that does/does not work.
Additional Comment
#4 From polymonkey 2008-10-18 21:44
(In reply to
comment #3
)
Adding this to the top of draw does work. But it takes 11 - 20 frames
before it can be read.
if(myMovie.available()){
myMovie.read();
println(frameCount);
}
The AsciiVideo example is having problems because of this line in setup
video = new Capture(this, 80, 60, 15);
int count = video.width * video.height;
count is always 0.
Additional Comment
#5 From fry 2008-10-19 04:41
***
Bug 962
has been marked as a duplicate of this bug. ***
Additional Comment
#6 From fry 2008-10-19 04:42
Will just have to remove the changes from
bug #882
and re-release for 0152.