Track crashing during load screen, caused by the .wad contents. [GPxLoad & other files attached]

Posted by AUS_Doug 
Hi all,

So, went to test out my track and the game crashes ~halfway through the loading screen.
I firstly assumed (of course) that it was my .dat, but couldn't find anything wrong.

So I swapped out the .wad file for another random one, and it all loaded correctly.

Then I wondered if my .wad structure was wrong, so I replaced the .gp4, .bin(s) and .col in the working .wad with the ones for my new track.
Crashed.

My files had been created with GP4 Builder 2017, so I wondered if this was caused by a bug with it.
So I rebuilt them (.gp4, .bin and .col) with an older version of GP4 Builder.....still crashed.

And now I'm out of ideas. I've never had a crash caused by a .wad before, so I don't really know where the problem could be.

Attached below is my GPxLoad, and an archive with all relevant files.
If someone could take a look and suggest what to do, it'd be much appreciated.

Pastebin link for GPxLoad
Google Drive link for .gp4, .col, .bin, .dat and .tga files



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
Hi Doug,

I don't have time to test your track right now, and didn't find anything wrong with the files at first sight.

Looking at the GPxPatch log, there are these lines near the end:

[18:56:01.861] >>  D3D: D3D_LoadCars [14%]
[18:56:07.535] >>  D3D: InitVideoWallsMethod [45%]
[18:56:07.540] >>  D3D: InitialiseEnvMapManager [47%]
[18:56:07.545] >>  D3D: CGP4SkyText [48%]
[18:56:07.555] >>  D3D: CGP4Lcd [52%]
[18:56:07.598] >>  D3D: Track load [54%]
[18:56:07.598] >>  D3D: Load Collision Data [54%]
[18:56:07.651] >>  D3D: Load track [55%]

Then it crashes. It would be interesting to create a log from a fully working track to see what are the steps immediately after these, so you can have a better idea of where the crash may be.

Also, did you get any unusual message from GPxPatch after the crash? Did it create an "assert.txt" file?


My unfinished tracks: [www.grandprixgames.org]
Send bug reports and track editing questions to f1virtualblog@gmail.com
Good idea, I'll get a GPxLoad file with a working track tomorrow at some stage.

No unusual messages from GPxPatch - just the usual "do you wish to open the log file" bit - and I didn't look to see if there was an assert file.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
There is an error in your .dat reported by GP4 builder.

Sector 0 . (86) Direction is different from track direction.

May be it generates a corrupted bin file....

I thought it might have been that - I think that message is new to GP4 Builder 2017 yes? - but I opened a .dat from another working track, and it also had this message so I don't know.

I'll try and fix that error tomorrow first - if I can work out how - and see if it makes a difference.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
Yes GP4 Builder 2017.
Hmmm, I didn't check for another track (I will check it tonight)
but if you noticed this error is also reported for a working track then it could be not the root of your problem...

The gp4 file is corrupted
I remade a "track from dat" with the basic gp4 file, and it works

>> [www.mediafire.com]


https://www.mediafire.com/folder/cl323fcwf2i61/GP4_Files';] >>> My Other Tracks for GP4 <<<[/url]
Thanks for that tojepo. Any ideas on how it might have got corrupted in the first place? I've never had anything like this happen before.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
When I look at the crash address it doesn't make sense. Basically what happens is that the first pointer in the table below is a null pointer (00 00 00 00 instead of 84 F2 63 00 -> "MESH";). The table is read-only so I don't see how this could have been overwritten, except through some buffer overrun or underrun because of some corrupt data elsewhere (but near this table).

