VB2010 - Process exe thread is halting main application
Hi all
I have two applications. For performing certain functions, i run a second exe, via a process, and wait till it is complete (exited) to continue with my main application. I run through many repetitive functions on different files.
Everything runs fine however, when i am doing a run and it is on the x loop number, the main application seems to halt the secondary process exe. I can only assume this is what is happening as, if i close/stop (not pause) my main application in VB, the second exe continues from where it was halted until it completes.
Has anyone ever had something similar occur? I am open to any ideas at the moment. Could it be part of the dll's (MapWindow) that i am using that is not handling something correctly?
Thanks.
Re: VB2010 - Process exe thread is halting main application
Are the two processes sharing code in the dlls? If that is the case, could you be getting into a deadlock? If the dll is locking resources, then it would be possible for the main app to lock the resource, blocking the subsidiary app. If the main app doesn't ever release the resource, perhaps because it is waiting for action from the subsidiary app, then you'd be deadlocked. Of course, this requires shared resources or shared code.
Re: VB2010 - Process exe thread is halting main application
Hi Shaggy
They do use a common dll, however they should not be using it at the same time i.e. not using it to perform any processes. My second app's process is a waitforexit process, and only on completion, passes information back to the main app as to whether it completed and where the resulting stored files are located.
Is there a way for me to assess whether the dll is being locked up by the other process?
Also, it seems to stop working/halting at the exact same place everytime. Perhaps that helps?
Thanks.
Re: VB2010 - Process exe thread is halting main application
That certainly makes it a lot easier to try to diagnose. It can get tricky figuring out how interconnected processes are interacting. You can narrow the problem down to a single line, most likely. For instance, if the whole thing is running in a debugger, you could just pause the run and see which line it breaks on. Alternatively, you could add some signals (messageboxes, or logging) into the process to narrow down which line it is hanging on. That would be very instructive, and might make it all clear to you.
Re: VB2010 - Process exe thread is halting main application
Hi
I only have vb 2010 express. Am i able to internally look into dll's that i did not create, a debug/diagnose where the problem is occuring? If so, can you point me in the right direction? So you think it is in my process app?
The method used in the process exe does sometimes get through, and then sometimes not. The odd thing is, i can take the exact same files (i stored them in a temp directory) into MapWindow GIS (the actual application from which the dll's that i am using are) and it runs successfully.
Thanks.