Page 1 of 1

Crash related to Routing Restrictions using r1518

Posted: 23 Apr 2007 15:33
by Carlo Ghega
Get a crash when I trie to use routing restrictions in signalling as seen on the screenshot SCR1-crash.png: The moment I try to pull down the open menu to get the word "Passagiere" (german for passengers, the first word in the menu) on the screen, ttdlx crashes down. Found no crashlog, using Olly the game freezes.

Olly-Screenshot and savegame attached, cfg-files in the next reply...

Posted: 23 Apr 2007 15:36
by Carlo Ghega
...thank you for your efforts and for keeping this the most exiting game anyway!

Best regards

CG

Posted: 23 Apr 2007 16:44
by JGR
Can you count how many cargos you have enabled?
I suspect that you have more than 19, and I if so will need to refactor the code to support this... TTDs original drop down code only supports 19 entries and an end marker.
Oskar's GUI code should work... I will see about fixing this, thanks for pointing it out. I may not be able to fix it today, but probably tomorrow or later this week...

JGR

Posted: 23 Apr 2007 19:01
by Carlo Ghega
O.K: This really turned out to be hard work. Counted it twice and am quite sure about the right result now. And the winner is: 32. This is the number of cargos you get in temperate clima, when you install all the ECS-vectors from George. Might slightly differ in the other climates as there are some changes in special sets therefore.

I confess that trying that out with a (very amazing!) new experimental feature could emerge as a tiny little bit optimistic. All the more thanks a lot for your fast and kind answer! If you need the complete cargo-list, I can post it here - but I've to translate it to English first, so it might take a sec or two.

Not daring to give it all together another try if this seems to be admissible. Thank you once again - not least for your exiting implementation,

best regards,

CG

Posted: 23 Apr 2007 20:44
by JGR
Carlo Ghega: An experimental, partially untested fix for this was committed and will be available in the next nightly. You have the dubious honour of testing it with the max of 32 cargos... :wink:

Oskar: Thanks for conviently committing some very useful documentation at a very pertinent time... Your code appears to work flawlessly.
Note though that it chokes on the TTD default of dx=-1 as no default item selected... You have to set dx to the index of the end marker for no default selection... Just thought I'd mention it.

Posted: 23 Apr 2007 21:21
by Carlo Ghega
An experimental, partially untested fix for this was committed and will be available in the next nightly. You have the dubious honour of testing it with the max of 32 cargos... :wink:


Will get through with imperturbable grit :twisted: (...in both meanings of the word as I fear :wink:).

A fortiori a whole lot of thanks to you and oscar, will give feedback and await the things to come in patient purposefulness.

All the very best to you!

CG

Posted: 24 Apr 2007 11:28
by eis_os
JGR wrote: Oskar: Thanks for conviently committing some very useful documentation at a very pertinent time... Your code appears to work flawlessly.
Note though that it chokes on the TTD default of dx=-1 as no default item selected... You have to set dx to the index of the end marker for no default selection... Just thought I'd mention it.
Sure, I seen your plan and so made the documentation the best I can,
could you explain me what do you mean with chokes? Consindering the code I am unsure how it could fail....

Posted: 24 Apr 2007 14:39
by JGR
If dx is equal to -1, the number of items in the list is increased to 255, 65535? Clicking on the scrollbar causes crash. No text is displayed.
I suspect that it has to do with lines 373-382 in guidropdownex.asm
I will have a closer look and report back...

JGR

EDIT: Committed fix instead...