0063EF90 84 F2 63 00 dd offset aMesh ; "MESH"
0063EF94 78 F2 63 00 dd offset aTextures ; "!TEXTURES!"
0063EF98 6C F2 63 00 dd offset aMaterials ; "!MATERIALS!"
0063EF9C 60 F2 63 00 dd offset aVertices ; "!VERTICES!"
0063EFA0 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFA4 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFA8 50 F2 63 00 dd offset aDiffuse ; "DIFFUSE"
0063EFAC 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFB0 44 F2 63 00 dd offset aSpecular ; "SPECULAR"
0063EFB4 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFB8 3C F2 63 00 dd offset aFaces ; "!FACES!"
0063EFBC 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFC0 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFC4 34 F2 63 00 dd offset aPower ; "POWER"
0063EFC8 24 F2 63 00 dd offset aTransparency ; "TRANSPARENCY"
0063EFCC 1C F2 63 00 dd offset aAmbient ; "AMBIENT"
0063EFD0 10 F2 63 00 dd offset aEmmisive ; "EMMISIVE"
0063EFD4 08 F2 63 00 dd offset aCount ; "COUNT"
0063EFD8 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFDC FC F1 63 00 dd offset aOptimised ; "OPTIMISED"
0063EFE0 F0 F1 63 00 dd offset aUnoptimised ; "UNOPTIMISED"
0063EFE4 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063EFE8 DC F1 63 00 dd offset aAttributeblocks ; "!ATTRIBUTEBLOCKS!"
0063EFEC D0 F1 63 00 dd offset aObjects_0 ; "!OBJECTS!"
0063EFF0 C8 F1 63 00 dd offset aName_0 ; "NAME"
0063EFF4 C0 F1 63 00 dd offset aTrrow0 ; "TRROW0"
0063EFF8 B8 F1 63 00 dd offset aTrrow1 ; "TRROW1"
0063EFFC B0 F1 63 00 dd offset aTrrow2 ; "TRROW2"
0063F000 A8 F1 63 00 dd offset aTrrow3 ; "TRROW3"
0063F004 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063F008 58 F2 63 00 dd offset asc_0_63F258 ; "****"
0063F00C A0 F1 63 00 dd offset aCentre ; "CENTRE"
0063F010 98 F1 63 00 dd offset aRadius ; "RADIUS"
0063F014 84 F1 63 00 dd offset aObjectattrmaps ; "!OBJECTATTRMAPS!"
0063F018 7C F1 63 00 dd offset aEnd ; "!END!"
0063F01C 74 F1 63 00 dd offset aParent ; "PARENT"
0063F020 68 F1 63 00 dd offset aFirstchild ; "FIRSTCHILD"
0063F024 60 F1 63 00 dd offset aNext ; "NEXT"
0063F028 54 F1 63 00 dd offset aSelfillum ; "SELFILLUM"
0063F02C 44 F1 63 00 dd offset aIllumemissive ; "ILLUMEMISSIVE"
0063F030 3C F1 63 00 dd offset aMeshfvf ; "MESHFVF"
0063F034 30 F1 63 00 dd offset aEndmeshfvf ; "ENDMESHFVF"
0063F038 24 F1 63 00 dd offset aTexclamp ; "TEXCLAMP"
0063F03C 18 F1 63 00 dd offset aTwosided ; "TWOSIDED"
0063F040 0C F1 63 00 dd offset aProperties ; "PROPERTIES"
0063F044 04 F1 63 00 dd offset aM_02 ; "M_02"
0063F048 F8 F0 63 00 dd offset aBillboard ; "BILLBOARD"
0063F04C F0 F0 63 00 dd offset aM_03 ; "M_03"
0063F050 EC F0 63 00 dd offset aLod ; "LOD"
0063F054 E4 F0 63 00 dd offset aBbox ; "BBOX"
0063F058 DC F0 63 00 dd offset aM_04 ; "M_04"
0063F05C D0 F0 63 00 dd offset aEndmaterial ; "ENDMATERIAL"
0063F060 C8 F0 63 00 dd offset aLights ; "LIGHTS"
0063F064 BC F0 63 00 dd offset aLightname ; "LIGHTNAME"
0063F068 AC F0 63 00 dd offset aGeneralmatrix ; "GENERALMATRIX"
0063F06C A4 F0 63 00 dd offset aM_05 ; "M_05"
0063F070 94 F0 63 00 dd offset aGlobalposition ; "GLOBALPOSITION"
0063F074 8C F0 63 00 dd offset aM_06 ; "M_06"
0063F078 84 F0 63 00 dd offset aM_07 ; "M_07"
0063F07C 80 F0 63 00 dd offset aPvs ; "PVS"

René Smit, Independent Software Developer.
Download my GPx tools here.
Creating a .gp4 debug file gives some answers :

