Track loading gets stuck...

Discussion in 'Track Modding' started by Jorgen, Feb 3, 2013.

  1. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I'm working on a conversion where I bumped into an odd problem: The track loading gets stuck at about 75%. I have waited more than 10 minutes, but it never completes. I have removed the .cbash and all old .rrbin files, but that did not help.

    When running with trace enabled, the trace log looks like this:

    Code:
    TRACE LEVEL = 100
    tracelog.cpp  139: Command line: "+path=".." +hash=####HIDDEN#### trace=100"
    main.cpp      193: FPU=0x0009001f
    game.cpp     1620: Entered Game::Enter()
    osman.cpp     727: Entered OSMan::Enter()
    plrfile.cpp  2899: Entered PlayerFile::Enter()
    setup.cpp    2451: Could not find SPARKF1_UPGRADES.INI
    setup.cpp    2451: Could not find SPARKF1_UPGRADES.INI
    setup.cpp    2451: Could not find SPARKF1_UPGRADES.INI
    setup.cpp    1556: Livery file _-6269_SPARKF3_71ALT excluded from list on account of being too long
    setup.cpp    2451: Could not find SPARKF3_UPGRADES.INI
    setup.cpp    2451: Could not find SPARKF3_UPGRADES.INI
    setup.cpp    1556: Livery file _-6269_SPARKF3_72ALT excluded from list on account of being too long
    setup.cpp    2451: Could not find SPARKF3_UPGRADES.INI
    plrfile.cpp  2041: Attempting to save to C:\usr\rFactor2\UserData\player\player.TMP
    plrfile.cpp  2074: Retcode: 0 for renaming to C:\usr\rFactor2\UserData\player\player.PLR
    hwinput.cpp  7466: Entered HWInput::Enter()
    hwinput.cpp  7467: HKL=0x041d041d
    vidman.cpp   1539: Entered VidMan::Enter()
    specialfx.cp 3451: Entered SpecialFX::Enter()
    dynman.cpp    710: Entered DynMan::Enter()
    sound.cpp    1337: Entered Sound::Enter()
    onscreen.cpp 3408: Entered OnScreen::Enter()
    game.cpp     1669: Entered Game::Setup()
    hwinput.cpp  7502: Entered HWInput::Setup()
    options.cpp  4647: Entered Options::Setup()
    O_AppObj.cpp 2770: Initiate options object creation
    O_OSC.cpp    2945: Entered Options_OSC_Reader::ReadOSC()
    vidman.cpp   1294: Trying to Play Bink File:  C:\usr\rFactor2\Installed\MovieFiles\ISILogo.bik
    MovieMan.cpp  120: Error locating video file C:\USR\RFACTOR2\INSTALLED\MOVIEFILES\ISILOGO.BIK
    MovieMan.cpp  120: Error locating video file C:\USR\RFACTOR2\INSTALLED\MOVIEFILES\ISILOGO.BIK
    vidman.cpp   1294: Trying to Play Bink File:  C:\usr\rFactor2\Installed\MovieFiles\ALL_TRACKS_AND_CARS_10.bik
    MovieMan.cpp  120: Error locating video file C:\USR\RFACTOR2\INSTALLED\MOVIEFILES\ALL_TRACKS_AND_CARS_10.BIK
    MovieMan.cpp  120: Error locating video file C:\USR\RFACTOR2\INSTALLED\MOVIEFILES\ALL_TRACKS_AND_CARS_10.BIK
    vidman.cpp   1294: Trying to Play Bink File:  C:\usr\rFactor2\Installed\MovieFiles\PreGame.bik
    MovieMan.cpp  120: Error locating video file C:\USR\RFACTOR2\INSTALLED\MOVIEFILES\PREGAME.BIK
    MovieMan.cpp  120: Error locating video file C:\USR\RFACTOR2\INSTALLED\MOVIEFILES\PREGAME.BIK
    tire_manager 1372: Non-existent tire brand ""
    tire_manager 1372: Non-existent tire brand ""
    O_OSC.cpp    3123: Exited Options_OSC_Reader::ReadOSC()
    O_AppObj.cpp 2862: Options object creation successful
    specialfx.cp 3457: Entered SpecialFX::Setup()
    steward.cpp  8284: Entered Steward::Setup()
    dynman.cpp    750: Entered DynMan::Setup()
    sound.cpp    1353: Entered Sound::Setup()
    render.cpp   1260: Entered Render::Setup()
    onscreen.cpp 3414: Entered OnScreen::Setup()
    plrfile.cpp  2939: Entered PlayerFile::Setup()
    plrfile.cpp  2041: Attempting to save to C:\usr\rFactor2\UserData\player\player.TMP
    plrfile.cpp  2074: Retcode: 0 for renaming to C:\usr\rFactor2\UserData\player\player.PLR
    game.cpp     1706: Entered Game::Init()
    game.cpp     1710: got past replayman init
    vidman.cpp   1767: Entered VidMan::Init()
    ai_db.cpp    3277: Entered AIDatabase::Init()
    steward.cpp  8301: Entered Steward::Init()
    hwinput.cpp  7577: Entered HWInput::Init()
    specialfx.cp 3563: Entered SpecialFX::Init()
    dynman.cpp    761: Entered DynMan::Init()
    When looking at the threads, the one consuming a full CPU has a stack that looks like this: (snapshot)
    Code:
    rFactor2.exe+0x2fefb6
    rFactor2.exe+0x236ba5
    When monitoring rF2 with procmon, the last thing rFactor2.exe does before it hangs is to read from commonmaps.mas.
    Has anyone had anything similar happen, and if you have, how did you solve it?

    @ISI: If you know what goes on at memory address 0x2fefb6, it would be great if you could post some info.

    Thanks.
     
  2. iDTDoug

    iDTDoug Registered

    Joined:
    Oct 5, 2010
    Messages:
    336
    Likes Received:
    221
    usually you'll get a popup error, are you sure its not hiding behind the game?
     
  3. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Yes, I even made the game run windowed in 800x600 resolution, but there is no popup. It just continues to consume a CPU core forever... I tried with a different AIW file that I know works, but still no go. There were literally tons of small off-track objects all set as collidable and HAT targets, so I'll try to correct that first, and then comment out objects one by one until I find out what causes this.
     
  4. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    After commenting out *all* objects except the X-objects and the garages, the track finally loads, so either it's a typo in the scene file or a bad object. Now that I know the AIW file is ok, I'll start uncommenting sections one by one until it starts hanging again. I will keep you posted on the issue once I find it.

    EDIT: Found the issue! It's not a bad object, nor a bad material, which I thought at first. It's a scene file parser error. (!) I will conduct some more experiments to pinpoint exactly what the issue is, but it is related to movable objects and instance names.
     
    Last edited by a moderator: Feb 5, 2013
  5. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Problem solved!

    These two entries hangs the track loading:

    Code:
    Instance=sign_corner_bollard_a
    {
        Moveable=True 
        MeshFile=sign_corner_bollard_a.gmt CollTarget=True HATTarget=False 
    }
    Instance=sign_corner_bollard_a&001
    {
        Moveable=True 
        MeshFile=sign_corner_bollard_a&001.gmt CollTarget=True HATTarget=False 
    }
    If I change it to the variant below, the track loads fine:

    Code:
    Instance=sign_corner_bollard_a
    {
        Moveable=True MeshFile=sign_corner_bollard_a.gmt CollTarget=True HATTarget=False
    }
    Instance=sign_corner_bollard_a&001
    {
        Moveable=True MeshFile=sign_corner_bollard_a&001.gmt CollTarget=True HATTarget=False
    }
    The first layout works fine in rFactor1, so something must have been changed in the scene file parsing. Perhaps you get the full line break sequence now that the file is read from a compressed MAS file? In rFactor1, the same file is read from the file system, so maybe CRLF somehow messes things up in certain situations?

    EDIT: Just looked at Lime Rock Park, and Moveable=True is on its own line there, but always followed by a VisGroups on the same line. Maybe that has some kind of effect on the parsing.
     
    Last edited by a moderator: Feb 5, 2013
  6. iDTDoug

    iDTDoug Registered

    Joined:
    Oct 5, 2010
    Messages:
    336
    Likes Received:
    221
    nice. glad you found it. Maybe someone will make a scn/gdb/aiw syntax checker program someday.
     
  7. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Maybe the char '&' is not very friendly. Try to replace "&" for "_"
     
  8. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I don't think it has anything to do with the ampersand character, unless of course it's related to the "Moveable" definition. I didn't exhaust every combination to pinpoint the exact issue, but still, something must have been altered in the scene file parser code as the original scene file loaded perfectly in rFactor1.

    @iDTDoug: Yeah, that would be great. Maybe ISI can build one off the parser code and include it with the modding tools in a future release? That would simplify getting rid of obsolete options and correcting invalid entries.
     
  9. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Hmm, now I am really confused. No matter what I do, I cannot get the track to load if I have the Moveable=True attribute on a separate line. I did replace the "&" character with an "_", but that did not help. However, if I place Moveable=True on the same line as MeshFile=, the track loads fine, but the moveable objects are definitely not moveable, it's like driving into a concrete wall... What am I doing wrong?
     
  10. iDTDoug

    iDTDoug Registered

    Joined:
    Oct 5, 2010
    Messages:
    336
    Likes Received:
    221
    are the gmt's exported that way? it takes more than just the scn file reference, the gmt has to be exported with it checked.
     
  11. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I can actually get one of those objects to become moveable, but as soon as I try the second one, the track won't load anymore. I've tried having Moveable=True on the same line as MeshFile and the other attributes, but that doesn't work at all, none of the objects become moveable that way. (but the track loads fine...)

    Exactly where would you define that a GMT is moveable? I can't find any option like that in 3DSimED, which is what I use when converting tracks.
     
  12. iDTDoug

    iDTDoug Registered

    Joined:
    Oct 5, 2010
    Messages:
    336
    Likes Received:
    221
    sorry,. i use max9 so i cant help there.
     

Share This Page