Re: Application Unexpectedly Terminates
From: Rich Hanbidge [MSFT] (richhan_at_online.microsoft.com)
Date: 06/30/04
- Next message: Ginny Caughey [MVP]: "Re: Loading Data into DataSet From XML"
- Previous message: Art Cabot: "Re: Loading Data into DataSet From XML"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 30 Jun 2004 01:38:49 GMT
Do you have access to eVC?
eVC provides a JIT (Just In Time) Debugger which you can install. If your
application is getting killed by the OS because of an unhandled exception,
the JIT will catch it and prompt you to attach eVC to the process.
Remember that you need to soft reset your device after you install the JIT.
The OS requires this.
Good luck!
Rich Hanbidge
Visual Studio for Devices
Microsoft Corp.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: Application Unexpectedly Terminates
| thread-index: AcRCfKkTfUhkN8ihQd+BG59SP6NHsA==
| X-WN-Post: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?TWFyayBBcnRlYWdh?= <ng_[at]_markarteaga_[dot]_com>
| References: <ueW4kMlQEHA.1340@TK2MSFTNGP12.phx.gbl>
<4ED41613-A309-4B7A-B611-A1E4C11E9E65@microsoft.com>
<#CQGjQnQEHA.3660@tk2msftngp13.phx.gbl>
<924AF2BB-DF89-472B-9B2B-9963FE8DCD4A@microsoft.com>
| Subject: Re: Application Unexpectedly Terminates
| Date: Tue, 25 May 2004 10:21:05 -0700
| Lines: 5
| Message-ID: <DB3D49A9-5D81-463C-976A-4C7C2E751077@microsoft.com>
| 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:53920
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Clicked the "Send" button too soon...here is the rest of my message....
We still recieve the WM_Close we just don't dispatch the message to the
application which stops the application from shutting down. So far this
hasn't caused a problem and everything works fine. It's not the best
solution but for now it's working for now. From my testing I have a
feeling the root cause is the application is running out of memory because
of all the graphics we use and is around 20+ forms. Currently our app is
almost 7MB and more than half is graphics. Let me know what you find. It
would be nice to know if I'm on the right track or not.
Mark.
|
From: =?Utf-8?B?TWFyayBBcnRlYWdh?= <ng_[at]_markarteaga_[dot]_com>
Subject: Re: Application Unexpectedly Terminates
Date: Tue, 25 May 2004 10:26:06 -0700
Newsgroups: microsoft.public.dotnet.framework.compactframework
I suspected it was a memory problem after reading the documentation. That's
why i started tracking WM_CLOSE and WM_Hibernate. My only question is we
never recieve a WM_Hibernate which is the message that is sent when we
should start freeing up resources. Is that message surpressed by the CLR
since that's what should be handling memory and not the CF Application?
----- Chris Tacke, eMVP wrote: -----
"Unsolicited" WM_CLOSE messages can occur. If the device runs low on
memory,
the device manager will notify apps that they need to reduce their
memory
footprint if possible. If after that it is still low, it will start
closing
apps. The current app is usually last to die, but if your app is
running in
the "background" then it could easily be killed.
--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com
"Bill D" <bdraper@ASKME.com> wrote in message
news:%23CQGjQnQEHA.3660@tk2msftngp13.phx.gbl...
> Mark,
>> Thanks for the reply. In your case, it sounds like your app was
unexpectedly
> closing, but you were getting a WM_CLOSE event on the way out? Since
you
put
> this trap in for that event, are you still ever seeing an
'unsolicited'
> WM_CLOSE being sent to your application to shut it down? It would be
good
to
> know the root cause of this if it's still happening. From this, we
will
put
> code in to see if we are seeing a WM_CLOSE on the way out. I'll let
you
know
> what we find...
>> Thanks again,
> Bill
>>> "Mark Arteaga" <ng_[at]_markarteaga_[dot]_com> wrote in message
> news:4ED41613-A309-4B7A-B611-A1E4C11E9E65@microsoft.com...
>> I had a similar problem but I was getting my form objects disposed
for
no
> reason and then eventually the application would get shutdown. I
assumed
it
> was a memory problem because the app, like yours is very graphics
intensive
> and runs multiple threads accessing webservices. What I did was
trap the
> WM_CLOSE notification (using the ApplicationEX from OpenNETCF.org)
and
> ignored that message so the application wouldn't close. When this
message
> was received we tried to release as many resouces as possible(mainly
UI)
and
> force a garbage collection. Our application will be the only
application
> running on the device so I don't expect this to be a problem. We
also
tried
> to trap WM_HIBERNATE to try and release resources before we were
forced to
> shutdown (WM_CLOSE) but for some reason that message didn't come
through
to
> the application.
>>>> The other thing to remember is every process runs in a maximum of
32mb.
> Check out this link
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemain4/ht
ml/_wcesdk_Windows_CE_Memory_Architecture.asp
> for more details on the WinCE Mem Architecture.
>>>> So far the solution above seems to work and haven't experienced
any
> problems. It's been running for 2-3 mths under development stage.
I'll
> know if it really works once it goes into testing!! If someone sees
anything
> wrong with the above I would like to hear about it :)
>>>> BTW I'm running CE 4.2, all QFEs, SP2, and a custom board.
>>>> Mark Arteaga
>>>>>>>>>>>>
- Next message: Ginny Caughey [MVP]: "Re: Loading Data into DataSet From XML"
- Previous message: Art Cabot: "Re: Loading Data into DataSet From XML"
- Messages sorted by: [ date ] [ thread ]