.NETCF and App Freezes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible, that if I have an application that locks up occasionally,
that it has nothing to do with my programming? In other words, are lockups
or freezes just part of using the Pocket PC's and the .NETCF or is it most
likely related to programming mistakes?

Thanks

Mike
 
Most common reason for CF app to freeze is updating UI from another thread.
If you're using additional threads, make sure Control.Invoke() is in place
to update UI from these threads.
Note threads might be created indirectly if you're using asynchronous
methods, like Begin*.

Best regards,

Ilya

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

--------------------
 
Ilya, I am aware of this issue and am 99% sure that I am not doing this
(updating UI from another thread). My app gets used 6-8 hours a day and has
a lock up (seemingly random) maybe once every 2 days on average. So my
question is, is it a fruitless effort to continue to try disect my code?
Could this just be the Windows Mobile OS?



"Ilya Tumanov [MS]" said:
Most common reason for CF app to freeze is updating UI from another thread.
If you're using additional threads, make sure Control.Invoke() is in place
to update UI from these threads.
Note threads might be created indirectly if you're using asynchronous
methods, like Begin*.

Best regards,

Ilya

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

--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8lUMt4ETKfbVvTwmOB9to4bVJZw==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
Subject: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 16:47:02 -0700
Lines: 8
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.compactframework:26620
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Is it possible, that if I have an application that locks up occasionally,
that it has nothing to do with my programming? In other words, are lockups
or freezes just part of using the Pocket PC's and the .NETCF or is it most
likely related to programming mistakes?

Thanks

Mike
 
It could be the OS, but it's not likely. OS is not hanging, just the app,
is that right?
If you're sure it's not UI threading issue, could it be some sort of race
condition?
Perhaps, it's a CF issue. Can you run it under CF V2 beta (2 CTP) and see
if it locks up?

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8nnrtAcAB1YJkRF2RUl2xvM1X6g==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
References: <[email protected]>
Subject: RE: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 17:53:01 -0700
Lines: 60
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.compactframework:26622
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Ilya, I am aware of this issue and am 99% sure that I am not doing this
(updating UI from another thread). My app gets used 6-8 hours a day and has
a lock up (seemingly random) maybe once every 2 days on average. So my
question is, is it a fruitless effort to continue to try disect my code?
Could this just be the Windows Mobile OS?



"Ilya Tumanov [MS]" said:
Most common reason for CF app to freeze is updating UI from another thread.
If you're using additional threads, make sure Control.Invoke() is in place
to update UI from these threads.
Note threads might be created indirectly if you're using asynchronous
methods, like Begin*.

Best regards,

Ilya

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

--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8lUMt4ETKfbVvTwmOB9to4bVJZw==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
Subject: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 16:47:02 -0700
Lines: 8
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.compactframework:26620
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Is it possible, that if I have an application that locks up occasionally,
that it has nothing to do with my programming? In other words, are lockups
or freezes just part of using the Pocket PC's and the .NETCF or is it most
likely related to programming mistakes?

Thanks

Mike
 
Getting it to lock up is the maddening thing about it! I can sit here for
hours using it and it wont lock up, yet the field users report occasional
lockups. Therefore it is hard, if not impossible, to debug. Is there a
proven methodology to figure out how or where I may be updating the UI from
another thread? I do have a multiple form application, which might make it
that much more likely that I am updating the UI from another thread, but I
have tried to be careful not to. I guess it just might take me going through
my code for the 10th time!



"Ilya Tumanov [MS]" said:
It could be the OS, but it's not likely. OS is not hanging, just the app,
is that right?
If you're sure it's not UI threading issue, could it be some sort of race
condition?
Perhaps, it's a CF issue. Can you run it under CF V2 beta (2 CTP) and see
if it locks up?

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8nnrtAcAB1YJkRF2RUl2xvM1X6g==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
References: <[email protected]>
Subject: RE: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 17:53:01 -0700
Lines: 60
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.compactframework:26622
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Ilya, I am aware of this issue and am 99% sure that I am not doing this
(updating UI from another thread). My app gets used 6-8 hours a day and has
a lock up (seemingly random) maybe once every 2 days on average. So my
question is, is it a fruitless effort to continue to try disect my code?
Could this just be the Windows Mobile OS?



"Ilya Tumanov [MS]" said:
Most common reason for CF app to freeze is updating UI from another thread.
If you're using additional threads, make sure Control.Invoke() is in place
to update UI from these threads.
Note threads might be created indirectly if you're using asynchronous
methods, like Begin*.

Best regards,

Ilya

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

--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8lUMt4ETKfbVvTwmOB9to4bVJZw==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
Subject: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 16:47:02 -0700
Lines: 8
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.compactframework:26620
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Is it possible, that if I have an application that locks up occasionally,
that it has nothing to do with my programming? In other words, are
lockups
or freezes just part of using the Pocket PC's and the .NETCF or is it
most
likely related to programming mistakes?

Thanks

Mike
 
Actually, there is. CF V2 will instantly throw an exception should you try
to update UI from another thread.
You can recompile your app for V2 or you can run it as it is with correct
configuration file.

At some point we've added app compatibility thingy which would mimic V1
behavior for V1 apps and won't throw.
However, I believe that could be disabled. Beta 1 should throw anyway.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8pTDV3KIxeaIjR++V4da4jO7e6g==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
References: <[email protected]>
<[email protected]>
Subject: RE: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 18:41:03 -0700
Lines: 121
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.compactframework:26625
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Getting it to lock up is the maddening thing about it! I can sit here for
hours using it and it wont lock up, yet the field users report occasional
lockups. Therefore it is hard, if not impossible, to debug. Is there a
proven methodology to figure out how or where I may be updating the UI from
another thread? I do have a multiple form application, which might make it
that much more likely that I am updating the UI from another thread, but I
have tried to be careful not to. I guess it just might take me going through
my code for the 10th time!



"Ilya Tumanov [MS]" said:
It could be the OS, but it's not likely. OS is not hanging, just the app,
is that right?
If you're sure it's not UI threading issue, could it be some sort of race
condition?
Perhaps, it's a CF issue. Can you run it under CF V2 beta (2 CTP) and see
if it locks up?

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8nnrtAcAB1YJkRF2RUl2xvM1X6g==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
References: <[email protected]>
Subject: RE: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 17:53:01 -0700
Lines: 60
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.compactframework:26622
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Ilya, I am aware of this issue and am 99% sure that I am not doing this
(updating UI from another thread). My app gets used 6-8 hours a day
and
has
a lock up (seemingly random) maybe once every 2 days on average. So my
question is, is it a fruitless effort to continue to try disect my code?
Could this just be the Windows Mobile OS?



:

Most common reason for CF app to freeze is updating UI from another thread.
If you're using additional threads, make sure Control.Invoke() is
in
place
to update UI from these threads.
Note threads might be created indirectly if you're using asynchronous
methods, like Begin*.

Best regards,

Ilya

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

--------------------
Thread-Topic: .NETCF and App Freezes
thread-index: AcU8lUMt4ETKfbVvTwmOB9to4bVJZw==
X-WBNR-Posting-Host: 24.21.97.212
From: "=?Utf-8?B?TWlrZQ==?=" <[email protected]>
Subject: .NETCF and App Freezes
Date: Fri, 8 Apr 2005 16:47:02 -0700
Lines: 8
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
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.compactframework:26620
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Is it possible, that if I have an application that locks up occasionally,
that it has nothing to do with my programming? In other words, are
lockups
or freezes just part of using the Pocket PC's and the .NETCF or is it
most
likely related to programming mistakes?

Thanks

Mike
 
Back
Top