Announcement

Collapse
No announcement yet.

Track Node not found in .tdb. TSRE writing incorrect entry in .tdb

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Track Node not found in .tdb. TSRE writing incorrect entry in .tdb

    I have posted about the following problem on Elvas Tower but since it appears to be an issue with TSRE and TSRE is a hot topic here at the moment, I thought it might be useful to post here as well.

    I am getting the following warning in the OR log file:

    Warning: {TileX:-6080 TileZ:14925} track node 2832 could not be found in TDB

    This is the entry WORLD tile -6080 14925, showing that Track Node 2832 does exist on this tile:

    TrackObj (
    UiD ( 2832 )
    SectionIdx ( 38668 )
    Elevation ( 0 )
    JNodePosn (-6080 14925 891.311 28.5577 558.573 )
    CollideFlags (39 )
    FileName (ukfs_tl_17m5_9d46.s )
    StaticFlags (00200180 )
    Position (891.311 28.5577 558.573 )
    QDirection ( 00.56912 0 0.822254 )
    VDbId (4294967295 )
    )

    This is the entry in the .tdb file:

    TrackNode ( 2832
    TrVectorNode(
    TrVectorSections( 1 38709 39508 -6086 14924 11315 0 1 00 -6086 14924 -726.68402 36.312996 113.368 0.000733177 1.3168 6.8259496e-09 )
    )
    TrPins( 1 1
    TrPin( 2831 0 )
    TrPin( 2833 1 )
    )
    )



    There is no Track Node 2832 in WORLD tile -6086 14924 Thus the .tdb is looking for Track Node 2832 on tile -6086 14924 not tile -6080 14925 and therefore unsurprisingly cannot find it. So the .tdb file is pointing to the wrong WORLD tile for Track Node 2832.


    The entry in the .tdb file has pins to two other nodes, as follows:


    TrackNode ( 2831
    TrJunctionNode( 0 39508 0 )

    UiD( -6086 14924 11315 0 -6086 14924 -726.68402 36.312996 113.368 -0.000733177-1.8247879 -6.8259496e-09 )
    TrPins( 1 2
    TrPin( 2830 1 )
    TrPin( 2832 1 )
    TrPin( 2834 0 )
    )
    )

    TrackNode ( 2832
    TrVectorNode(
    TrVectorSections( 1 38709 39508 -6086 14924 11315 0 1 00 -6086 14924 -726.68402 36.312996113.368 0.000733177 1.3168 6.8259496e-09 )
    )
    TrPins( 1 1
    TrPin( 2831 0 )
    TrPin( 2833 1 )
    )
    )

    TrackNode ( 2833
    TrEndNode( 0 )
    UiD( -6086 14924 11315 1 -6086 14924 -714.62201 36.303898 117.314 0.0007283791.1923704 -9.0975562e-05 )
    TrPins( 1 0
    TrPin( 2832 0 )
    )
    )

    This is doubly suspicious because Track Node 2832 refers to a left-hand turnout and therefore there should be no end node involved. Just deleting these three references to node 2832 from the .tdb file and reducing the Track Node count by three does not work because it crashes both TSRE and OR.

    Obviously, I cannot simply substitute the correct WORLD tile reference in the .tdb file since a different track vector specification will be needed


    Just as an experiment, however, I did change the .tdb entry to point to the correct tile, -6080 14925, without changing anything else and I still got the same warning message in the OR log, i.e.
    "Warning: {TileX:-6080 TileZ:14925} track node 2832 could not be found in TDB". So perhaps the message is not correct and does not mean what it seems to mean. I have come across instances before where the OR log message did not actually mean what it says (though at the moment I cannot recall the circumstances).

    So I am at a loss as to how to correct this error in the .tdb file. Can anyone explain why TSRE has written to the .tdb incorrectly in this way and perhaps suggest a solution?

    Martin

    #2
    Sorry, but the UiD number is never the TrackNode number.


    Bei der Nachfolgenden Darstellung werden die Abhängigkeiten zwischen der Schienendatenbank, dem WorldFile und der globalen Tsection.dat dargestellt. Als Muster diente Zufälligerweise eine Weiche. Der JNodePosn ist nur dann mit der Position identisch,…


    Jan

    Comment


      #3
      Thank you, Jan. So this means that Track Node 2832 does not refer to the track section with UiD 2832. So I think I have been looking in the wrong place in the route for the cause of the problem, if the problem is indeed with the route and not with the warning message itself.

      Martin

      Comment


        #4
        Go to -6080 14925 x 891.311 z 558.573. There lies the ukfs_tl_17m5_9d46.s. It certainly does not have a trackdatabase line. You can now change this with the > z < key or delete the track.

        Jan

        Comment


          #5
          Jan is giving you a slightly better version of the answer I gave at Elvas Tower...

          It might be a coincidence that the track node erroring and the UID 2832 on the same tile happen to be the same, or it could be corruption.

          Reading the nodes for 2831 and 2832, they originate at tile -6086 14924 position -726.68402 36.312996 113.368

          2831 is a ukfs_tl_catsd_8m.s switch, and 2832 is a ukfs_tr_20m_7d13_tun or ukfs_tl_20m_7d13_tun

          Your UID 2831 originates at tile -6086 14925 position 891.311 28.5577 558.573 and is a shape ukfs_tl_17m5_9d46
          With the tdb corruption I was seeing in the last test version, I didn't want to take any chances but Jan's explanation makes perfect sense - ORTS saw attract shape and alerted that it didn't have a TDB entry.

          Last edited by eric; 04-01-2024, 08:59 AM.
          If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

          Comment


            #6
            Yes, you would think that would work but it doesn't. I have experimented exhaustively with deleting track sections, using the hacks facility in TSRE and directly editing the .tdb without success. These screenshots tell part of the story.

            TDBproblem3.jpg

            This shows the turnout before any edits. It does have track database and track section lines.

            TDBproblem.jpg
            This is the result after pressing z once. z fails to remove the tdb lines from the track database Obviously, if left like this, OR crashes because it fails to load the .tdb file.

            TDBproblem2.jpg
            And this is the result if I delete the turnout.

            If I use hacks to eliminate the unwanted tdb and tsection lines, I get this:

            TDBproblem4.jpg

            As you can see, Track Node 17163 should not still be in place. Any attempts to edit the .tdb file directly in order to delete this track node only lead to further problems resulting in TSRE crashing. And even if I am able to run OR, I still get the same warning message.

            Something seems to be seriously wrong but I have had no success in tracking down the source of the problem.

            Martin

            Comment


              #7
              Originally posted by kapitaen View Post
              Sorry, but the UiD number is never the TrackNode number.
              It's unlikely and inconsequential, but numerically possible.
              Last edited by eric; 04-01-2024, 09:14 AM.
              If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

              Comment


                #8
                Martin, is that the turnout located at tile -6086 14925 position 891.311 28.5577 558.573 and is a shape ukfs_tl_17m5_9d46?
                If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                Comment


                  #9
                  I think you meant -6080 14925. If so, that is indeed the turnout.

                  Comment


                    #10
                    Yep, got confused with all the small print and number strings...

                    Dropping the turnout and adding to the TDB should do the trick.

                    Also, I know this may sound silly, but make sure you are saving via the menu when you make tdb changes. Prior to version 8.003p, a tdb change alone was not triggering the warning dialogue to save your work.
                    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                    Comment


                      #11
                      Dropping the turnout and adding to the TDB should do the trick
                      Forgive my denseness but I don't quite understand what you are suggesting here. What exactly should I try?

                      Yes, I always save via the menu.

                      Comment


                        #12
                        Originally posted by eric View Post
                        Originally posted by kapitaen View Post
                        Sorry, but the UiD number is never the TrackNode number.



                        It's unlikely and inconsequential, but numerically possible.
                        If you are looking for the data contribution for the following track, you need the WorlFile and the SectionsIndex.

                        Originally posted by docmartin View Post
                        TrackObj (
                        UiD ( 2832 )
                        SectionIdx ( 38668 )
                        Elevation ( 0 )
                        JNodePosn (-6080 14925 891.311 28.5577 558.573 )
                        CollideFlags (39 )
                        FileName (ukfs_tl_17m5_9d46.s )
                        StaticFlags (00200180 )
                        Position (891.311 28.5577 558.573 )
                        QDirection ( 00.56912 0 0.822254 )
                        VDbId (4294967295 )
                        )
                        The WorldFile is -6080 14925 and the SectionsIndex is 38668.
                        to search with

                        38668 -6080 14925

                        in the TDB. And if you really must have the UID for it then with

                        38668 -6080 14925 2832

                        but this is never the TrackNode.

                        @ docmartin​, why are you deleting the switch?
                        If it really is the problem, which I don't believe from the pictures, it would have been enough to mark it, press z, mark it again and unmark it until the yellow lines are there again and then save the route.

                        Jan

                        Comment


                          #13
                          Jan, you're correct that the Node ID and UID aren't the same reference and are not interchangeable.

                          What I'm saying is UID 2832 could in theory be a member of TrackNode 2832.

                          It's unlikely, but mathematically possible.

                          And I agree -- marking the turnout should fix the issue.
                          If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                          Comment


                            #14
                            If I do as suggested, then all the Track Node warnings - and there were others besides the one I have mentioned - disappear from the log file but OR crashes on trying to load with a fatal error, also listed in the log - Error: System.NullReferenceException: Object reference not set to an instance of an object.
                            Attached Files

                            Comment


                              #15
                              As an afterthought, presumably the Track Node warnings disappeared from the log file because OR was unable to load the tdb file and therefore the log has no relevant information about the trackwork in the route.

                              Comment

                              Working...
                              X