EnterCriticalSection throws exception?

Huang, Zhangrong hzhrong at gmail.com
Thu Jul 3 10:31:16 CDT 2008


2008/7/3 Maarten Lankhorst <m.b.lankhorst at gmail.com>:
> Hello,
> I think that is a bad idea, while there might be 1 or 2 real genuine
> uses for only throwing an exception while debugging, 99% of the time
> it's really wine deadlocking itself, it's wine's own fault and I would
> rather see the backtraces of the deadlock rather then the app hanging
> forever.

OK, my thoughts:

1. A patch for Wine that throws exception for Wine internal locks only
when debug is present, so after waiting for 65 seconds, some apps
don't crash. Of course if you run app under debugger, you get
exception to check deadlock.

2. Another patch to implement the missing timeout feature, Wine checks
the timeout value NtCurrentTeb()->Peb->CriticalSectionTimeout which
comes from registry
Manager\CriticalSectionTimeout, then throws EXCEPTION_POSSIBLE_DEADLOCK..
So if you want to check deadlock, setting the registry value to 30
seconds or 60 seconds or any value you want.

$ apt-get moo
 / | ||
 * /\---/\
 ~~ ~~
...."Have you mooed today?"...

More information about the wine-devel mailing list