1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Like RaceDepartment on Facebook.

Help needed with this error

Discussion in 'Bob's Track Builder' started by Steve G, Oct 23, 2011.

  1. I have created a new track and when I try to export it into rfactor I recieve this "Can't export Object reference not set to an instance of an object."
    So what does this mean and what do I need to do to fix it.
    The BTB version 0.8.9.1.
     
  2. When I had that error last time, it was because one vertex was accidentally moved to some astronomical location. Check out your terrain mesh for any anomalies.
     
  3. Its strange but all tracks even ones I have already exported before with out issues,now the last to tries have resulted in that error.
    And to make it a bit more interesting the older version did the same thing.
     
  4. This may indicate a problem with the ".scn" file. All mesh files (objects) must be defined within an "Instance=" statement; they cannot be listed in any other manner. It is possible that one or more "Instance=" statement became truncated and somehow orphaned an object; the Compiler would identify this as "Illegal" code and then abort the export process.

    The following is an example of a very simple (but "Legal") Instance Statement; I have indicated the Statement itself in BOLD type, the mesh / object is UNDERLINED and the object's properties are in Italic type.

    Instance=usa_flag
    {
    MeshFile=usa_flag.gmt CollTarget=False HATTarget=False ShadowCaster=(Static,Solid,256,256)
    }

    I suggest that you examine your ".scn" file (I use Notepad++ but any text editor will suffice) in order to verify that the basic structure of all statements constitutes legal code. You should also be certain that commenting characters ( // ) are not "commenting out" any necessary portion of a statement:

    // THIS IS STILL A VALID STATEMENT BECAUSE THE TEXT YOU ARE READING NOW IS "INVISIBLE" TO THE COMPLIER
    Instance=usa_flag
    {
    MeshFile=usa_flag.gmt CollTarget=False HATTarget=False ShadowCaster=(Static,Solid,256,256)
    }

    // THIS IS NOT A LEGAL STATEMENT BECAUSE THE "Instance=usa_flag" IS "INVISIBLE" TO THE COMPLIER
    // Instance=usa_flag
    {
    MeshFile=usa_flag.gmt CollTarget=False HATTarget=False ShadowCaster=(Static,Solid,256,256)
    }

    Clear as mud, right? :rolleyes:
     
  5. I just got that message too. Previously i have just made a backup project and then start to eliminate objects. First i removed all SObjects as they were the last imported objects. Then walls and objects, after that i deleted terrain, then all tracks one by one.. So i had 0 objects/meshes and still getting an error complaining about objects..

    Then i found the culprit: AIW !!! It was the same AIW that was exported just moments before with success so i really couldn't think that it was that.. I've had previously the same with cams, one cam was thrown so far that btb crashed when i tried to center to it (don't remeber how i solved that, i think i just managed to delete the cam fast enough :)... Never had this with AIW, not to mention i didn't even touch it and there was no change in terrain or roads.. Weird.. I still have one faulty copy of the project if i want to analyze it further. I do think that it was one of the XGates bugging as they are objects too..

    I have resolved this issue many times by simply editing any part of terrain, save and restart BTB. BTB did something funny just before i had that bug: i had one invisible SObject, i have seen this one many times with walls and SObjects. It happens when opening a project without restarting and only when i have edited wall/sobject in the previous session but it usually vanishes by itself if i click any other wall/sobject. That invisible wall/sobj can also be moved or deleted, the latter i usually use. This time the invisible sobj was excatly in the same location than grandstand sobject so i didn't notice it first, just wondered why the grandstand sobj didn't move when i dragged it's nodes.

    I had also a faulty XPack at one point causing debugger to start communicating with me: I did housecleaning on that new XPack and erroneusly deleted one material path that the project still used. I don't think it was that issue here bugging as the project did export after i solved that.