Jump to content


Photo

The process cannot access the file because it is being used by another

error bug item_rev spell_rev 1pp bgt

  • Please log in to reply
35 replies to this topic

#1 tuxr

tuxr
  • Member
  • 31 posts

Posted 20 October 2013 - 12:35 PM

****EDIT****

Apparently I've fixed the problem by modifying weidu's source code. If anyone has the same problem and can't wait for the official release, I've attached my fixed exe.

Extract it to "BiG World Installpack\move to main folder" after you extract the installpack to BG2 and overwrite the existing one.

****EDIT****

 

Hello, I've been trying to install the BWP(v13) for the first time and I've come upon this error.

More details:

Right when installing BGT, at some point(when compressing areas I suppose) I get the error and everything breaks.

 


...................................................................
[data/area7100.bif] will contain 18 resources totalling 26719046 bytes
Stopping installation because of error.
 
ERROR Installing [Baldur's Gate Trilogy - Core], rolling back to previous state
Will uninstall 4226 files for [SETUP-BGT.TP2] component 0.
ERROR: error copying [bgt/backup/0/gtimes.ids]
ERROR: error copying [bgt/backup/0/MINSCJ.dlg]
ERROR: error copying [bgt/backup/0/MINSCP.dlg]
ERROR: error copying [bgt/backup/0/EDWINJ.dlg]
ERROR: error copying [bgt/backup/0/EDWINP.dlg]
ERROR: error copying [bgt/backup/0/BEDWIN.dlg]
Uninstalled    4226 files for [SETUP-BGT.TP2] component 0.
ERROR: Unix.Unix_error(3, "close", "")
PLEASE post the file  SETUP-BGT.DEBUG to http://forums.spellh...p?showforum=261
Automatically Skipping [Baldur's Gate Trilogy - Core] because of error.
Using Language [English]
[./dialog.tlk] created, 87614 string entries
 
NOT INSTALLED DUE TO ERRORS Baldur's Gate Trilogy - Core
---------------------------------------------------
Uninstallation complete.  Please restore dialog.tlk
---------------------------------------------------

I've fought with it for a while and finally managed to pinpoint it to item_rev and/or spell_rev. It always happens if 1pp is in the list, it sometimes happens if 1pp is not on the list but other mods are(ie: scs). The list is pretty basic, nothing crazy. If I remove item_rev and spell_rev it all works like a charm.

 

I have tried searching for this problem, but the only thread that I've found doesn't say anything that can solve it.

Attached you will find the Big World Debug file.

 

I am wondering if someone can help solve this. I would like to use those two mods if possible.

Let me know if I need to provide more info.

Thanks.

Attached Files


Edited by tuxr, 24 October 2013 - 07:40 AM.


#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 20 October 2013 - 10:21 PM

Erhm this is weird ... so the installation fails just after the .are files are compressed ...

 

OUHF... did you notice this ?

 

Installing [Baldur's Gate Trilogy - Core] [1.18 (28 Apr 13) BWP Fix]
Copying and patching 1 file ...
Copying 1 file ...

Invalid Baldur's Gate directory, or incorrect Baldur's Gate installation.
It is safe to abort this installation by closing this window or pressing Ctrl+C.

Enter the full path to your Baldur's Gate installation then press Enter.

Extracting creatures from Baldur's Gate:TotSC...
Creating 1 directory

Did you patch the BG1 game with the v1.3.5512 patch ? Additional questions:

Is the BG1 a full install, and you need to install both of the BG1 AND the BG1TotSC with a custom install with everything selected in the 5+1CD version, the 3CD/1DVD version allows a full install, so select that. PS it can't be the BG:EE.


Edited by The Imp, 20 October 2013 - 10:26 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#3 tuxr

tuxr
  • Member
  • 31 posts

Posted 20 October 2013 - 10:34 PM

Erhm this is weird ... so the installation fails just after the .are files are compressed ...

 

OUHF... did you notice this ?

 

Did you patch the BG1 game with the v1.3.5512 patch ? Additional questions:

Is the BG1 a full install, and you need to install both of the BG1 AND the BG1TotSC with a custom install with everything selected in the 5+1CD version, the 3CD/1DVD version allows a full install, so select that. PS it can't be the BG:EE.

 

Ah, forgot to mention - I am using the GOG.com version of the games, so no patching should be necessary, right? Also, as I mentioned, if I remove the two _rev mods the installation works.

 

Also, I did notice those lines, but I see them in a good installation log too so it must be that it first tries to look for the game files in the default paths?


Edited by tuxr, 20 October 2013 - 10:37 PM.


#4 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 20 October 2013 - 11:14 PM

Hmm, how much hard drive space does the BG1 game take ? Yes, be precise.

Yeah, could be indeed that the BWP does that... although I would be using the new BWS instead, which might not have this problem.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#5 tuxr

tuxr
  • Member
  • 31 posts

Posted 20 October 2013 - 11:30 PM

Hmm, how much hard drive space does the BG1 game take ? Yes, be precise.

Yeah, could be indeed that the BWP does that... although I would be using the new BWS instead, which might not have this problem.

Size: 2,50 GB (2.695.800.677 bytes)

Size on disk: 2,51 GB (2.697.674.752 bytes)



#6 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 20 October 2013 - 11:30 PM

I'm not sure what is going on here. The code in question is pretty unremarkable:
MAKE_BIFF ~area7100~ BEGIN ~area7100~ ~^.*$~ END
MAKE_BIFF ~area7200~ BEGIN ~area7200~ ~^.*$~
                           ~bgt/tilesets/mos~ EXACT_MATCH ~ar7200n.mos~
                           ~bgt/tilesets/mos~ EXACT_MATCH ~ar7248.mos~ END
Perhaps check with Wisp or the bigg, if the latter is still around.

ERROR: Unix.Unix_error(3, "close", "")

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#7 -Shagar-

-Shagar-
  • Guest

Posted 21 October 2013 - 07:06 AM

I also had this problem when installing BGT. I have BG1 patched to 5512 and am performing a manual megamod installation. The strange thing is that this problem doesn't occur always in the same place, e.g.:

 

 

[data/aread000.bif] incorporating [AREAD000/ARD016.TIS]

Stopping installation because of error.

ERROR Installing [Baldur's Gate Trilogy - Core], rolling back to previous state

 

In fact, seeing that this was the case, I kept on trying until the mod was reported as successfully installed.



#8 tuxr

tuxr
  • Member
  • 31 posts

Posted 21 October 2013 - 07:47 AM

I also had this problem when installing BGT. I have BG1 patched to 5512 and am performing a manual megamod installation. The strange thing is that this problem doesn't occur always in the same place, e.g.:

 

 

[data/aread000.bif] incorporating [AREAD000/ARD016.TIS]

Stopping installation because of error.

ERROR Installing [Baldur's Gate Trilogy - Core], rolling back to previous state

 

In fact, seeing that this was the case, I kept on trying until the mod was reported as successfully installed.

Strange, were you installing it on a SSD perhaps? I'm thinking to install it on a HDD today. It always happens for me but only when using combinations of mods that include (item_rev and (1pp or scs)) or (spell_rev and scs). If I exclude the two _rev mods or exclude 1pp and scs, everything is fine.



#9 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 21 October 2013 - 07:57 AM

Strange, were you installing it on a SSD perhaps?
You should never install the weidu mods to a non_local_hard_drives, you can move them after, but you should keep the game on the C or D drive while installing... why complicate things needlessly ? And then there's the fact that the install could take x10 times longer for the fact that there's a few more COPY_EXISTING_REGEXP GLOB ~*~ ~override~ -commands. :devil:

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#10 tuxr

tuxr
  • Member
  • 31 posts

Posted 21 October 2013 - 08:00 AM

Strange, were you installing it on a SSD perhaps?
You should never install the weidu mods to a non_local_hard_drives, you can move them after, but you should keep the game on the C or D drive while installing... why complicate things needlessly ? And then there's the fact that the install could take x10 times longer for the fact that there's a few more COPY_EXISTING_REGEXP GLOB ~*~ ~override~ -commands. :devil:

 

The SSD is a local drive :) It's my C: drive actually. I installed on it because it's WAY faster than a standard HDD. It was just a thought that maybe it's too fast for the installer, and maybe it's not closing all the file handlers in time. I'll try on a HDD.



#11 -Shagar-

-Shagar-
  • Guest

Posted 21 October 2013 - 08:03 AM

I also had this problem when installing BGT. I have BG1 patched to 5512 and am performing a manual megamod installation. The strange thing is that this problem doesn't occur always in the same place, e.g.:

 

 

[data/aread000.bif] incorporating [AREAD000/ARD016.TIS]

Stopping installation because of error.

ERROR Installing [Baldur's Gate Trilogy - Core], rolling back to previous state

 

In fact, seeing that this was the case, I kept on trying until the mod was reported as successfully installed.

Strange, were you installing it on a SSD perhaps? I'm thinking to install it on a HDD today. It always happens for me but only when using combinations of mods that include (item_rev and (1pp or scs)) or (spell_rev and scs). If I exclude the two _rev mods or exclude 1pp and scs, everything is fine.

 

I was installing in my local D hard drive.



#12 tuxr

tuxr
  • Member
  • 31 posts

Posted 21 October 2013 - 08:21 AM


I was installing in my local D hard drive.

Yeah, I just tried it on a HDD, makes no difference.

 

area670a\ar6739.tis - The process cannot access the file because it is being used by another process.

 



#13 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 22 October 2013 - 12:13 AM

Can anyone proceed to find a minimal requirements for this error to happen ? As it stands, Wisp is not able to reproduce the error and thus it's hard to fix it.

PS, it's likely that a virus* protection program or the like is actually involved with the production of the error, and those those won't happen with a proper preparation of the setup is done, as none of those would be running.

 

*antispy/operationsystem/etc. protection.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#14 tuxr

tuxr
  • Member
  • 31 posts

Posted 22 October 2013 - 01:19 AM

Can anyone proceed to find a minimal requirements for this error to happen ? As it stands, Wisp is not able to reproduce the error and thus it's hard to fix it.

PS, it's likely that a virus* protection program or the like is actually involved with the production of the error, and those those won't happen with a proper preparation of the setup is done, as none of those would be running.

 

*antispy/operationsystem/etc. protection.

 

Hey, thanks for trying to help. Unfortunately I don't think I do anything special...

So, let's see.

1. I copy the bg2 dir from a backup to its original location.

2. I copy the mods from a separate location to the newly created bg2 dir

3. I open a cmd.exe with admin rights and go to the bg2 dir

4. I start the "BiG World Install.bat" file

5. I select English, EN for the language pack, (B)GT, (S)tandard, DA to keep them all, AD to keep adult content, pass the mods detection, enter the widescreen resolution(1440x900) and start the process

That's pretty much it...

 

Also, my antivirus program is disabled while the installation runs.

 

 

Anyway, I have been able to fix(hack) it. I compiled my own copy of weidu.exe and did some poking around in the source.

It looks like the copy_over procedure from the biff.ml source file fails to do an operation when doing the tiles(I assume read) and that's what causing the error. I've added a log_and_print call right at the beginning of that procedure and it seems to be working now. No idea why, but most likely the logging call does some flushing. I have no OCaml knowledge so I don't know if this is possible to be done in another way, but my hack seems to work  :clap:

Another possible solution would be to use the non blocking flag when opening the files, or use the read/write sync flags... but I haven't tried it as I don't know what other things those flags imply, and what weidu's code expects.

 

I have no clue why this only happens when one of the two rev mods are there though...

 

-------------------------------------------------------------

 

I have also found an error in 1pp's spell tweak component:

202_spelltweaks.tph:

ACTION_IF (FILE_EXISTS_IN_GAME ~SPWI317.SPL~) THEN BEGIN
      COPY_EXISTING ~SPWI317.SPL~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
    WRITE_LONG  0x2c2 0
    WRITE_ASCII 0x2be ~1WDGARMR~
  END
  BUT_ONLY_IF_IT_CHANGES
  END

 ACTION_IF (FILE_EXISTS_IN_GAME ~SPWI414.SPL~) THEN BEGIN
      COPY_EXISTING ~SPWI414.SPL~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
    WRITE_LONG  0x472 0
    WRITE_ASCII 0x46e ~1WDSARMR~
  END
  BUT_ONLY_IF_IT_CHANGES
  END

Looks to me that the size checks and the patch offsets are messed up. I have commented them and it all seems to be going well now(1pp's component doesn't fail anymore) but maybe there should be some checking if spell_rev is installed and use some correct file sizes when doing the size checking.



#15 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 22 October 2013 - 01:46 AM

Looks to me that the size checks and the patch offsets are messed up. I have commented them and it all seems to be going well now(1pp's component doesn't fail anymore) but maybe there should be some checking if spell_rev is installed and use some correct file sizes when doing the size checking.

Well, the general size check is indeed a little looney there, but it's function is basically to try to see if the file is actually a valid .spl file, it's not to actually validate for the purpose of the patch... this is what happens when you copy paste too much without thinking, and other mods get involved with the same files.

PS, I posted a request at the 1pp forum so they know off this...


Edited by The Imp, 22 October 2013 - 04:23 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#16 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 22 October 2013 - 03:19 AM

While I try to reproduce this problem, can someone who is experiencing it run WeiDU with the --print-backtrace option and post the debug file from a failed installation attempt?

#17 tuxr

tuxr
  • Member
  • 31 posts

Posted 22 October 2013 - 03:38 AM

While I try to reproduce this problem, can someone who is experiencing it run WeiDU with the --print-backtrace option and post the debug file from a failed installation attempt?

Here you go.

 

LE: 

The funny thing is that I don't think the files are actually in use. I have created a small utility that scans files in a given directory and checks if they are already open(ie: exclusive) by another process. I then edited the setup-bgt.tp2 file and added calls to this exe with the soon-to-be-biffed dir name(sleep-1sec.exe area7400). All the files were reported OK.

The exe sleeps 1 second and tries again to read the locked file, btw. My intention was for the bgt install to wait until the files were no longer in use, but it looked that it wasn't the case.

 

LLE:

I am running all this on a 64 bit PC, running Windows 8 x64

Attached Files


Edited by tuxr, 22 October 2013 - 05:01 AM.


#18 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 22 October 2013 - 05:06 AM

This has nothing to do with the error, but it will eventually save you some minute install time, before installing of mods clear out the "cache" -folders from your BG1 install, and the BG2 install while you are at it.

 

And just in case, what Operation System non-ANSI code page(#3.2) does your computer use ? It shouldn't matter...


Edited by The Imp, 22 October 2013 - 05:08 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#19 tuxr

tuxr
  • Member
  • 31 posts

Posted 22 October 2013 - 05:31 AM

This has nothing to do with the error, but it will eventually save you some minute install time, before installing of mods clear out the "cache" -folders from your BG1 install, and the BG2 install while you are at it.

 

And just in case, what Operation System non-ANSI code page(#3.2) does your computer use ? It shouldn't matter...

Yeah, thanks. I already deleted the cache and save dirs from both games, just like the guide said. I now have a backup copy of the (clean) BG2 that I use every time I try a new install.

I also use JSGME(great tool) to keep track of active mods(in a separate mod dir) that I then copy over the BG2 dir.

 

As for the code page, the very first time that I tried to install BWP was set to Romanian. After that I changed it and now it's set to English(United States). Looked like it didn't make any difference though...



#20 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 22 October 2013 - 11:57 AM

Well, I still can't reproduce this problem. But WeiDU 234 (just released) should hopefully provide a more illuminating error message.





Also tagged with one or more of these keywords: error, bug, item_rev, spell_rev, 1pp, bgt