Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gstreamer: macos #120

Closed
esiqveland opened this issue Jul 29, 2024 · 3 comments
Closed

Gstreamer: macos #120

esiqveland opened this issue Jul 29, 2024 · 3 comments

Comments

@esiqveland
Copy link

It looks like the libgst bindings may not work on aarch64 on macos.

I am running the PlaySound example:
https://github.com/jwharm/java-gi-examples/blob/main/PlaySound/src/main/java/io/github/jwharm/javagi/examples/playsound/PlaySound.java

When I try to run this sample, it works fine on Linux.

However on Macos:

(<unknown>:65383): GLib-GObject-CRITICAL **: 19:36:08.217: g_object_set_is_valid_property: object class 'GstFileSrc' has no property named '\xa8\u0003_\xf8\xb4o(\x8b\xbf\u0003\u001f\xf8\xb6\xe3{\xa9\xb8o8\x8b\xba\x83\\xf8\xac\x83^\xf8\xc2\u0012@x\xe1\u0007}\xb2B|\u0001\x9bA\u001f@\xf9! '

(<unknown>:65383): GStreamer-CRITICAL **: 19:36:08.231: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

Notice the strange property name in the logs from gst.

Crash:

---------------  T H R E A D  ---------------

Current thread (0x000000013d80e000):  JavaThread "main"             [_thread_in_native, id=8707, stack(0x000000016d77c000,0x000000016d97f000) (2060K)]

Stack: [0x000000016d77c000,0x000000016d97f000],  sp=0x000000016d97e020,  free space=2056k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libgstreamer-1.0.0.dylib+0x13b30]  gst_bin_add+0x68
C  [libgstreamer-1.0.0.dylib+0x9833c]  gst_bin_add_many+0x84
v  ~RuntimeStub::nep_invoker_blob 0x0000000114b43a54
j  java.lang.invoke.LambdaForm$MH+0x00001ffc00368000.invoke(Ljava/lang/Object;JJJJJJJJ)V+22 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc0036b800.invokeExact_MT(Ljava/lang/Object;JJJJJJJJLjava/lang/Object;)V+33 [email protected]
j  jdk.internal.foreign.abi.DowncallStub+0x00001ffc00368400.invoke(Ljava/lang/foreign/SegmentAllocator;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;)V+459 [email protected]
j  java.lang.invoke.LambdaForm$DMH+0x00001ffc00368c00.invokeStaticInit(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+26 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc0036b000.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+180 [email protected]
j  java.lang.invoke.Invokers$Holder.invoke_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+18 [email protected]
j  io.github.jwharm.javagi.interop.VarargsInvoker.invoke(Ljava/lang/foreign/SegmentAllocator;[Ljava/lang/Object;)Ljava/lang/Object;+314
j  java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+14 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc00284400.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+53 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc002f4000.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+22 [email protected]
j  org.freedesktop.gstreamer.gst.Bin.addMany(Lorg/freedesktop/gstreamer/gst/Element;[Ljava/lang/Object;)V+26
j  io.github.jwharm.javagi.examples.playsound.PlaySound.<init>([Ljava/lang/String;)V+256
j  io.github.jwharm.javagi.examples.playsound.PlaySound.main([Ljava/lang/String;)V+5
v  ~StubRoutines::call_stub 0x0000000114970154
V  [libjvm.dylib+0x4b0e04]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x3d8
V  [libjvm.dylib+0x52d1bc]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*)+0x170
V  [libjvm.dylib+0x530a2c]  jni_CallStaticVoidMethod+0x108
C  [libjli.dylib+0xa144]  invokeStaticMainWithArgs+0x94
C  [libjli.dylib+0xabcc]  JavaMain+0x780
C  [libjli.dylib+0xd61c]  ThreadJavaMain+0xc
C  [libsystem_pthread.dylib+0x6f94]  _pthread_start+0x88
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v  ~RuntimeStub::nep_invoker_blob 0x0000000114b43a0c
j  java.lang.invoke.LambdaForm$MH+0x00001ffc00368000.invoke(Ljava/lang/Object;JJJJJJJJ)V+22 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc0036b800.invokeExact_MT(Ljava/lang/Object;JJJJJJJJLjava/lang/Object;)V+33 [email protected]
j  jdk.internal.foreign.abi.DowncallStub+0x00001ffc00368400.invoke(Ljava/lang/foreign/SegmentAllocator;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;)V+459 [email protected]
j  java.lang.invoke.LambdaForm$DMH+0x00001ffc00368c00.invokeStaticInit(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+26 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc0036b000.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+180 [email protected]
j  java.lang.invoke.Invokers$Holder.invoke_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+18 [email protected]
j  io.github.jwharm.javagi.interop.VarargsInvoker.invoke(Ljava/lang/foreign/SegmentAllocator;[Ljava/lang/Object;)Ljava/lang/Object;+314
j  java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+14 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc00284400.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+53 [email protected]
j  java.lang.invoke.LambdaForm$MH+0x00001ffc002f4000.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+22 [email protected]
j  org.freedesktop.gstreamer.gst.Bin.addMany(Lorg/freedesktop/gstreamer/gst/Element;[Ljava/lang/Object;)V+26
j  io.github.jwharm.javagi.examples.playsound.PlaySound.<init>([Ljava/lang/String;)V+256
j  io.github.jwharm.javagi.examples.playsound.PlaySound.main([Ljava/lang/String;)V+5
v  ~StubRoutines::call_stub 0x0000000114970154
@jwharm
Copy link
Owner

jwharm commented Jul 29, 2024

It's an issue with varargs handling on macOS AArch64. Thanks for the report.

Please note: This will take a while to fix correctly (plus I'm going to be offline for a while) but I will publish a preview release when this is fixed.

@esiqveland
Copy link
Author

No worries, thank you for the great project!

@jwharm jwharm closed this as completed in 0701fe3 Aug 12, 2024
@jwharm
Copy link
Owner

jwharm commented Aug 12, 2024

I published a 0.11.0-SNAPSHOT release with the fix.

For snapshot releases, add https://s01.oss.sonatype.org/content/repositories/snapshots to the repositories in your build script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants