[Mono-dev] .net winforms and windows
robwilkens at gmail.com
Wed Jun 13 19:42:20 UTC 2012
I wanted to think about what to work on next, and i wonder if anyone has
an opinion on this:
In my testing of .net winforms on windows i received a lot of gdi+
object busy errors when i was testing a multithreaded app, regardless of
what thread the form was 'created' in (what thread the form was shown in
may have been a factor). This only happened on Win32, and caused
crashes in the apps when it occurred.
If there really is an issue with gdi+ objects being busy because they
are being accessed from both threads, then perhaps (and i haven't looked
at the code yet) -- well, perhaps the calls to gdi+ should be made
thread safe or at least thread "safer". i.e. Something as simple as
creating a gdi+ lock or something similar, and before anything tries to
access gdi+ acquire the lock (at least on win32, which is the only place
this seemed to be an issue). IT should be better to make an app wait
for a thread to finish using gdi+ (wait for the lock) then for otherwise
the application to crash altogether in a WmPaint command.
i know winforms, unofficially offically, is dead, but this seems like a
simple enough thing to try to correct.
More information about the Mono-devel-list