-- Objects --
Tag 24: 24
Object Name: TRACK_DLLine00
Tag 35: 124370072
Parent: 124370072
Tag 36: 868
First Child: -1
Tag 37: 37
Next Object: -1
...

Tag 35 must be 35
Parent should be -1 (else it looks for object ID 124370072 which most probably doesn't exist)
Tag 36 must be 36

Question is why all your objects have these 3 "corrupted" values...

What methodology did you follow from your original .gp4 to get the new one with your scenes ?

Edit :
As every object creation function (add new scene, create track from .dat...) reuse existing tag35/36 and parent values from current track object, you can't use your "corrupted" .gp4 file as a base.
So the only way so far to recreate a working .gp4 file is to start from an original game track (monza2001.gp4) with your .dat and to create new scenes and convert track and pitlane from .dat again. Then delete original scenes and save.
That's the current only way I have to get a working track.





Edited 1 time(s). Last edit at 01/13/2017 03:32PM by Lo2k.
Once I had a similar problem with a Yeongam-Track. I managed it this way:

1. Checking the track with a different -working- .GP4-file. I drived through houses, trees and so on, but the track has been loaded correctly.
2. Checking which scene(s) is causing the issue by deleting all except one scene. Try the track. If it loads, the existing Scene is correct. Try this step probably several times, to get all scenes, including corrupted objects.
3. Once you got those corrupted scenes, start deleting objects within this scene and try the track until you know the excact object causing the crash.
4. Once you have this object: delete it finally!

In my Yeongam-Track there were 3 grandstands being corrupted.

CAREFUL: It is possible, that the number of corrupted objects increases during further track editing (at Yeongam from firstly 1 to finally 3 grandstands), so I'm pretty sure, that somehow on some track-databases GP4-Builder causes this issue while overwriting the .gp4-file.

I hope, I got your problem right and it can be solved with this method above.
Thanks for all the extra feedback guys.
So, Laurent, my method:
1) Made a copy of my 'working folder' (containing my .dat, .bin, .col, .gp4 and .tga files) for this circuit.
2) Opened the .gp4 (which, of course, loaded the dat)
3) Created a new scene with just the default object that a new scene creates
4) Deleted all the other scenes
5) Rotated my track (.dat) around the z-axis and moved it on the x and y to get it away from the black border (I wasn't sure how much room I wanted at this stage)
6) Built my .dat as usual - delete most of the sectors (I always leave the track on the pit-straight intact, so I never have to worry about changing flags) and start building.
7) Track From .dat - All track objects except for Kerbs, CC-Line and Walls. This created the Tarmac, Sideline, Verge and Banks in a new scene.
8) Track From .dat - Kerbs, CC-line and Walls in a new scene
9) Track From .dat - All possible pitlane items
10) Delete the scene that only has the default object in it.
11) Use Edit Behaviours and the search menu to get all the behaviours right.
12) Build my .bin files
13) Build my .col file from the .gp4

And yes, I was able to get everything working by starting over with the original monza .gp4



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
Thanks for this detailed description

I just checked your working folder .wad and was surprised to find 2 different .gp4 in it (the one at root is surely unecessary).
By the way, both .gp4 are correct regarding tags and parent values.
hmm...

I renamed everything Jangka2002 and added an animation file with the same name. Removed the extra .gp4.
I did not check the track side for the pit lane in the Jangka2002.anm so if you don't have mechanics just fix that. It looks good:-)
Haha, when I was working on the environment for Jangka, I started keeping an extra backup of my .gp4 in root of the .wad for emergencies.....must have forgotten to remove it before I released it! ;)
I've also thought of something that might help work out what went wrong.
I haven't really done much work on the .gp4 for my new circuit, so I think I'll start it again from scratch today (using the .gp4 from my other circuit) and record a video of the process.
This way, if this corruption happens again, there will be an accurate record of steps that might give some clue to as to what caused.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
Good idea !
I'm really wondering what happened with your file.

So, I just sat down and went through it all again from scratch and did not get a single error at all.
I'll keep recording everything that I'm doing, just in case it happens again.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
We have had this problem before turning on
the z axis.
Previously only imported from Z modelor.
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Supported by: Atlassian Experts Berlin | Forum Rules | Policy