[Mono-dev] .net winforms and windows
robwilkens at gmail.com
Wed Jun 13 21:40:03 UTC 2012
[long story short: Got to troubleshoot some more, but the answer is that
these apps are functional in windows, attached a sample]
In Windows.NET it definitely works, both the code sample from the bug
report (which, incidentally, is not running for me right now, so i've
pulled back my pull request while i investigate, if i figure out why i
will reopen it, i haven't troubleshot that yet).. My test code
(attached) runs fine in Windows .net, doesn't crash once, and i just ran
it from the command prompt about 30-40 times in a row in .net. So that
should run in mono, no?
In unpatched mono in windows, my code leaves two windows open, and after
you close that it will say 'error' because the would-be assertions fail.
In mono with my patch, it passed, but it crashed every 5-10 runs,
unrelated, i beleive, to my patch but more to the rest of the code now
being run because of the patch. Yesterday i was getting GDI+ Object
Busy, I can't reproduce that now, but that could be any number of things
such as timing.
The crash I'm occasionally getting in my app now may have something to
do with the change in response to your message yesterday about needing
to call invoke (the form was created in thread 1, invoke is being called
in thread 3[the 2nd thread]). But the form was shown with a call to
Application.Run(form2) in thread 2, because i couldn't figure another
easy way to make the application.run loop to exit on its own at the end
of execution (I tried several methods, none worked).
The crash I've traced twice to here (again in Windows .NET this does not
crash) using gdb:..
#8 0x02733612 in ?? ()
#9 0x027333c1 in ?? ()
#10 0x659cb7ac in mono_jit_runtime_invoke (method=0x5bee70, obj=0x2f709d8,
params=0x393ff44, exc=0x0) at mini.c:5897
#11 0x65b235d2 in mono_runtime_invoke (method=0x5bee70, obj=0x2f709d8,
params=0x393ff44, exc=0x0) at object.c:2809
#12 0x65b24237 in mono_runtime_delegate_invoke (delegate=0x2f709d8,
params=0x393ff44, exc=0x0) at object.c:3489
#13 0x65b4ef76 in start_wrapper (data=0x2ff3d68) at threads.c:577
#14 0x65b7452a in inner_start_thread (arg=0x2ff3990)
#15 0x7670339a in KERNEL32!BaseCleanupAppcompatCacheSupport ()
#16 0x02ff3990 in ?? ()
#17 0x770f9ef2 in ntdll!RtlpNtSetValueKey ()
---Type <return> to continue, or q <return> to quit---ls ~
#18 0x02ff3990 in ?? ()
#19 0x770f9ec5 in ntdll!RtlpNtSetValueKey ()
#20 0x65b744e0 in mono_threads_platform_free ()
But again, this doesn't seem to crash every or most times, and is
unrelated to my patch, only to my test.
And i still have to first debug the original sample code..
I'll try to make sure my code sample and the sample from the bug report
work before i re-open my pull request. Both run fine on Windows 7 with
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2765 bytes
Desc: not available
More information about the Mono-devel-list