Re: Native exception with asynchronous Tacke-stack

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Chris Tacke, eMVP (ctacke_at_spamfree-opennetcf.org)
Date: 03/22/04


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.


Relevant Pages

  • Re: what does PUSH BP, MOV BP, SP do? (stack)
    ... push 16Bit to stack ... stackpointer to bp ... load 8Bit from stack ...
    (comp.lang.asm.x86)
  • Re: Is it wise to push all-in early in a tournament?
    ... The best times to make a push play ... But why call when you can push and take down a nice pot when your opponent ... But remember that if this "big bet" is a significant portion of your stack, ... I consider it my goal in any tournament to do the latter as much as ...
    (rec.gambling.poker)
  • Re: Is it wise to push all-in early in a tournament?
    ... whether or not the rest of the table is splashing chips around. ... I may push more than I want to and you may be more conservative than ... Do I want to play this opponent after the flop? ... push at anytime and I may not want to risk my stack on a suckout when I ...
    (rec.gambling.poker)
  • Virtual machine: assembly instructions
    ... push; Push the address of the first variable onto the stack ... itof: convert integer to float ... If top+1 of int stack is less than top; push true else push false ...
    (comp.programming)
  • Re: Using C and Assembly code: 64Bit Calling convention
    ... RSP holds 1210 at this point. ... 0's local stack area. ... you start to push or move anything onto the stack. ... The only exception from this rule ...
    (comp.lang.asm.x86)