Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VLC dying when called from inside Java

Tags:

java

windows

vlc

I'm having a problem that, at this moment, I don't even know how to investigate properly. Any recommendations on how I can get more information are welcome and appreciated.

My company sells a product with a WinXP PC at its core. One of the product's tasks is being able to start a video player on demand -- VLC, in this case. (To be specific, VLC 0.8.6d; it's several years out of date, but upgrading is problematic for a few reasons.) The application responsible for starting the player and performing many, many other tasks is written in Java.

I have a test rig sitting next to my desk. It used to work just fine. But for some reason, it now gives a "Send Error Report" window when the Java app tries to start VLC: "VLC media player has encountered a problem and needs to close...." You know the one.

Clearly, I've done something that buggered things up. Problem is, I know neither what it could be nor how I would go about fixing it.

Stuff I know:

  • It's not a code bug. I run the same software on my development desktop machine, and it doesn't have this issue.
  • It's not the VLC install, nor is it a malformed video file. When I capture the command used to start it from Java and manually enter that command from a "cmd" window, it works fine.
  • It's not that sneaky bastich bug where Java punishes you if you don't manually drain STDERR and STDOUT when making a system call. I've got that covered.
  • I'm not getting any error messages or output when it fails; it just fails and gives me that pop-up window.

I'm stumped. Recommendations for either what it could be or how I can figure out what it is are very welcome.

like image 611
BlairHippo Avatar asked Jan 27 '11 20:01

BlairHippo


1 Answers

Well, I’m not familiar with java and VLC, but I would do the following things:

  1. Check that you have identical java virtual machines in both of your desktops. Just in case…
  2. Check the process’s environment variables. They depend on parent process. Maybe VLC uses some of them.
  3. Try to debug crashing with native debugger like WinDbg. Perhaps the call stack will give you more ideas.

Good luck!

like image 109
Eugene Avatar answered Nov 09 '22 09:11

Eugene