[solved] How to make a code to wait while a file is written on hard drive?
-
There is no much to show, the code is very simple. And it works fine when I need to save a single image. It leads to the crush only when image savings happen very frequently.
@
int AppWind::updateImage()
{
...if (iterCurrent%iterPerOut==0) {
frame2d.saveImage();
...
}
}bool Tp2dFrame::saveImage()
{
QPixmap* pm = getPixmap();
return pm->save(imageFileName);
}
@[EDIT: code formatting, please wrap in @-tags, Volker]
-
Debugging does not help in this case. When doing debugging step-by-step, then everything goes just fine, no crashes, I think because it's not fast enough. If I allow the code to run then it crashes with the error message "Fatal IO error 11 (Resource temporarily unavailable) on X server", and no other information can be obtained.