Author Topic: Patching Failed (COPY) (Invalid_argument("String.sub"))  (Read 4692 times)

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Patching Failed (COPY) (Invalid_argument("String.sub"))
« on: September 19, 2007, 08:24:30 PM »
OK, did some poking around on the internet and I get the impression that this String.sub error is probably a mangled .cre - I suspect that the string attempting to be matched or substituted has been messed with, but that is as far as I got - I would appreciate a technical explination, so I can learn, if someone has the time!

For the actual error,

Conditions this error pops up on: a German Tutu v4 with TutuFix and BG1 NPC and not much else, an EasyTutu_ToB one as well. I can't replicate it yet, but will keep trying.


Error message:
Code: [Select]
[./override/_NEB.cre] loaded, 1124 bytes
ERROR: [_NEB.cre] -> [override] Patching Failed (COPY) (Invalid_argument("String.sub"))
Stopping installation because of error.

Code: [Select]
ERROR: Invalid_argument("String.sub")
PLEASE email the file SETUP-BG1NPC.DEBUG to The BG1 NPC Project Team: forums.gibberlings3.net/index.php?showforum=45

User's WeiDU.LOG
Code: [Select]
SETUP-EASYTUTUHOTFIXES.TP2  0  0 Installed
EASYTUTUDEGREENIFIER.TP2  0  0 Installed
SETUP-EASYTUTUNPCKITS.TP2  0  0 Installed
SETUP-EASYTUTUNPCKITS.TP2  0  5 Installed
SETUP-EASYTUTUNPCKITS.TP2  0  7 Installed
SETUP-EASYTUTUNPCKITS.TP2  0  9 Installed
SETUP-EASYTUTUNPCKITS.TP2  0 11 Installed
SETUP-EASYTUTUNPCKITS.TP2  0 36 Installed
SETUP-EASYTUTUNPCKITS.TP2  0 45 Installed
SETUP-EASYTUTUNPCKITS.TP2  0 47 Installed
SETUP-TUTUFIX.TP2  0  3 Installed
SETUP-TUTUFIX.TP2  0  4 Installed
SETUP-TUTUFIX.TP2  0  5 Installed
SETUP-TUTUFIX.TP2  0  7 Installed
SETUP-TUTUSOUNDS.TP2  0  0 Installed
SETUP-TUTUSOUNDS.TP2  0  2 Installed
SETUP-SONG_AND_SILENCE.TP2  0  0 Installed
SETUP-SONG_AND_SILENCE.TP2  0  1 Installed
SETUP-SONG_AND_SILENCE.TP2  0  2 Installed
SETUP-SONG_AND_SILENCE.TP2  0  3 Installed
SETUP-SONG_AND_SILENCE.TP2  0  4 Installed
SETUP-SONG_AND_SILENCE.TP2  0  5 Installed
SETUP-SONG_AND_SILENCE.TP2  0  6 Installed
SETUP-SONG_AND_SILENCE.TP2  0  7 Installed
SETUP-SONG_AND_SILENCE.TP2  0  8 Installed
SETUP-SONG_AND_SILENCE.TP2  0  9 Installed
SETUP-SONG_AND_SILENCE.TP2  0 10 Installed
RR/SETUP-RR.TP2  0  0 Installed
RR/SETUP-RR.TP2  0  1 Installed
RR/SETUP-RR.TP2  0  2 Installed
RR/SETUP-RR.TP2  0  4 Installed

