-
-
Notifications
You must be signed in to change notification settings - Fork 127
Description
I was trying to play a video file on Linux and I noticed the following: If the video filename is incorrect (or it's not in the data folder next to the sketch), normally the library gives an error message:
my_sketch.pde:40:0:40:0: RuntimeException: Could not load movie file nonexistent.mp4
which is fine. However, if using the P2D or P3D renderers instead of the default one, there is no error message, Processing just exits "normally". This is the terminal output I get in that case:
Processing video library using bundled GStreamer 1.20.3 (CVS)
Scanning GStreamer plugins... Done.
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 3/3, reusable (open, marked uncloseable): 0, pend
ing (open in creation order): 3)
X11Util: Open X11 Display Connections: 3
X11Util: Open[0]: NamedX11Display[:0, 0x7f01b0747f50, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0, 0x7f00e8002050, refCount 1, unCloseable false]
X11Util: Open[2]: NamedX11Display[:0, 0x7f00e8011760, refCount 1, unCloseable false]
Finished.
The X11 stuff is normal, I get the same terminal output if I just put exit() in my sketch (except for the first two GStreamer-related messages).
Here's a minimal code to reproduce
import processing.video.*;
void setup() {
// try removing P2D
size(640, 480, P2D);
// this should raise an exception if the file doesn't exist
new Movie(this, "nonexistent.mp4");
}This is a pretty minor problem but it took me quite a while to figure out.
I initially posted about this on the forum: https://discourse.processing.org/t/linux-processing-exits-when-creating-a-video-movie-if-using-p2d-or-p3d/42627/6
I'm on openSUSE tumbleweed with Processing 4.3 if it makes any difference.