Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7492677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:30:48+00:00 2026-05-29T16:30:48+00:00

I’m writing an app in MonoMac and its having an issue where if I

  • 0

I’m writing an app in MonoMac and its having an issue where if I open a secondary dialog using this invocation

var prefForm = new PrefFormController();
prefForm.Window.MakeKeyAndOrderFront(mainWindowController);

The app ends up crashing if you switch enough back and forth from the main dialog and the secondary dialog, or buttons being clicked will end up crashing the application.

Loaded assembly: /Users/michaelmanley/Desktop/NasuTek-StreamDesk/StreamDesk-Cocoa/bin/Debug/StreamDesk.app/Contents/Resources/StreamDesk.exe
Loaded assembly: /Users/michaelmanley/Desktop/NasuTek-StreamDesk/StreamDesk-Cocoa/bin/Debug/StreamDesk.app/Contents/Resources/StreamDesk.Managed.dll
Loaded assembly: /Users/michaelmanley/Desktop/NasuTek-StreamDesk/StreamDesk-Cocoa/bin/Debug/StreamDesk.app/Contents/Resources/MonoMac.dll [External]
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll [External]
Loaded assembly: /Users/michaelmanley/Desktop/NasuTek-StreamDesk/StreamDesk-Cocoa/bin/Debug/StreamDesk.app/Contents/Resources/Mono.Addins.dll [External]
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll [External]
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll [External]
Loaded assembly: __MetadataTypes [External]
Loaded assembly: __MetadataTypes [External]
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/Mono.Addins.CecilReflector/0.6.0.0__0738eb9f132ed756/Mono.Addins.CecilReflector.dll [External]
Thread started: 
Unloaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/Mono.Addins.CecilReflector/0.6.0.0__0738eb9f132ed756/Mono.Addins.CecilReflector.dll
Unloaded assembly: __MetadataTypes
Thread finished: 
Thread started: 
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll [External]
Thread started: 
Thread started: 
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll [External]
Thread started: 
Thread started: 
Loaded assembly: ObjCImplementations [External]
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Design/4.0.0.0__b03f5f7f11d50a3a/System.Design.dll [External]
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll [External]
Thread finished: 
Thread started: 
Thread started: 
Thread started: 
Thread started: <---- These pop up every time you go back to the secondary window from the primary window
Thread started: 
… 
Thread started: 
Thread started: 
Thread started: 
Stacktrace:

  at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <IL 0x0009d, 0xffffffff>
  at MonoMac.AppKit.NSApplication.Main (string[]) [0x00000] in /cvs/monomac/src/AppKit/NSApplication.cs:74
  at StreamDesk.MainClass.Main (string[]) [0x0000f] in /Users/michaelmanley/Desktop/NasuTek-StreamDesk/StreamDesk-Cocoa/StreamDesk/Main.cs:22
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

    0   StreamDesk                          0x00094efc mono_handle_native_sigsegv + 284
    1   StreamDesk                          0x00004fe8 mono_sigsegv_signal_handler + 248
    2   libSystem.B.dylib                   0x006db05b _sigtramp + 43
    3   ???                                 0xffffffff 0x0 + 4294967295
    4   AppKit                              0x04b80255 -[NSControl sendAction:to:] + 108
    5   AppKit                              0x04b7bd02 -[NSCell _sendActionFrom:] + 169
    6   AppKit                              0x04b7aff9 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1808
    7   AppKit                              0x04bd06ed -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 524
    8   AppKit                              0x04b79a4f -[NSControl mouseDown:] + 812
    9   AppKit                              0x04b77a58 -[NSWindow sendEvent:] + 5549
    10  AppKit                              0x04a9060b -[NSApplication sendEvent:] + 6431
    11  AppKit                              0x04a24253 -[NSApplication run] + 917
    12  AppKit                              0x04a1c289 NSApplicationMain + 574
    13  ???                                 0x0d7d9b76 0x0 + 226335606
    14  ???                                 0x0d7d9974 0x0 + 226335092
    15  ???                                 0x00dee048 0x0 + 14606408
    16  ???                                 0x00dee1be 0x0 + 14606782
    17  StreamDesk                          0x0000d282 mono_jit_runtime_invoke + 722
    18  StreamDesk                          0x001a436a mono_runtime_invoke + 170
    19  StreamDesk                          0x001a6f01 mono_runtime_exec_main + 705
    20  StreamDesk                          0x001a6111 mono_runtime_run_main + 929
    21  StreamDesk                          0x00069995 mono_jit_exec + 149
    22  StreamDesk                          0x0006bf13 mono_main + 9587
    23  StreamDesk                          0x00002299 main + 441
    24  StreamDesk                          0x000020a6 start + 54
    25  ???                                 0x00000001 0x0 + 1

The exception can differ, which makes debugging this issue hard, the only way I know i can reproduce it is by going back and forth from the Main Window, and back to the Secondary window, after a while, the application will terminate

Am I doing the wrong way to show a dialog, or is this a bug with Mono itself, but I dought Mono could be having a massive bug of this scale where you cant even display other windows.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T16:30:49+00:00Added an answer on May 29, 2026 at 4:30 pm

    The issue is that a managed object is getting freed before it’s corresponding native object. Then the native object tries to call a method on the managed object, and the app crashes.

    You can probably make it more reproducible by running the GC every second:

    ThreadPool.QueueUserWorkItem ((v) =>
    {
        while (true) {
            Thread.Sleep (1000);
            GC.Collect (GC.MaxGenerations);
        }
    });
    

    This is where things go wrong:

    3   ???        0xffffffff 0x0 + 4294967295
    4   AppKit     0x04b80255 -[NSControl sendAction:to:] + 108
    

    it looks like the problem is with a NSControl (or derived) instance. Besides this it’s hard to say which object is actually getting freed with the information available. The easiest way to figure it out is probably to keep objects artificially alive (adding them to a static list for instance), and then reduce the subset of the objects you keep alive until you’ve pinpointed the exact instance which is causing the crash.

    Once you’ve found out which object are getting prematurely freed you’ll have to ensure the GC doesn’t free it too early (one method is to add it to a static list, but the best approach depends on each case).

    Have in mind that the object doesn’t have to be an object you create explicitly in your code, it can also be delegates or event handlers for instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
I am writing an app for my school newspaper, which is run completely online
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.