|
-
Feb 6th, 2019, 07:17 AM
#2
Re: VB6 program's Unload Me crashing in Windows 10
Clarification please:
You said, "The thing is that if I load any child form and then try to unload it, the application crashes." You are talking about the legacy app I assume. By child form, are you saying that the app is MDI-form based and the child forms belong to the MDI? If not, can you clarify what you mean by "child form".
You said, "However, if I start the program as Administrator FROM THE SHORTCUT, the forms unload without issues." Again, assuming you mean the legacy app? So, running elevated causes no problems? Sounds like the simple solution is to have the client/user run this app elevated -- but he/she may not have that option?
If running app elevated fixes things, thinking along the lines as you. The app is attempting read/write or move memory somewhere they are not allowed to due to permissions.
As far as the error goes, if memory is being moved via APIs, i.e., CopyMemory, then you can get a crash without error trapping triggering. In such a situation where user has insufficient rights reading something and uses "On Error Resume Next", then uses CopyMemory assuming all went right -- crash.
I think it would be safe to say that there is not enough details. You say it isn't your code, but you have the code. You ma want to whip up test projects using that unlicensed control to see if you can narrow it down to that. Otherwise, I think we'll need to see some related code in order to help. At the very least, I think we would need to see the child form's Unload, Terminate events and its Declarations section to help.
Is subclassing being used?
You said no manifests are used? Are you 100% sure there is none in resource file? There is a known mainfest-related bug that can occur when vb-created compiled usercontrols are added to a project. For reference, jump to post #12 here: http://www.vbforums.com/showthread.p...ol-combination. In any case, you mentioned you might pursue manifests and that thread might be worth reviewing anyway
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|