Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[V8i MDL] mdlExternal_wait freezes MicroStation

$
0
0

Hello everyone,

in a bigger Project, we call a simple exe from our MDLs and retrieve the exitcode from the exe.

The code is working fine for several weeks, but on rare and random occasions, MicroStation freezes when the mdlExternal_wait function is called. And when such a freeze occurs, it lasts usually for the entire day. The next day the freeze is usually gone for unknown reasons and the MDLs run through perfectly fine again.

here an example code how we used it in the test MDL

programP=mdlExternal_startProgram (prog,param);
free(prog);
if (programP)
{
 printf("before mdlExternal_wait (programP=%ld)\n",programP);
 mdlExternal_wait(&status,programP);
 printf("after mdlExternal_wait Status: %ld,  ExitStatus: %ld\n",programP->status,programP->exitStatus);
 return(status);
}
return(-1);

MicroStation freezes and never shows "after mdlExternal_wait"

The problem can't be reproduced in a reliable way and happens completely random. What we tried so far:

-The MDL runs on multiple PC's with the same OS,AntiVirus,Firewall etc using the same code. Some PCs (about 80 of 100) can experience the freeze, others don't.

-When the freeze occurs, it stays for the whole day. The next day, the freeze is usually gone and can't be reproduced again.

-no additional Addons are running on MicroStation. Even on a pure MicroStation with just a tiny test MDL started, the freeze happens.

-the started exe runs and ends perfectly fine. The exitcode of the started exe is returned perfectly fine (log files created from the exe showed this as well as runs of the exe in a console).

-we tried a different way and replaced the function mdlExternal_wait with a while Loop and tried to wait till programP->Status changes, so we can then read programP->exitStatus

This didn't work, as it seems programP isn't updated without mdlExternal_wait.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>