VLCJ not working on Mac - plugin libvlccore.5.dyli

2019-04-30 04:52发布

问题:

I am trying to get VLCJ working on Mac and PC. It works fine under Windows 7 (64bit) but when I try to run it on my Mac it crashes. I am pointing to the correct directory for the VLC dylib files but I get an "...quit unexpectedly while using the libvlccore.5.dylib plugin" message. The details are:

Process:         java [48664]
Path:            /usr/bin/java
Identifier:      com.apple.javajdk16.cmd
Version:         1.0 (1.0)
Code Type:       X86-64 (Native)
Parent Process:  java [48543]

PlugIn Path:       /Applications/VLC.app/Contents/MacOS/lib/libvlccore.5.dylib
PlugIn Identifier: libvlccore.5.dylib
PlugIn Version:    7.0.0 (compatibility 7.0.0)

Date/Time:       2012-11-09 17:42:13.389 +1300
OS Version:      Mac OS X 10.6.8 (10K549)
Report Version:  6

Interval Since Last Report:          416266 sec
Crashes Since Last Report:           2
Per-App Interval Since Last Report:  369 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      2E883C97-CC99-4700-90ED-BA9554F46C71

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000038
Crashed Thread:  30

...

Does anyone have any ideas please?

回答1:

I bet you are using the libraries of VLC 2.0.4. I was experiencing the same problems and I downgraded to 2.0.3 version. It works fine now!



回答2:

I've the same problem but I checked with all VLC versions: 2.0.1, 2.0.3, 2.0.4 & 2.0.5 and it still not working.

Could you provide me your config info to try to make it work like you? MAC OSX, JAVA version, VLCj version & VLC version?

You can follow the thread on github https://github.com/caprica/vlcj/issues/138

Thanks a lot.



回答3:

This has been fixed in vlc 2.0.7.

It should also be fixed in vlc 2.1.0.

If you check the NEWS file for vlc 2.0.7 you will see this:

Video output: * Fix crash when using libvlc in 3rd party applications (Mac only)



回答4:

This happened to me with latest VLC 3 (Git)

# Change dir to VLC lib
cd /Applications/VLC.app/Contents/MacOS/lib/

# Search for LC_RPATH entries
otool -l libvlc.dylib

# If not LC_RPATH entries found we can "statically" link libvlccore.dylib 
install_name_tool -change @rpath/libvlccore.dylib /Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib /Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib

So now if we use otool again:

otool -l libvlc.dylib
[...]
Load command 9
          cmd LC_LOAD_DYLIB
      cmdsize 88
         name /Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib (offset 24)
   time stamp 2 Thu Jan  1 01:00:02 1970
      current version 9.0.0
compatibility version 9.0.0
[...]

"libvlccore.dylib" will be searched in the right dir.

It not the best solution, each time you update VLC you'll have to re-link it again, but it works!



标签: macos vlcj