StrataFrame Forum

Unsafe Native Methods Error

http://forum.strataframe.net/Topic18351.aspx

By Bill Cunnien - 8/6/2008

An odd error showed up today...a user had left an SF application open overnight.  When he came in this morning, this error was waiting to greet him:

Message: External component has thrown an exception.

Source: System.Windows.Forms

Inner Exception:

Stack Trace: at System.Windows.Forms.UnsafeNativeMethods.ThemingScopeDeactivateActCtx(Int32 dwFlags, IntPtr lpCookie)
at System.Windows.Forms.UnsafeNativeMethods.ThemingScope.Deactivate(IntPtr userCookie)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MicroFour.StrataFrame.Application.StrataFrameApplication.RunApplication()

This seems like one of those generic, could-be-caused-by-a-million-things type error; but, I thought I would throw it out there to see if anyone else has run into this.

Thanks,
Bill

By Trent L. Taylor - 8/6/2008

This looks to be machine and OS related (environmental).  The themes that it is referring to are the Windows Themes (not SF) and you are right that this could come from a million different things.  So there is no way that I could give you any type of straight answer here...sorry Ermm
By Trent L. Taylor - 8/6/2008

I had another thought that could be causing a problem.  If you are using Role-Based Security and are allowing session timeouts, there is some API logic there that closes, hides, and talks to open windows using some API logic.  One thing you might do is either turn off the session timeout for this user and see if the problem persists or turn it off altogether...but that might be a place to look.  Ultimately this would still be an OS issue, but you would at least know the catalyst and would be able to work from there.
By Bill Cunnien - 8/6/2008

Thanks, Trent!  I suspected a non-SF related cause, too.  No doubt about that.  We are using RBS, but not setting a session timeout (*ponders* - maybe I should, though).  I'll dig further if I can get more error data collected from other users.  This was one user on one workstation...so, not too much to worry about.  He is back working after a restart of the app.  I am just trying to appease my endless curiosity about the cause of weird errors.

Take care!
Bill