Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 93383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:20:09+00:00 2026-05-10T23:20:09+00:00

Ok, so I have a very simple form with next to no logic in

  • 0

Ok, so I have a very simple form with next to no logic in it that is controlled by by a presenter. There is a method on it public void Reset() that resets the form to its initial state. This should be called only by the presenter and in very specific cases (such as an activity timeout). I am running into a problem though where in a few edge cases (When I’m simulating my application losing database connectivity for example) the Reset() method is getting called when it shouldn’t be and I can’t figure out by what.

So I set up a tracepoint at the Reset() method and have it print the callstack. Strangely enough that raised even more questions. Can anyone help me figure out where the call to Reset() is coming from? My callstack is below.

One thing I should explain is DriverInterface2.UI.WinForms.NonInheritingForms.CheckInForm which you can see in the callstack. That is a very simple implementation of ICheckInForm (the relavant interface) and simply creates CheckInForm and delegates to it. It is there only because I am using castle windsor and wiring up classes that inherit from Form gets awful messy. In any case, the full contents of that method is this:

public void Reset() {_form.Reset();} 

And here’s the callstack:

Function: DriverInterface2.UI.WinForms.CheckInForm.Reset(),  Thread: 0xA96F4 Main Thread,  Caller: DriverInterface2.UI.WinForms.NonInheritingForms.CheckInForm.Reset,  Callstack:  DriverInterface2.UI.WinForms.dll!DriverInterface2.UI.WinForms.CheckInForm.Reset     DriverInterface2.UI.WinForms.dll!DriverInterface2.UI.WinForms.NonInheritingForms.CheckInForm.Reset     [Native to Managed Transition]     [Managed to Native Transition]     mscorlib.dll!System.Delegate.DynamicInvokeImpl     System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo     System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper     mscorlib.dll!System.Threading.ExecutionContext.runTryCode     [Native to Managed Transition]     [Managed to Native Transition]     mscorlib.dll!System.Threading.ExecutionContext.RunInternal     mscorlib.dll!System.Threading.ExecutionContext.Run     System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallback     System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks     System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc     System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc     System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.WndProc     System.Windows.Forms.dll!System.Windows.Forms.Form.WndProc     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage     System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc     System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback     [Native to Managed Transition]     [Managed to Native Transition]     System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop     System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner     System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop     System.Windows.Forms.dll!System.Windows.Forms.Application.Run     DriverInterface2.exe!DriverInterfaceRunner.Program.Main     [Native to Managed Transition]     [Managed to Native Transition]     mscorlib.dll!System.AppDomain.ExecuteAssembly     Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly     mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context     mscorlib.dll!System.Threading.ExecutionContext.Run     mscorlib.dll!System.Threading.ThreadHelper.ThreadStart 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:20:09+00:00Added an answer on May 10, 2026 at 11:20 pm

    It looks to me like a Windows message is being marshalled to a .NET event and that event is calling your Reset method. Which event it is, I don’t know. If it isn’t an event, then it could be an asynchronous delegate.

    If you’re Reset method is called from an Application.Idle event, that might explain it.

    The call that led the asynchronous delegate to be raised (event handler or otherwise) will not appear in the stack as the call is asynchronous. Therefore, the stack may unravel from that call before the system dispatches that delegate via the Windows message pump. Therefore, the original caller is no longer present in the stack.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer try this code: Point p = listboxItem.TranslatePoint(new Point(0.0,0.0),Window.GetWindow(listboxItem)); In order… May 11, 2026 at 12:38 pm
  • added an answer You mention that no allocation is done in the init… May 11, 2026 at 12:38 pm
  • added an answer I used (the free version of) AutoRunPro I remember when… May 11, 2026 at 12:38 pm

Related Questions

Ok. So I am pretty new a this. I have a datatable that I
Ok, so I wanted to get opinions on this topic. I have a dumb
Ok so I have a number of methods that look like this:- which sorts
Ok, so I have VS 2008 and SVN. When I rebuild all a handful
I have over the course of a few projects developed a pattern for creating
My company currently evaluates the development of a Java FAT client. It should support
I thought this would be simple, but I sure am having a lot of
I'm looking to create a very small cataloguing app for personal use (although I'd

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.