maditude | 8 Feb 2011 02:15

MessageBox.Show() hangs on osx


In a couple of places in my app, I either show a MessageBox for information
purposes, or to get confirmation of some destructive action.  But my one and
only Mac user reports that the whole application just hangs on any of these
-- sometimes while the popup is visible, and sometimes before the popup is
even shown.  He's also very familiar with the windows version, so knows what
to expect.

Anyone else run into this?  There's absolutely no threading issues going on,
and I don't have a clue what's going on.
--

-- 
View this message in context: http://mono.1490590.n4.nabble.com/MessageBox-Show-hangs-on-osx-tp3265510p3265510.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

bpipe | 10 Feb 2011 16:59
Picon
Gravatar

MessageBox.Show() segmentation fault in Mac OS X


I have a simple WinForms app, which was created and complied under VS2010,
it's Form with button which show MessageBox on click. I tried lunching this
under Mac OS X 10.6.6 with MonoFramework-2.8.2_1.macos10.novell.x86 but mono
crashes with segmentation fault. Same happens if i try to call
Form.ShowDialog(), or try to open any child window... MainForm works though. 

Crash Report:Process:         mono [580] 
Path:            /usr/bin/mono 
Identifier:      mono 
Version:         ??? (???) 
Code Type:       X86 (Native) 
Parent Process:  bash [342] 

Date/Time:       2011-02-10 18:44:34.110 +0300 
OS Version:      Mac OS X 10.6.6 (10J567) 
Report Version:  6 

Exception Type:  EXC_BAD_ACCESS (SIGSEGV) 
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000bf7fff7c 
Crashed Thread:  0  Dispatch queue: com.apple.main-thread 

HandlerCallRec*) + 1567 
505 com.apple.HIToolbox           0x919b5196
SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*,
HandlerCallRec*) + 411 
506 com.apple.HIToolbox           0x919b4ff5
SendEventToEventTargetWithOptions + 58 
507 com.apple.HIToolbox           0x91a40397 PostActivateEvent + 353 
508 com.apple.HIToolbox           0x91a3f962 HiliteAndActivateWindow + 418 
(Continue reading)

bpipe | 10 Feb 2011 17:13
Picon
Gravatar

Re: MessageBox.Show() hangs on osx


I have the same problem, I wrote my first test WinForms app with single
button and MessageBox.Show() and it hangs. And if i try to launch it without
specifying mono --security=cas OR core-CLR, mono crashes with segmentation
fault, I already wrote 1 hour ado about it. 
This is my first experience with mono, and Mac OS X, (i use both for the
first time) so maybe i'm doing something stupid.. (but i'm pro C#
programmer)
--

-- 
View this message in context: http://mono.1490590.n4.nabble.com/MessageBox-Show-hangs-on-osx-tp3265510p3299469.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

bpipe | 10 Feb 2011 17:15
Picon
Gravatar

Re: MessageBox.Show() segmentation fault in Mac OS X


I tried setting different mono --security= options and it show MEssageBox
with Core-CLR or CAS (i have no idea what it means) but app freezes after
this.
--

-- 
View this message in context: http://mono.1490590.n4.nabble.com/MessageBox-Show-segmentation-fault-in-Mac-OS-X-tp3299443p3299470.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Robert Jordan | 10 Feb 2011 17:25
Picon
Gravatar

Re: MessageBox.Show() segmentation fault in Mac OS X

On 10.02.2011 16:59, bpipe wrote:
>
> I have a simple WinForms app, which was created and complied under VS2010,
> it's Form with button which show MessageBox on click. I tried lunching this
> under Mac OS X 10.6.6 with MonoFramework-2.8.2_1.macos10.novell.x86 but mono
> crashes with segmentation fault. Same happens if i try to call
> Form.ShowDialog(), or try to open any child window... MainForm works though.

AFAIK, this was fixed subsequent Mono versions, but for some
reason these versions are not linked from the download page.

You can download Mono 2.8.2_5 (x86) from here:

http://ftp.novell.com/pub/mono/archive/2.8.1/macos-10-x86/5/

Robert

_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Robert Jordan | 10 Feb 2011 17:27
Picon
Gravatar

Re: MessageBox.Show() segmentation fault in Mac OS X

On 10.02.2011 17:15, bpipe wrote:
>
> I tried setting different mono --security= options and it show MEssageBox
> with Core-CLR or CAS (i have no idea what it means) but app freezes after
> this.

mono --security is an experimental feature. It won't fix your issue
anyway. See my answer to you original post.

Robert

_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

bpipe | 11 Feb 2011 02:28
Picon
Gravatar

Re: MessageBox.Show() hangs on osx


Try setting X11 render mode. export MONO_MWF_MAC_FORCE_X11=1
--

-- 
View this message in context: http://mono.1490590.n4.nabble.com/MessageBox-Show-hangs-on-osx-tp3265510p3300604.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Mihai | 11 Feb 2011 22:43
Picon
Favicon

Problem: "Drawing" and "Windows" not recognised


I tried to compile a .cs file that includes the directives "using
System.Drawing;" and "using System.Windows.Forms; ", but Mono gives two
error messages: 

"The type or namespace 'Drawing' does not exist in the namespace 'System'.
Are you missing an assembly reference?"
"The type or namespace 'Windows' does not exist in the namespace 'System'.
Are you missing an assembly reference?"

I managed to compile the same file in Visual Studio, so I wonder what I need
to do in order to have files of this kind compiled in Mono too?

If anyone can help me with this, thank you in advance.
--

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Problem-Drawing-and-Windows-not-recognised-tp3302075p3302075.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

MrFreeman | 12 Feb 2011 00:47
Picon

Re: Problem: "Drawing" and "Windows" not recognised


Greetings,

Have you right clicked the "References" in the solution explorer and added
"System.Drawing" and "System.Windows.Forms" to the project? I don't have the
IDE in front of me, but see if you can give that a try.

~MrFreeman
--

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Problem-Drawing-and-Windows-not-recognised-tp3302075p3302226.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Mihai | 12 Feb 2011 02:54
Picon
Favicon

Re: Problem: "Drawing" and "Windows" not recognised


Thank you, MrFreeman. In the meantime I managed to solve the problem adding
the following two flags after gmcs: /reference:System.Drawing
/reference:System.Windows.Forms . I think this is exactly what you meant for
Visual Studio, but there I need not add anything; the two assembly
references were presumably added by default.

--

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Problem-Drawing-and-Windows-not-recognised-tp3302075p3302302.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list


Gmane