X1691 Hangs When Opening Surfliner2 Activity "Amtrak 778"

Bug #1205839 reported by Sid Penstone
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
High
James Ross

Bug Description

Route: Surfliner 2
Activity: "Amtrak 778"
When this activity is selected, the menu locks up, displaying "(Not Responding)" in the top border. The process has to be killed.
When it is restarted, it does not respond again.
Bug seen in Versions: X1685 and later.
Versions X1680 and earlier, including Release 0.9, are able to run this activity OK.
There is no log file created.

Tags: menu
Revision history for this message
Sid Penstone (penstone) wrote :

After killing the hung process, I cannot switch ORTS for another activity, until I have loaded a different activity using an earlier version of ORTS, such as Release 0.9.

James Ross (twpol)
Changed in or:
status: New → Triaged
importance: Undecided → High
tags: added: menu
Revision history for this message
Sid Penstone (penstone) wrote :

I think I found what may be the bug in the code for Menu.exe:
In Mainform.cs, in the method:
void ShowDetail(string title, string[] lines)
---The loop starting at line 728:
                while (indexChunk > 0.001f || size > summaryControl.Height)
{
...
}
never exits.
The string being processed is:
"Soooo, you're the new guy. Welcome aboard. This is your first run from San Luis Obispo down to LA, right?\n\n"+

The value of 'size' returned by MeasureText() is stuck at 78.

Sid P.

Revision history for this message
Sid Penstone (penstone) wrote :

Check the source lines near 713 in mainform.cs: The comment at 715 now reads "... make the summary 5 lines long" for X1691, while the comment read "... make the summary 4 lines long" in X1680. The value of "summaryControlHeight" is now different (line 713), and this is used as one of the test conditions to exit the loop.
The program is reading the instructions in the activity.

James Ross (twpol)
Changed in or:
assignee: nobody → James Ross (twpol)
Revision history for this message
James Ross (twpol) wrote :

Possibly fixed in X.1699.

Changed in or:
status: Triaged → Fix Committed
milestone: none → 1.0
Revision history for this message
Sid Penstone (penstone) wrote :

Hi James,
It looks fine now - I tried some testing with strings of various lengths and I see that IndexChunk behaves now.
It was being set to zero for some particular string lengths in the earlier version, so the loop never exited.
Regards,
Sid.

James Ross (twpol)
Changed in or:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.