Contrib.TrackViewer crashes with new Pseudo-Localization DLL files present

Bug #1450777 reported by Markus Gelbmann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
Low
jeroenp

Bug Description

Contrib.TrackViewer.exe produces a "Contrib.TrackViewer.exe no longer works. The program needs to be closed" crash on startup (before even showing the main window) when the directory "qps-ploc" is present in the ORTS installation directory. Said subdirectory of the ORTS folder contains translation files (DLL) for the new pseudo-localization feature, and removing it from the main ORTS installation directory lets TrackVIewer load normally again.

See also this thread: http://www.elvastower.com/forums/index.php?/topic/26581-trackviewerexe-does-not-work-anymore

Revision history for this message
Markus Gelbmann (gelbmann-markus) wrote :

PS: If this problem also affects other Contrib programs has not been tested yet. Since some are translatable as well, however, I would assume they could also suffer from said problem.

Revision history for this message
Markus Gelbmann (gelbmann-markus) wrote :

PPS: After quickly re-building the localization DLL files (Update.bat in locales directory) and moving them to an install of a matching version of ORTS, TrackViewer seems to be the only Contrib program affected by this problem.

Revision history for this message
jeroenp (j-paasschens) wrote :

Dear all,
Trackviewer crashes in Languages.cs, in the LanguageManager constructor.
It gets the directory name (e.g. 'en' or in this case gps-ploc, and tries to GetCultureInfo() on this, assuming it is a lc (languageCode). But apparently gps-ploc is not a recognized language code.

Adding a 'try-catch' around it obviously would remove the problem. But I am not sure that is the correct way. What I do not understand, personally, is: what is this 'gps-ploc'? Is it a language code?

Best regards. Jeroen

Revision history for this message
jeroenp (j-paasschens) wrote :

Dear all,
I was a bit too fast in my reply. I did not yet look into the new pseudo-localization code in RunActivity. I will have a look at it tomorrow and see what was changed (this part of the code in TrackViewer was probably something I copied from somewhere else, And I just need to figure out what was changed exactly.

Best regards, Jeroen.

Changed in or:
assignee: nobody → jeroenp (j-paasschens)
status: New → Confirmed
Revision history for this message
jeroenp (j-paasschens) wrote :

Dear all,
Fix committed in 3057, similar to Menu\options.cs
Jeroen.

Changed in or:
status: Confirmed → Fix Committed
Revision history for this message
James Ross (twpol) wrote :

Fix looks good, thanks!

"gps-ploc" is a valid language code but only sometimes (Windows Vista and later but you also need to enable it). :)

Changed in or:
importance: Undecided → Low
milestone: none → 1.0
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.

Other bug subscribers

Remote bug watches

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