Our code:
Code: [Select]
COPY_EXISTING ~%tutu_var%NEB.cre~ ~override~ //Neb (in SW Baldur's Gate FF HQ L1)
  WRITE_SHORT 0x24 55 //Current HP (was 85)
  WRITE_SHORT 0x26 55 //Max HP (was 85)
  WRITE_SHORT 0x28 0x6304 //Animation (thief_male_gnome, was 0x5302 dwarf_low)
  WRITE_ASCII 0x34 ~NEBS~ #8 //Small portrait
  WRITE_SHORT 0x46 10 //Base AC (was 0)
  WRITE_SHORT 0x48 10 //Effective AC (was 0)
  WRITE_BYTE 0x55 11 //Save vs. wands (was 14)
  WRITE_BYTE 0x57 15 //Save vs. breath (was 16)
  WRITE_BYTE 0x58 12 //Save vs. spells (was 15)
  WRITE_BYTE 0x75 1 //Missile weapons (was 0)
  WRITE_BYTE 0x23c 16 //Dexterity (was 14)
  WRITE_BYTE 0x23d 16 //Constitution (was 6)
  WRITE_LONG 0x244 0x04000000 //Kit (illusionist, was 0x00000000 none)
  WRITE_EVALUATED_ASCII 0x250 ~%tutu_var%MAGE2~ #8 //Class script (was NONE)
  WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%MAGE3~ #8 //Race script (was NONE)
  WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%TASIGHT~ #8 //Default script (was NONE)
  WRITE_BYTE 0x273 0xd //Class (mage_thief, was 0x4 thief)
  ADD_KNOWN_SPELL ~SPWI112~ #0 ~wizard~ //Magic Missile
  ADD_KNOWN_SPELL ~SPWI112~ #0 ~wizard~ //Magic Missile
  ADD_KNOWN_SPELL ~SPWI112~ #0 ~wizard~ //Magic Missile
  ADD_KNOWN_SPELL ~SPWI211~ #1 ~wizard~ //Melf's Acid Arrow
  ADD_KNOWN_SPELL ~SPWI212~ #1 ~wizard~ //Mirror Image
BUT_ONLY_IF_IT_CHANGES

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #1 on: September 20, 2007, 08:12:51 AM »
Your code looks wrong, since you're adding three times the same known spell. Perhaps you were looking for ADD_MEMORIZED_SPELLS?

questions:
- does it work without the A_K_S / A_M_S?
- does it work in WeiDU <= 199 (A_K_S was re-written for W. 200)?
- can you upload somewhere the starting _neb.cre?
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #2 on: September 20, 2007, 04:13:52 PM »
questions:
- does it work without the A_K_S / A_M_S?
It does!
I exed only the KNOWN_SPELL, and it installed fine:
Code: [Select]
COPY_EXISTING ~%tutu_var%NEB.cre~ ~override~ //Neb (in SW Baldur's Gate FF HQ L1)
  WRITE_SHORT 0x24 55 //Current HP (was 85)
  WRITE_SHORT 0x26 55 //Max HP (was 85)
  WRITE_SHORT 0x28 0x6304 //Animation (thief_male_gnome, was 0x5302 dwarf_low)
  WRITE_ASCII 0x34 ~NEBS~ #8 //Small portrait
  WRITE_SHORT 0x46 10 //Base AC (was 0)
  WRITE_SHORT 0x48 10 //Effective AC (was 0)
  WRITE_BYTE 0x55 11 //Save vs. wands (was 14)
  WRITE_BYTE 0x57 15 //Save vs. breath (was 16)
  WRITE_BYTE 0x58 12 //Save vs. spells (was 15)
  WRITE_BYTE 0x75 1 //Missile weapons (was 0)
  WRITE_BYTE 0x23c 16 //Dexterity (was 14)
  WRITE_BYTE 0x23d 16 //Constitution (was 6)
  WRITE_LONG 0x244 0x04000000 //Kit (illusionist, was 0x00000000 none)
  WRITE_EVALUATED_ASCII 0x250 ~%tutu_var%MAGE2~ #8 //Class script (was NONE)
  WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%MAGE3~ #8 //Race script (was NONE)
  WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%TASIGHT~ #8 //Default script (was

NONE)
  WRITE_BYTE 0x273 0xd //Class (mage_thief, was 0x4 thief)
