A little issue with the INI file...

Get help with running Romcenter 3 here. Please do not post roms requests or illegal links, posts will be deleted.

Moderator: Wanderer

Forum rules
No roms requests or illegal links
User avatar
Wanderer
Board master
Board master
Posts: 820
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

A little issue with the INI file...

Post by Wanderer »

Hi all

I have several datafiles i'm dealing with. If i have loaded a certain datafile and i try to change to another one via the datafile selector combo, i occasionally get the following message:

Error while loading datafile <the datafile i was about to load>
Cannot create file <my INI file>. The process cannot access the file because it is being used by another process.


There is no point in "create file <my INI file>" because my INI already exists. I believe it is being locked by another RC thread trying to update it or something. Eric, can this thing be avoided?
- Wanderer -

RomCenter: Main site, Bug reporting & enhancement requests, Wiki
RCDBManager: Main site, Bug reporting & enhancement requests, Wiki

**NOTE: RCTools URLs have changed since April 2025. Please update any bookmarks you may have.
User avatar
RomCenter
Author
Author
Posts: 1525
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Post by RomCenter »

No, I don't know. :?

I don't use thread in rc 2.x, so there should not be any problems with that.
Does it often happen ?
Eric - RomCenter developer
Report bugs here.
User avatar
Wanderer
Board master
Board master
Posts: 820
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Post by Wanderer »

RomCenter wrote:No, I don't know. :?

I don't use thread in rc 2.x, so there should not be any problems with that.
Does it often happen ?
It doesn't happen very often. Here's what i think happens (after i have used RC for some time):

I select a dat file. RC loads all paths and after it finishes, it (probably) tries to update the INI file with the info about the rom paths i have loaded. If at that time i select another path from the dat combo, it tries to read the INI file to retrieve info about the rom paths of the new dat file i selected and it cannot open it (because it is locked for writing) so it tries to recreate it. That probably produces the error.

It usually happens after i have used RC for some time and loaded several data files.
- Wanderer -

RomCenter: Main site, Bug reporting & enhancement requests, Wiki
RCDBManager: Main site, Bug reporting & enhancement requests, Wiki

**NOTE: RCTools URLs have changed since April 2025. Please update any bookmarks you may have.
User avatar
RomCenter
Author
Author
Posts: 1525
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Post by RomCenter »

These events you describes happens synchronously, no threads. So I don't think this is the problem.
This error can happen when I open two times the ini file. I have to check if this is the case.
Eric - RomCenter developer
Report bugs here.
Locked