Well, we probably can eliminate DateTimePicker as it's a UI control and it
should work in a UI thread.
InTheHand (I assume you're using CE DB provider?) is probably also low risk.
Now, what are you using from SDF? I'm pretty sure some classes in SDF can
fire events on another threads.
'Player' class is a good candidate for that.
The best way to go is to actually check if event is fired on another
thread. Code below will do it for you.
Just call TDebug.Initialize() from UI thread (say, from
InitializeComponent()) and insert calls to TDebug.Check() into suspicious
event handlers (i.e. none UI components).
You will get an exception if event is on another thread. If your project is
in VB, compile this code as a separate C# project, get a DLL and reference
it in your VB project.
Note: there's a value you might have to change if you running on device
other than ARM. All PPC2002 and 2003 are ARM based.
As to data storage, are you sure data is actually saved? Which data storage
are you using?
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
using System;
namespace ThreadDebug
{
public class TDebug
{
const uint PUserKData = 0xFFFFC800; // Change to 0x00005800 if not ARM
CPU (i.e. emulator).
const uint SYSHANDLE_OFFSET = 0x004;
const uint SH_CURTHREAD = 1;
static uint baseThreadId = 0;
public static void Initialize()
{
baseThreadId = GetCurrentThreadId();
}
public static void Check()
{
if (0 == baseThreadId)
{
throw new Exception("You have to call Initialize() before calling
Check()");
}
if (baseThreadId != GetCurrentThreadId())
{
throw new Exception("Another thread detected!");
}
}
static unsafe uint GetCurrentThreadId()
{
return ((uint*)(PUserKData+SYSHANDLE_OFFSET))[SH_CURTHREAD];
}
}
}
--------------------
Thread-Topic: Possible reasons application is locking up?
thread-index: AcQoQKf3YcHQuSYsQMq5zrIneZ1lzA==
X-WN-Post: microsoft.public.dotnet.framework.compactframework
From: "=?Utf-8?B?TWlrZQ==?=" <
[email protected]>
References: <
[email protected]>
<eWUqr8#
[email protected]>
<
[email protected]>
<
[email protected]>
Subject: Re: Possible reasons application is locking up?
Date: Thu, 22 Apr 2004 01:06:03 -0700
Lines: 9
Message-ID: <
[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.compactframework
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:51500
NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
Ilya,
Thanks for the suggestions. Lets see, I do have a timer in the app but it
is just for displaying a splash screen and then I'm done with that. I do
have a few 3rd party controls with events, but they are some of the more
common ones. OpenNet SDF, Intelliprog DateTimePicker and InTheHand (dont
know if your familiar). Again, I would think that if any of these were the
problem that the locking up would happen when I'm doing something related
to them but that doesnt seem to be the case.
To complicate matters, it appears as if I may be losing some data if the
app locks up and the user has to do a soft reset. This also makes no sense
to me as if a record gets written to a data table via 'DataAdapter.Udpate'
shouldnt it be there permantly whether or not I soft reset the device?
Thanks
Mike