68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
Development Question: ".Rsrc could not be opened"
Posted by: equant on 2007-07-04 21:23:38
Using Think pascal 4, I get the error ... "project.Rsrc could not be opened. It may be missing or in use by another project" This never happens the first time I run a project., only the 2+nth time.

If I open the project, build and run, it works, but if I then try to run it again, or make a change and then build and run again, I get the error.

Some projects never have this problem and always work.

Anyone know what I'm missing? I can't find any difference between the projects that work and the ones that don't work that would create this issue.

Thanks for any insight.

Nathan

Posted by: Kallikak on 2007-07-04 22:39:06
I presume the file exists given that it works the first time. So the reason must be the file is "in use". I'm not familiar with the mechanism THINK Pascal uses to run programs inside its own environment, but my immediate suspicion is that you are failing to properly clean up some resource, so that the resource file (project.rsrc) remains open after the program exits.

Posted by: equant on 2007-07-05 05:49:57
but my immediate suspicion is that you are failing to properly clean up some resource, so that the resource file (project.rsrc) remains open after the program exits.
That was my fear. I was hoping it was just some compiler option or something I needed to un/check. I'm having this issue with Peter Lewis' finger source code example as well, so I hope I can even find the issue. Seems like he would've cleaned up correctly.

If I build the application, and run it as an app, it runs over and over just fine.

Ok, well I'll keep looking. It's making the dev cycle very slow, because I have to close the project and re-open it between test-runs.

Thanks for the reply,

Nathan

1