/*  ADD_KNOWN_SPELL ~SPWI112~ #0 ~wizard~ //Magic Missile
  ADD_KNOWN_SPELL ~SPWI112~ #0 ~wizard~ //Magic Missile
  ADD_KNOWN_SPELL ~SPWI112~ #0 ~wizard~ //Magic Missile
  ADD_KNOWN_SPELL ~SPWI211~ #1 ~wizard~ //Melf's Acid Arrow
  ADD_KNOWN_SPELL ~SPWI212~ #1 ~wizard~ //Mirror Image
/*
BUT_ONLY_IF_IT_CHANGES
The debug sais:

Copying and patching 1 file ...
[./override/_NEB.cre] loaded, 1124 bytes
Unable to Unlink [BG1NPC/backup/0/_NEB.cre]: Unix.Unix_error(20, "unlink", "BG1NPC/backup/0/_NEB.cre")override/_NEB.cre copied to BG1NPC/backup/0/_NEB.cre, 1124 bytes
Copied [_NEB.cre] to [override/_NEB.cre]

I don't know what this Unix_error means, the debug sais it for nearly every copied file.
I will upload the _neb.cre tomorrow, if it will be still be needed.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #3 on: September 20, 2007, 04:48:44 PM »
Jas: the "Unable to Unlink" is a bug in WeiDU 200. You can ignore that.
If you can upload _neb.cre it'd help, yes. It means that I broke something re-writing A_K_S and I should fix that ASAP :)
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #4 on: September 20, 2007, 05:29:49 PM »
Thank you Jastey -


I can confirm, though, that I *don't* have this error showing up on my install at all (or I wouldn't have shipped it, and it would have showed up in my install/uninstall/try-to-break v200 beta. I will work to replicate it (probably Sunday, if you haven't fixed it already by then :D ) by instaling other mods and seeing if I can make this show up. So far, on both v200 and internal beta testing, i have not been able to get this error message to show up. (I will try to add more modsa to the mix and put BG1NPC later in the order to try to pop this up).

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #5 on: September 20, 2007, 05:53:06 PM »
OK, at this point I tend to believe that Jas's version of _neb.cre is different from CMorgan's. Can both of you upload your versions?
CM, there's no need to try and figure out which mod breaks what until I look at the files and figure out if Jas' version is broken or WeiDU is biggy  :)

EDIT: I am aware of the typo, but I left it because it's funny, in a "Freudian Slip" kind of way  ;D
« Last Edit: September 20, 2007, 05:54:40 PM by the bigg »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

jastey*

  • Guest
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #6 on: September 21, 2007, 01:39:45 AM »
or WeiDU is biggy  :)
I thought you wrote that on purpose. That's the cutest typo I've ever seen ;D

I am definite my _neb.cre is the source, but maybe there is something that can be done to erase the install error nontheless. I'll upload the file tonight.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #7 on: September 21, 2007, 03:50:42 AM »
I thought you wrote that on purpose. That's the cutest typo I've ever seen ;D
u and i are next to each other on a keyboard  ;)

Quote
I am definite my _neb.cre is the source, but maybe there is something that can be done to erase the install error nontheless. I'll upload the file tonight.
Well, if your file is fine, then I should fix the bug in WeiDU. If your file is br0ken, then we have to find out which mod is breaking it  :)
If you have trouble uploading, you can email it to me (address on top of the WeiDU readme).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #8 on: September 21, 2007, 07:09:02 AM »
I can upload a set of .cres this afternoon:

1. instaled .cre from EasyTutu_ToB (I think Jastey and I are using the same version) and the .cre after installation of BG1NPC - just let me know if you need addtional ones. Time estimate is 10 hours from this post (gotta go to work) and the sirte will be the BG1NPC personal site (PM if you need a refresher on the link :) ).
No jokes about COPY LARGE please... 8)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #9 on: September 21, 2007, 07:10:11 AM »
I don't need the post-patch version, I need a version that can be patched and one that fails (I.E. Jastey's one).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

jastey*

  • Guest
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #10 on: September 21, 2007, 07:41:28 AM »
I can send you both; my EasyTutu install works fine, my German Tutu v4 has the neb problem. (I'll have to wait until I'm home, though.)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #11 on: September 21, 2007, 07:49:34 AM »
OK, many thanks.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #12 on: September 21, 2007, 12:33:22 PM »
(You've got mail) *pling*

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #13 on: September 21, 2007, 01:35:12 PM »
(You've got mail) *pling*
This time with the attachment.  :-[

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #14 on: September 21, 2007, 02:03:32 PM »

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Patching Failed (COPY) (Invalid_argument("String.sub"))
« Reply #15 on: September 24, 2007, 07:34:23 AM »
OK, it appears that _neb_corrupted.cre is using EFF V1.0 rather than the standard EFF V2.0 for the embedded effects. Since that's used for a couple of existing effects already, I'll fix it.

EDIT: fixed.
« Last Edit: September 24, 2007, 07:41:58 AM by the bigg »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: