Re: Native exception with asynchronous Tacke-stack
From: Chris Tacke, eMVP (ctacke_at_spamfree-opennetcf.org)
Date: 03/22/04
- Next message: casey chesnut: "Re: DIME attachment"
- Previous message: Chris Tacke, eMVP: "Re: Tab Oreder"
- In reply to: .pd.: "Native exception with asynchronous Tacke-stack"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Mar 2004 09:36:42 -0500
I've not looked at the code, but if you're using a thread to asynchronously
load the Form that may be a problem. UI changes off the primary thread can
cause problems.
-- Chris Tacke, eMVP Co-Founder and Advisory Board Member www.OpenNETCF.org --- Windows CE Product Manager Applied Data Systems www.applieddata.net ".pd." <spam.me@your.peril> wrote in message news:Xns94B4800B78865spammeyourperil@194.83.179.102... > Hello, > > In an effort to speed up form loading, I modified Chris Tacke's FormStack > example in these ways: > > -- Added 2 ManualResetEvents to the StackForm class - Create and > InitComp. > -- Added a ManualResetEvent to the FormStack class - preLoadDone. > -- Added a Flip method to the FormStack class which would push a form > onto the stack and pop the previous top one. > -- Add a bool to the Push() method arg list - if true, form creation is > done in a thread. I set the Create event when complete. Once PreLoad > has instantiated the form, preLoadDone is set indicating that Push() may > safely return the address of the new form. > > From Main, I push 1 synchronous form on the stack and then push a 2nd > asynchronous form. > > The first form has a button on it whose click event waits for the 2nd's > form's Create event and then calls the stack Flip method for them to > change places. > > Form2's Load event tries to add a button to itself and there's an > ArgumentException. When I try to examine anything in the debugger, > VS.NET 2003 hangs and I get a NativeException thrown in the PPC 2003 > emulator. > > I'm still quite new to all this so I probably am doing something wrong > but for managed code to be crashing in this way, I can't escape the > suspicion the bug lies elsewhere. > > My short, complete example VS.NET 2003 solution can be downloaded here: > > https://plus.xdrive.com/s/9582618402HPfL3vYgbozwsVuyQQ?partner=plus > > And any help would be very much appreciated, > > Cheers, > .pd.
- Next message: casey chesnut: "Re: DIME attachment"
- Previous message: Chris Tacke, eMVP: "Re: Tab Oreder"
- In reply to: .pd.: "Native exception with asynchronous Tacke-stack"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|