Anyone have any idea what this means:

Anyone have any idea what this means:

---------------------------
Debugger Exception Notification
---------------------------
Project HDM.exe raised exception class EOSError with message 'System Error.  Code: 5.
Access is denied'.
---------------------------
Break   Continue   Help   
---------------------------

Does it have to do with dueling calls to ShowModal perhaps?

Happens when MessageDlg gets called, and there appears to be (I am not making this up) a form attached to a thread that is not completely gone.

Seriously -- that's the best I can to do describe it.

Comments

  1. Does this still happen when running the app as Administrator?

    ReplyDelete
  2. Gut reaction would be to suggest that an access was attempted to a non-permitted directory or registry entry.

    ReplyDelete
  3. If running as Admin fixes it, then I think your app is trying to access information from another process. Whether by accident, or by design. It could be a consequence of how the thread does things. Probably better to create forms in secondary threads that are not owned by Application. Should solve your problem.

    ReplyDelete
  4. Having multiple threads accessing GUI is not healthy.  Ideally, the main thread should do very little but UX handling, and other threads should delegate UX handling to the main thread.

    ReplyDelete
  5. Lars Fosdal I am well aware of that. :-D, However, the person who wrote TMonsterThread (I am not making that up) does not appear to have been so aware. :-D

    ReplyDelete
  6. I had similar errors when destroying handles that were created in a different thread. GUI threads are possible in Win32 (but the VCL itself does not support it) when you take care of all low level win32 api yourself. For example we have a threaded progress/wait screen in our app but you must be very careful: e.g. simple rtl stuff like reading application.title will hang everything...

    ReplyDelete

Post a Comment