TSRE - NAN Errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scottb613
    2500 Post Veteran


    • Apr 2003
    • 2848
    • Downeast Maine (soon)
    • ORTS

    #1

    TSRE - NAN Errors

    Hi Folks,

    Am I the only one that gets plenty of NAN Errors in TSRE? I use quite a bit of "Dynamic Track" and I'm continually putting in and ripping out track - to improve the layout or fixing problem areas - which I suspect is the root cause. Following Eric's advice from a while back - I remove the entries that contain the word "nan" - but then I get TrPins errors - I'm assuming other track nodes are pointing to the now missing nodes via TrPins.

    I'm tired of doing this manually and I want to code it. I just need to know precisely how to fix this. Would this fix be useful to anyone else?

    Eric:
    This is a pretty simple fix....

    1) remove the NAN nodes reported in the TSRE log from your TDB manually... don't mess up the brackets and you'll be fine.

    2) remove the orphaned DynTrack sections that also have NAN in the position and QDirection lines from your world file w-011020+14361.w

    When you fire up TSRE and ORTS, the errors will be gone, and you should be able to run in the Sim with no problems.

    You do still have a warning -- there's a switch with no track attached to the red pole. Guaranteed crash in MSTS, not so much in TSRE/ORTS, but still worth considering adding a piece to so that the warning goes away.
    Code:
            TrackNode ( 70
                TrVectorNode (
                    TrVectorSections ( 1 40082 40017 -11020 14361 162 0 1 00 -11020 14361 nan nan nan nan nan 0 )
                )
                TrPins ( 1 1
                    TrPin ( 22 1 )
                    TrPin ( 77 1 )
                )
            )
            TrackNode ( 71
                TrEndNode ( 0 )
                UiD ( -11020 14361 165 1 -11020 14361 nan nan nan nan nan 0 )
                TrPins ( 1 0
                    TrPin ( 72 0 )
                )
            )
            TrackNode ( 72
                TrVectorNode (
                    TrVectorSections ( 1 40082 40017 -11020 14361 165 0 1 00 -11020 14361 nan nan nan nan nan 0 )
                )
                TrPins ( 1 1
                    TrPin ( 73 1 )
                    TrPin ( 71 1 )
                )
            )
            TrackNode ( 73
                TrEndNode ( 0 )
                UiD ( -11020 14361 165 0 -11020 14361 nan nan nan nan nan 0 )
                TrPins ( 1 0
                    TrPin ( 72 1 )
                )
            )
            TrackNode ( 74
                TrEndNode ( 0 )
                UiD ( -11020 14361 163 1 -11020 14361 nan nan nan nan nan 0 )
                TrPins ( 1 0
                    TrPin ( 75 0 )
                )
            )
            TrackNode ( 75
                TrVectorNode (
                    TrVectorSections ( 1 40082 40017 -11020 14361 163 0 1 00 -11020 14361 nan nan nan nan nan 0 )
                )
                TrPins ( 1 1
                    TrPin ( 76 1 )
                    TrPin ( 74 1 )
                )
            )
            TrackNode ( 76
                TrEndNode ( 0 )
                UiD ( -11020 14361 163 0 -11020 14361 nan nan nan nan nan 0 )
                TrPins ( 1 0
                    TrPin ( 75 1 )
                )
            )
            TrackNode ( 77
                TrEndNode ( 0 )
                UiD ( -11020 14361 162 1 -11020 14361 nan nan nan nan nan 0 )
                TrPins ( 1 0
                    TrPin ( 70 0 )
                )
    Regards,
    Scott
    <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models
  • scottb613
    2500 Post Veteran


    • Apr 2003
    • 2848
    • Downeast Maine (soon)
    • ORTS

    #2
    Hi Folks,

    Deleted the NAN Errors - seems to work now.

    Two new issues...

    First Issue: "TrackNode 0" references - I think this doesn't matter from a search of the boards - I'd like to clean them up though:

    Code:
    Warning: Track node 83 pin 0 has invalid link to track node 0 in Y:\MSTS Mini\L&HR\Train Simulator\ROUTES\SCO_LHR\SCO_LHR.tdb:line 760
    
    Warning: Track node 86 pin 0 has invalid link to track node 0 in Y:\MSTS Mini\L&HR\Train Simulator\ROUTES\SCO_LHR\SCO_LHR.tdb:line 787
    
    Warning: Track node 87 pin 0 has invalid link to track node 0 in Y:\MSTS Mini\L&HR\Train Simulator\ROUTES\SCO_LHR\SCO_LHR.tdb:line 796
    
    Warning: Track node 90 pin 0 has invalid link to track node 0 in Y:\MSTS Mini\L&HR\Train Simulator\ROUTES\SCO_LHR\SCO_LHR.tdb:line 825
    
    Warning: Track node 91 pin 0 has invalid link to track node 0 in Y:\MSTS Mini\L&HR\Train Simulator\ROUTES\SCO_LHR\SCO_LHR.tdb:line 834
    
    Warning: Track node 95 pin 0 has invalid link to track node 0 in Y:\MSTS Mini\L&HR\Train Simulator\ROUTES\SCO_LHR\SCO_LHR.tdb:line 873
    
    Warning: Ignored invalid track node 83 pin [0,0] link to track node 0
    
    Warning: Ignored invalid track node 86 pin [0,0] link to track node 0
    
    Warning: Ignored invalid track node 87 pin [0,0] link to track node 0
    
    Warning: Ignored invalid track node 90 pin [0,0] link to track node 0
    
    Warning: Ignored invalid track node 91 pin [0,0] link to track node 0
    
    Warning: Ignored invalid track node 95 pin [0,0] link to track node 0


    Second Issue: is what started me looking for NAN Errors - my loco goes crazy at one spot in the route - starts jumping all over the place and the screen goes black. I noticed it's a point where two back-to-back red poles for switches intersect - is that a "no no" - should I have a spacer between red poles?

    Finally - what's the procedure to "Rebuild the Track DB" and what will it do for me? I know it's in RR and TSUtils - but it corrupts the route when I run it on my TDB file.

    Thanks.

    Regards,
    Scott
    Last edited by scottb613; 03-04-2025, 20:10.
    <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

    Comment

    • scottb613
      2500 Post Veteran


      • Apr 2003
      • 2848
      • Downeast Maine (soon)
      • ORTS

      #3
      Hi Folks,

      I cleared the last two dozen pieces of track I laid and the "TrackNode 0" errors went away.

      Odd - I had removed all the database lines and saved the file - that also cleared the errors - they came back when I reenabled them.

      I'll lay the track from scratch again - man - what a PITA.

      I found this from Rob on Elvas:
      A section of track which has a dead-end should always properly end in a TrackEndNode.
      A normal (plain) track section has two 'pin' connections, one on either side, a TrackEndNode has only one connection. Having all tracks properly connected and closed-off with a TrackEnd means that if you edit that section of track, the integrety of the database is secured.

      A track which has a dead-end with a '0 0' pin connection means it has (at least) one side not properly closed-off. It won't give any trouble when just running the route, but it may cause all sorts of trouble when editing that section. It's a kind of 'gap' in the trackdata base. It does not always go wrong, it depends on the exact situation, but there is always a risk. The greatest risk is that another track section still has a reverse link to the íncorrect section, but the incorrect section obviously no longer has a link to that section. In that case, if you remove the section which has the 0-pins, the RE cannot find the section still linked to it (as it does not know it exists), and the result is that the reverse link is left in place. That section now links to a section of track which no longer exists, or, worse, to a completely different section of track. Such 'false' links can spread like wildfire. Hence the warning. MSTS gave no warning but instead just let you ruin your route in the RE.

      Many tracks with '0 0' pins are 'orphaned' tracks - tracks left over in the RE after editing a section which should have removed everything. Often such sections do no longer exist in the world file.
      Your example is even more peculiar : it is an orphaned TrackEndNode - so it actually does not even have a related world file entry. You would never be able to remove this in the RE - all you would see is a phoney 'blue pole' somewhere not related to any track.

      It is possible to remove such 'orphans' manually. But you need to be a proper expert and know exactly what you are doing. Depending on the situation it can take hours to sort things properly. It's no good trying to explain - if you don't know how to do it, don't even think about it. Don't do a database rebuild - it's likely to make an even bigger mess of things.

      So - when running a route, just ignore these warnings.
      When considering editing a route which has such warnings : take note, and check you don't come anywhere near any of these problem areas.
      If you have to edit track near a problem area, try and check your route often with tools like RouteRiter. And make lots of back-ups.

      Regards,
      Rob Roeterdink
      Regards,
      Scott
      <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

      Comment

      • eric
        9500 Post Veteran and Administrator



        • Dec 2002
        • 9583
        • NS MP245.4 CNO&TP South District
        • English, SQL
        • General

        #4
        Yes, you need at least 0.2m between red poles... some people exercise a 2m gap.

        There isn't a rebuild TDB in TSRE just yet. It's a long term goal, but not a simple undertaking.
        If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

        Comment

        • scottb613
          2500 Post Veteran


          • Apr 2003
          • 2848
          • Downeast Maine (soon)
          • ORTS

          #5
          Originally posted by eric
          Yes, you need at least 0.2m between red poles... some people exercise a 2m gap.

          There isn't a rebuild TDB in TSRE just yet. It's a long term goal, but not a simple undertaking.
          Hi Eric,

          Gracias Amigo…

          Regards,
          Scott
          <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

          Comment

          • eric
            9500 Post Veteran and Administrator



            • Dec 2002
            • 9583
            • NS MP245.4 CNO&TP South District
            • English, SQL
            • General

            #6
            Do you still have this problem? Curious if the TDB Rebuild I'm working on will help or not...
            If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

            Comment

            • scottb613
              2500 Post Veteran


              • Apr 2003
              • 2848
              • Downeast Maine (soon)
              • ORTS

              #7
              Hi Eric,

              I don't think I have a copy - I removed the NAN errors - I removed some track - I turned off a large chunk of TDB and saved - went back in and turned the TBD back on and saved - seemed to fix all my errors. I can check my backups when I get home on the weekend. If I find one with an error - I'll send it your way.

              Regards,
              Scott
              <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

              Comment

              • scottb613
                2500 Post Veteran


                • Apr 2003
                • 2848
                • Downeast Maine (soon)
                • ORTS

                #8
                Originally posted by eric
                Do you still have this problem? Curious if the TDB Rebuild I'm working on will help or not...
                Hi Eric,

                I just checked my Mega account - this was the old copy of my first NAN errors you helped me with a while back. I checked the TDB - the NAN errors are present.

                [link removed]

                Regards,
                Scott
                Last edited by eric; 03-13-2025, 13:40.
                <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                Comment

                • eric
                  9500 Post Veteran and Administrator



                  • Dec 2002
                  • 9583
                  • NS MP245.4 CNO&TP South District
                  • English, SQL
                  • General

                  #9
                  Thanks

                  Sent from my SM-S911U using Tapatalk

                  If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                  Comment

                  • eric
                    9500 Post Veteran and Administrator



                    • Dec 2002
                    • 9583
                    • NS MP245.4 CNO&TP South District
                    • English, SQL
                    • General

                    #10
                    I found the root cause for your TDB nan's.... they were the position values and qDirection for a couple pieces of dynamic track.

                    If you don't have an actual position value, you don't have a piece of track to render, so I'm omitting those from the TDB rebuild process.
                    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                    Comment

                    • scottb613
                      2500 Post Veteran


                      • Apr 2003
                      • 2848
                      • Downeast Maine (soon)
                      • ORTS

                      #11
                      Hi Eric,

                      Yeah - I did use a bunch of dynamic track to make the winding route along the river look better - the sectional track wasn't cutting it - once I turned inland at Belvidere - It's almost all sectional track.

                      One question - when you turn of the TDB entries in TSRE and then save the file - are the TDB entries removed? Would it be at all helpful - to turn off all the TDB lines - save the file - then go back in to enable them all - would that kind of rebuild the TDB file?

                      Thanks.

                      Regards,
                      Scott
                      <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                      Comment

                      • eric
                        9500 Post Veteran and Administrator



                        • Dec 2002
                        • 9583
                        • NS MP245.4 CNO&TP South District
                        • English, SQL
                        • General

                        #12
                        There are three pieces that are still in the W file with no position and rotation data. Quite odd.... but i didn't see any track actually missing.

                        As for the TDB lines on and off.. that's just display/rendering. No effect on the saves themselves.

                        I'll try to document the process / logic flow before releasing. It's pretty straight forward in bpmn.
                        If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                        Comment

                        • scottb613
                          2500 Post Veteran


                          • Apr 2003
                          • 2848
                          • Downeast Maine (soon)
                          • ORTS

                          #13
                          Originally posted by eric
                          There are three pieces that are still in the W file with no position and rotation data. Quite odd.... but i didn't see any track actually missing.

                          As for the TDB lines on and off.. that's just display/rendering. No effect on the saves themselves.

                          I'll try to document the process / logic flow before releasing. It's pretty straight forward in bpmn.
                          Hi Eric,

                          Thanks.

                          In my most recent NAN events - I looked for missing track as well - I couldn't find any.

                          I still get that locomotive confused bouncing instantaneous directional change error - when passing through switches - often enough. For some reason - removing the TDB lines - saving - and restoring them seems to fix it. I did notice the "blue pole" node numbers seem to change when I restore them. Perhaps it had something to do with the "invalid track node" errors I posted above?

                          Thanks for all your efforts.


                          Regards,
                          Scott
                          <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                          Comment

                          • scottb613
                            2500 Post Veteran


                            • Apr 2003
                            • 2848
                            • Downeast Maine (soon)
                            • ORTS

                            #14
                            Disregard...
                            Last edited by scottb613; 03-14-2025, 18:22.
                            <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                            Comment

                            • eric
                              9500 Post Veteran and Administrator



                              • Dec 2002
                              • 9583
                              • NS MP245.4 CNO&TP South District
                              • English, SQL
                              • General

                              #15
                              That's the infamous flipped vector.

                              I get them as well, and I haven't been able to find the cause. I don't think it is due to the NAN issue, but instead a matter of misinterpreting the QDirection that segment should travel to the junction by 180*... It might also be due to Goku using negative directions where they probably shouldn't be used, and winding up with a sign error.
                              If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                              Comment

                              Working...