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

GTK# stackoverflow mac #257

Open
mfkl opened this issue Jan 3, 2019 · 5 comments

Comments

@mfkl
Copy link

commented Jan 3, 2019

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

  1. Clone videolan/libvlcsharp#20
  2. Build the Samples/LibVLCSharp.GTK.Sample on mac
  3. 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 mono/bockbuild#66

/cc @jeremyVignelles

@marek-safar marek-safar transferred this issue from mono/mono Jan 3, 2019
@Therzok

This comment has been minimized.

Copy link
Member

commented Jan 3, 2019

@Therzok

This comment has been minimized.

Copy link
Member

commented Jan 3, 2019

I think the patch got reverted and we went back to the initial behaviour of stack overflow.

@bratsche

This comment has been minimized.

Copy link
Member

commented Jan 3, 2019

Yes that patch is reverted for now.

@jeremyVignelles

This comment has been minimized.

Copy link

commented Jan 3, 2019

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.

@jeremyVignelles

This comment has been minimized.

Copy link

commented Jan 17, 2019

ping? We would really like to release a version of LibVLCSharp for GTK# that works on all 3 platforms...

vlc-mirrorer pushed a commit to videolan/libvlcsharp that referenced this issue Jan 21, 2019
This commit contains a LibVLCSharp integration with GTK with optional
Xamarin.Forms support. It works on Linux and Windows only
(see mono/gtk-sharp#257 as to why).

(cherry picked from commit baf5d7c0bf505f3b797fc13f6a08e575db833add)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.