![]() |
|
Crash while loading - Printable Version +- Little Fighter Empire - Forums (https://lf-empire.de/forum) +-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7) +--- Forum: Data Changing (https://lf-empire.de/forum/forumdisplay.php?fid=11) +--- Thread: Crash while loading (/showthread.php?tid=10014) Pages:
1
2
|
Crash while loading - T.O.R.N.A.D.O - 07-20-2015 Well guys I tried adding the following character to NTSD but the loading never completes, exe crashes at broken_weapon.dat. But it works if we remove one character. Now the twist is - when we add hidden characters to NTSD, the game loads but when tried to load this particular character, the game crashes. Any thoughts? This is the character: http://www.mediafire.com/download/oczcmmscqxbkpp0/Might_Guy.7z data.txt (just in case) Code: <object>
id: 50 type: 0 file: chars\pein.dat
id: 52 type: 0 file: chars\kyubi.dat
id: 38 type: 0 file: chars\sasuke_cs2.dat
id: 58 type: 0 file: chars\deidara_bird.dat
id: 51 type: 0 file: chars\sasori.dat
id: 56 type: 0 file: chars\reaper.dat
id: 57 type: 0 file: chars\nckakuzu.dat
id: 39 type: 0 file: chars\sand_creature.dat
id: 37 type: 0 file: chars\jiroubou.dat
id: 36 type: 0 file: chars\tayuya.dat
id: 35 type: 0 file: chars\sakon.dat
id: 34 type: 0 file: chars\kidomaru.dat
id: 33 type: 0 file: chars\naruto_clone.dat
id: 55 type: 0 file: chars\puppet_sasori.dat
id: 32 type: 0 file: chars\hunter.dat
id: 31 type: 0 file: chars\sound_nin2.dat
id: 30 type: 0 file: chars\sound_nin.dat
id: 2 type: 0 file: chars\naruto.dat
id: 1 type: 0 file: chars\sakura.dat
id: 3 type: 0 file: chars\kakashi.dat
id: 4 type: 0 file: chars\sai.dat
id: 11 type: 0 file: chars\sasuke.dat
id: 13 type: 0 file: chars\yamato.dat
id: 16 type: 0 file: chars\gaara.dat
id: 7 type: 0 file: chars\rock_lee.dat
id: 18 type: 0 file: chars\neji.dat
id: 22 type: 0 file: chars\shikamaru.dat
id: 19 type: 0 file: chars\tenten.dat
id: 12 type: 0 file: chars\kiba.dat
id: 5 type: 0 file: chars\shino.dat
id: 8 type: 0 file: chars\chiyo.dat
id: 14 type: 0 file: chars\kankuro.dat
id: 15 type: 0 file: chars\temari.dat
id: 6 type: 0 file: chars\Hsasori.dat
id: 17 type: 0 file: chars\kisame.dat
id: 9 type: 0 file: chars\itachi.dat
id: 10 type: 0 file: chars\deidara.dat
id: 24 type: 0 file: chars\hidan.dat
id: 25 type: 0 file: chars\kakuzu.dat
id: 23 type: 0 file: chars\kabuto.dat
id: 20 type: 0 file: chars\orochimaru.dat
id: 21 type: 0 file: chars\jiraiya.dat
#id: 29 type: 0 file: chars\speedy.dat #The hidden character of NTSD
id: 600 type: 0 file: Might_Guy\might_guy.dat
id: 601 type: 3 file: Might_Guy\guy_counter.dat
id: 100 type: 4 file: chars\weapon6.dat #heal_scroll
id: 101 type: 4 file: chars\weapon2.dat #ex_tag
id: 120 type: 1 file: chars\weapon4.dat #kunai
id: 121 type: 4 file: chars\weapon5.dat #shuriken
id: 122 type: 6 file: chars\weapon3.dat #healing
id: 150 type: 2 file: chars\weapon1.dat #stone
id: 151 type: 2 file: chars\log.dat #log
id: 123 type: 6 file: chars\weapon8.dat #beer
id: 124 type: 4 file: chars\weapon9.dat #<
id: 217 type: 2 file: chars\weapon10.dat #louis_armour
id: 218 type: 2 file: chars\weapon11.dat #louis_armour
id: 300 type: 5 file: chars\criminal.dat #criminal
id: 230 type: 3 file: chars\karasu.dat #karasu
id: 500 type: 1 file: chars\heart.dat #heart1
id: 501 type: 1 file: chars\heart2.dat #heart2
id: 502 type: 1 file: chars\heart3.dat #heart3
id: 503 type: 1 file: chars\blood.dat #blood1
id: 504 type: 1 file: chars\blood2.dat #blood2
id: 505 type: 1 file: chars\blood3.dat #blood3
id: 506 type: 1 file: chars\heart0.dat #heartuseless
id: 200 type: 3 file: chars\sakura_ball.dat
id: 201 type: 3 file: chars\death.dat
id: 203 type: 3 file: chars\charge.dat
id: 204 type: 3 file: chars\wind.dat
id: 205 type: 3 file: chars\poison.dat
id: 206 type: 3 file: chars\clay_bird2.dat
id: 207 type: 3 file: chars\ink.dat
id: 208 type: 3 file: chars\sword.dat
id: 209 type: 3 file: chars\area.dat
id: 210 type: 3 file: chars\katon_ball.dat
id: 211 type: 3 file: chars\firen_flame.dat
id: 212 type: 3 file: chars\freeze_column.dat
id: 213 type: 3 file: chars\puppet.dat
id: 214 type: 3 file: chars\flash.dat
id: 215 type: 3 file: chars\frog.dat
id: 216 type: 3 file: chars\doggy.dat
id: 219 type: 3 file: chars\jan_chaseh.dat
id: 220 type: 3 file: chars\crow_2.dat
id: 221 type: 3 file: chars\big_boom.dat
id: 222 type: 3 file: chars\ironsand.dat
id: 223 type: 3 file: chars\mega_ex.dat
id: 224 type: 3 file: chars\snake.dat
id: 225 type: 3 file: chars\clay_bird.dat
id: 226 type: 3 file: chars\coffin.dat
id: 228 type: 3 file: chars\bugs.dat
id: 229 type: 3 file: chars\rasenshuriken.dat
id: 231 type: 3 file: chars\sanshouo.dat
id: 235 type: 3 file: chars\criminal2.dat #criminal2
id: 401 type: 3 file: chars\summon.dat
id: 400 type: 3 file: chars\dragon.dat
id: 417 type: 3 file: chars\tree.dat
id: 407 type: 3 file: chars\clay_worm.dat
id: 408 type: 3 file: chars\katon_big.dat
id: 410 type: 3 file: chars\sand_shield.dat
id: 411 type: 3 file: chars\sand.dat
id: 412 type: 3 file: chars\sand_2.dat
id: 413 type: 3 file: chars\sand_blast.dat
id: 416 type: 3 file: chars\water.dat
id: 418 type: 3 file: chars\mother_puppet.dat
id: 419 type: 3 file: chars\chiyo_kunais.dat
id: 420 type: 3 file: chars\father_puppet.dat
id: 421 type: 3 file: chars\bugs2.dat
id: 422 type: 4 file: chars\ex_ball.dat #exball
id: 433 type: 3 file: chars\itachi_kunai.dat
id: 434 type: 1 file: chars\rasengan_ball.dat #rasengan
id: 435 type: 3 file: chars\drunken.dat
id: 436 type: 3 file: chars\wave.dat
id: 437 type: 1 file: chars\chakra.dat
id: 438 type: 3 file: chars\spider.dat
id: 439 type: 3 file: chars\monster.dat
id: 440 type: 3 file: chars\chidori.dat
id: 441 type: 3 file: chars\wood.dat
id: 442 type: 1 file: chars\gate.dat
id: 444 type: 1 file: chars\byakugan.dat #byakugan
id: 445 type: 1 file: chars\shield.dat
id: 446 type: 3 file: chars\4TK_ball.dat
id: 447 type: 1 file: chars\die.dat
id: 448 type: 1 file: chars\flash_weap.dat
id: 449 type: 1 file: chars\jiroubou_rock.dat
id: 450 type: 3 file: chars\air_creature.dat
id: 507 type: 1 file: chars\air_creature_die.dat
id: 451 type: 3 file: chars\thunder_creature.dat
id: 452 type: 3 file: chars\fire_creature.dat
id: 453 type: 3 file: chars\earth_creature.dat
id: 462 type: 3 file: chars\shadow.dat
id: 499 type: 3 file: chars\nckakuzuarm.dat
id: 510 type: 3 file: chars\100_puppets.dat
id: 511 type: 3 file: chars\100_puppets_b.dat
id: 512 type: 3 file: chars\100_puppets_c.dat
id: 513 type: 3 file: chars\lee_counter.dat
id: 514 type: 3 file: chars\katon_kakuzu.dat
id: 515 type: 4 file: chars\needle.dat #needle
id: 516 type: 3 file: chars\mirror.dat
id: 998 type: 5 file: data\etc.dat
id: 999 type: 5 file: data\broken_weapon.dat
<object_end>
<file_editing>
data\nothing.txt
<file_editing_end>
<background>
id: 0 file: bg\sys\District\bg.dat
id: 1 file: bg\sys\SandCountry\bg.dat
id: 4 file: bg\sys\Cave\bg.dat
id: 2 file: bg\sys\Deep\bg.dat
id: 3 file: bg\sys\Hideout\bg.dat
id: 5 file: bg\sys\Rain\bg.dat
id: 6 file: bg\sys\SnowCountry\bg.dat
id: 7 file: bg\sys\River\bg.dat
id: 8 file: bg\sys\Forest\bg.dat
id: 9 file: bg\sys\Arena\bg.dat
id: 10 file: bg\sys\RamenPlace\bg.dat
id: 11 file: bg\sys\Springs\bg.dat
id: 12 file: bg\sys\Academy\bg.dat
id: 13 file: bg\sys\CastleRoof\bg.dat
id: 14 file: bg\sys\Valley\bg.dat
id: 15 file: bg\sys\Grassland\bg.dat
id: 16 file: bg\sys\Path\bg.dat
<background_end>RE: Crash while loading - Rhino.Freak - 07-20-2015 To add to this, here is the game where the character is supposed to be added.. https://www.dropbox.com/s/o38iv6h0hyv295h/NTSD%202.4_2.0a.7z?dl=0 It won't work if we use it in any other mod or a fresh lf2 copy as it shares some data from the game I posted above and the character is developed specifically for that game. Here is the gist of what's happening : - Adding the character makes exe stop working after loading broken_weapon.dat - However if we remove one existing character it starts to work. ThoughT of doing so in case the mod reached data limit or something. My character worked flawlessly this time. - HOWEVER!! If I try to add a random hidden character (i.e. the characters which are in the game but not in data.txt for reasons) instead of my character back into the data.txt the game loads without an issue. Thus eliminating the case of data limit. It's so damn random I can't even. RE: Crash while loading - STM1993 - 07-20-2015 I'm able to add Bandit, Template, Mark & Knight but not Bat, Hunter, Henry, Justin, Monk (just character data, did not include relevant opoints). This happens regardless of whether I added speedy & guy_counter.dat in the data or not (might_guy.dat always crashes). This also happens even if I removed the opoint tags from the latter group of characters. When I took out Monk's D>A frames except for frame 240, Monk will load. I have no idea what's causing this problem, but I hope the information provided above will give some clarity to the situation. RE: Crash while loading - Rhino.Freak - 07-20-2015 This is so random. I now have more questions than ever before. Can it be exe's fault? Coz it is hex edited in order to do a few things.. RE: Crash while loading - T.O.R.N.A.D.O - 07-20-2015 Nope that's not an issue as I tried other exe too to watch where the loading crashes.. RE: Crash while loading - A-Man - 07-20-2015 What message does it throw at you before it crashes? Is it the "LF2 has stopped working" one? RE: Crash while loading - Rhino.Freak - 07-20-2015 @Doctor A : Yes @Tornado: Oh right I forgot about that. Hmm.. Now this is getting interesting (annoying honestly) RE: Crash while loading - Som1Lse - 07-21-2015 So I found the issue, and it turns out that sound files are to blame. Basically LF2 has an array of sound file names. Each sound file is at max 19 characters long (which means that it takes 20 bytes to store its name due to null-terminated strings). There are a max of 400 sound files in total, loading more than that will cause memory that is not associated with sound files to be overwritten causing weird things to happen. In this case NTSD was sitting at 400 sound files loaded, and along comes two more sound files from a new character and a pointer to some data to with sprites gets overwritten, so when LF2 tries to load a new sprite, everything comes down burning. If you look at some of the sound files you may notice that they have names that are longer than 19 characters (for example "data\SNDDATA_2377.wav"). In this case its name will take up some space from the next sound file, and when the next file is then loaded it will invalidate the previous name, so if a data file tries to use it, the sound file will be loaded again. tl;dr of previous paragraph: Having names longer than 19 characters may cause a sound file to be loaded twice. So the way to solve this would be to reduce the length of the sound file names. Specifically "data\SNDDATA_1926.wav", "data\SNDDATA_2133.wav", "data\SNDDATA_2275.wav", "data\SNDDATA_1911.wav", "data\SNDDATA_0552.wav", "data\SNDDATA_1317.wav", "data\SNDDATA_1325.wav", "data\SNDDATA_1330.wav", "data\SNDDATA_1860.wav", "data\SNDDATA_1862.wav", "data\SNDDATA_1883.wav", "data\SNDDATA_1885.wav", "data\SNDDATA_1886.wav", "data\SNDDATA_1922.wav", "data\SNDDATA_1955.wav", "data\SNDDATA_2052.wav", "data\SNDDATA_2058.wav", "data\SNDDATA_2063.wav", "data\SNDDATA_2138.wav", "data\SNDDATA_2150.wav", "data\SNDDATA_2274.wav", "data\SNDDATA_2283.wav", "data\SNDDATA_2308.wav", "data\SNDDATA_2320.wav", "data\SNDDATA_2328.wav", "data\SNDDATA_2352.wav", "data\SNDDATA_2359.wav", "data\SNDDATA_2367.wav", "data\SNDDATA_2373.wav", "data\SNDDATA_2380.wav" and "data\SNDDATA_2382.wav" seem to be loaded multiple times, specifically the first four are loaded thrice while, the rest of them are loaded twice. You would also need to update the data files to reflect the name change of the sound files. @Doctor A: Could you write a tool to automate this change? I am too lazy to do it myself. RE: Crash while loading - Rhino.Freak - 07-21-2015 That was a nice find indeed! Super thanks for the solution and helping me find the real culprit here! A program would be great! If it's tough to make or lengthy don't bother, I'll do it manually. ![]() So this data\SNDDATA_2377.wav is actually taking up 21 characters right? Also a wild thought, can these "limitations" be simply changed and stuff via exe editing? Like 400 sounds be changed to 600 or so.. RE: Crash while loading - Som1Lse - 07-21-2015 (07-21-2015, 09:12 AM)Rhino.Freak Wrote: So this data\SNDDATA_2377.wav is actually taking up 21 characters right?Correct. (07-21-2015, 09:12 AM)Rhino.Freak Wrote: Also a wild thought, can these "limitations" be simply changed and stuff via exe editing? Like 400 sounds be changed to 600 or so..Simply? No. Very complexly? Yes. The way it is layed out in memory is 8000 bytes of sound information and then 4 bytes for a pointer, and then a ton of more memory for other stuff after that. If you were to change the size of the sound name buffer to support 600 files you would have to make every assembly instruction that uses any of the memory after the sound name buffer access a different offset (because it has changed), missing just a single instruction would cause weird things to happen, and can be very hard to debug. Also finding every instruction is not an easy task as it would essentially involve solving the halting problem. Of course if you had the original source code it would be as simply as changing a number from 400 to 600. |