gtk-sharp
gtk-sharp copied to clipboard
GTK# stackoverflow mac
Hello,
When porting LibVLCSharp to GTK#, I encounter a native crash when the mouse cursor touches the VideoView on GTK Mac. It appears to be a stackoverflow in one of your gtk patches.
Steps to Reproduce
- Clone https://github.com/videolan/libvlcsharp/pull/20
- Build the Samples/LibVLCSharp.GTK.Sample on mac
- Run it and when the video starts, hover over it with the cursor
Current Behavior
Application crash with
Stack overflow in unmanaged: IP: 0x107261f69, fault addr: 0x7ffeec73eff8
Stack overflow: IP: 0x107261f69, fault addr: 0x7ffeec735ff8
Stacktrace:
at <unknown> <0xffffffff>
at Gtk.Application.Run () [0x00001] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/gtk-sharp-None/gtk/Application.cs:145
<...>
at LibVLCSharp.GTK.Sample.Program.Main () [0x0009d] in /Users/Martz/Projects/LibVLCSharp/Samples/LibVLCSharp.GTK.Sample/Program.cs:35
at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0004d] in <71f4e3d7d65e42b0a699d02e59766d3c>:0
Repro with lldb attached gives
(lldb) c
Process 2937 resuming
Process 2937 stopped
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7ffee869ffc8)
frame #0: 0x000000010b061e59 libgdk-quartz-2.0.0.dylib`find_nsview_at_pos + 41
libgdk-quartz-2.0.0.dylib`find_nsview_at_pos:
-> 0x10b061e59 <+41>: callq 0x10b0784da ; symbol stub for: objc_msgSend
0x10b061e5e <+46>: movq 0x5c03b(%rip), %rsi ; "count"
0x10b061e65 <+53>: movq %rax, %rdi
0x10b061e68 <+56>: callq 0x10b0784da ; symbol stub for: objc_msgSend
Target 0: (mono) stopped.
Expected Behavior
Application does not crash.
On which platforms did you notice this
[x] macOS
Version Used:
Mono JIT compiler version 5.16.0.221 (2018-06/b63e5378e38 Mon Nov 19 18:08:09 EST 2018) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: normal SIGSEGV: altstack Notification: kqueue Architecture: amd64 Disabled: none Misc: softdebug Interpreter: yes LLVM: yes(3.6.0svn-mono-release_60/0b3cb8ac12c) GC: sgen (concurrent by default)
Stacktrace
Full backtrace https://gist.github.com/mfkl/921581898e21e0c85ffdff0d31eebd0d
Patch introduced in https://github.com/mono/bockbuild/pull/66
/cc @jeremyVignelles
@bratsche ^
I think the patch got reverted and we went back to the initial behaviour of stack overflow.
Yes that patch is reverted for now.
Do we have any workarounds? what can we do then? any ETA for a fix?
This bug is annoying for us because we don't have any LibVLCSharp.Forms implementation that can work on mac.
ping? We would really like to release a version of LibVLCSharp for GTK# that works on all 3 platforms...