Diiference in threading on PPC 2002 and PPC 2003? ( Deadlock on PPC 2002, runs fine on PPC 2003. )

Diiference in threading on PPC 2002 and PPC 2003? ( Deadlock on PPC 2002, runs fine on PPC 2003. )

Post by Jan Obrest » Tue, 04 Apr 2006 21:33:14


I have an application, developed in Visual Studio 2003 and running CF
1.0, where I have two threads saving to the database. I have used the
SyncLock keyword in VB.Net to prevent both threads saving at the same
time.
On a machine running Pocket PC 2003, it works fine. But when I try using
it on Pocket PC 2002 it goes into a deadlock. The foreground thread
waits for the locked object, but the background thread seems not to run
(doesn't hit breakpoints in debug mode).

Does anyone know of any difference in how threading is done on PPC 2002
and PPC 2003 that might account for this strange behaviour?
Is there something I can do to avoid this?
 
 
 

Diiference in threading on PPC 2002 and PPC 2003? ( Deadlock on PPC 2002, runs fine on PPC 2003. )

Post by Daniel Mot » Tue, 04 Apr 2006 21:41:23

Nothing specific comes to mind (even though the underlying core OS versions
are different).

The first thing I would, before comparing platform versions, is make sure
that the NETCF versions are the same (down to the Service Pack):
http://www.yqcomputer.com/ %2FDeterminingVersion

If they are the same, then I would create a small repro and post it here for
feedback...

Cheers
Daniel

 
 
 

Diiference in threading on PPC 2002 and PPC 2003? ( Deadlock on PPC 2002, runs fine on PPC 2003. )

Post by Ilya Tuman » Wed, 05 Apr 2006 03:57:37

I would suggest installing NETCF V2 and running application against it with
compatibility mode disabled using this config file:

<configuration>
<runtime>
<compatibilityversion major="2" minor="0"/>
</runtime>
<startup>
<supportedRuntime version="v2.0.5056"/>
</startup>
</configuration>

as described here:
http://www.yqcomputer.com/

I have a feeling you're going to get NotSupportedException with this error
message:

Control.Invoke must be used to interact with controls created on a separate
thread.

--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://www.yqcomputer.com/
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).