caprica / vlcj

Java framework for the vlc media player
http://www.capricasoftware.co.uk/projects/vlcj
1.1k stars 260 forks source link

JavaFX MacOS #1203

Closed walrusone closed 9 months ago

walrusone commented 9 months ago

I've developed a small video player using VLCJ based on the JavaFX Demo. Everything works great in Windows, but the system crashes on MacOS. I can run the player fine when running through Intellij on MacOS, but as soon as I build and try to run outside of the IDE it crashes.

Date/Time:             2023-10-05 14:49:20.1724 -0230
OS Version:            macOS 13.5.2 (22G91)
Report Version:        12
Anonymous UUID:        9A426C53-5BE7-AB67-7595-16C3DC488809

Sleep/Wake UUID:       9A6AA951-552E-45E6-A605-EE2870460341

Time Awake Since Boot: 23000 seconds
Time Since Wake:       59 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000014
Exception Codes:       0x0000000000000001, 0x0000000000000014

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   IPTVBoss [12042]

VM Region Info: 0x14 is not in any region.  Bytes before following region: 105553518919660
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated)

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib               0x190628764 __pthread_kill + 8
1   libsystem_pthread.dylib             0x19065fc28 pthread_kill + 288
2   libsystem_c.dylib                   0x19056dae8 abort + 180
3   libsystem_c.dylib                   0x19056ce44 __assert_rtn + 272
4   jna8074507030377149867.tmp           0x125b1404c 0x125afc000 + 98380
5   jna8074507030377149867.tmp           0x125b02d60 Java_com_sun_jna_Native_open + 320
6   ???                                 0x1580098ac ???
7   ???                                 0x158005ec0 ???
8   ???                                 0x158005d80 ???
9   ???                                 0x158005d80 ???
10  ???                                 0x158005d80 ???
11  ???                                 0x158005fc8 ???
12  ???                                 0x1580063a8 ???
13  ???                                 0x158005e68 ???
14  ???                                 0x158005fc8 ???
15  ???                                 0x158005fc8 ???
16  ???                                 0x158005fc8 ???
17  ???                                 0x158005fc8 ???
18  ???                                 0x158005d80 ???
19  ???                                 0x158005fc8 ???
20  ???                                 0x158005fc8 ???
21  ???                                 0x1600fd230 ???
22  ???                                    0x406588 ???
caprica commented 9 months ago

Pretty difficult to say. Looks like it failed to open the native library for some reason.

Since it works in IntelliJ, you need to compare your Run configuration carefully and see what it's setting that you're not.

walrusone commented 9 months ago

The issue was I had to update the JNA in my build to 5.13.0. Which led to an unsatisfied link error because of the different team ids between my app and vlc, but I've managed to work around that by disabling library validation in my app.