Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

GTK# stackoverflow mac #257

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

GTK# stackoverflow mac #257

mfkl opened this issue Jan 3, 2019 · 5 comments

Comments

@mfkl
Copy link

mfkl 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 GTK# / Xamarin.Forms.Gtk implementations (reloaded) 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
Copy link
Contributor

Therzok commented Jan 3, 2019

@bratsche ^

@Therzok
Copy link
Contributor

Therzok commented Jan 3, 2019

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

@bratsche
Copy link

bratsche commented Jan 3, 2019

Yes that patch is reverted for now.

@jeremyVignelles
Copy link

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
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants