JGR's Patch Pack

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Doomlord
Engineer
Engineer
Posts: 4
Joined: 08 Feb 2017 19:22

Re: JGR's Patch Pack

Post by Doomlord »

Hi There,
just loaded latest version today but face crashes at different (random?) actions during the game in the timeframe of between 3 to ~15 min in game.

Assertion failed at line 100 of /src/core/span_type.hpp: offset + count <= size()
crash-20231208T140336Z.log.txt
(26.74 KiB) Downloaded 967 times
Hope there is an easy fix!
logs attached
Many thanks for the great work
Attachments
crash-20231208T140336Z.png
(361.51 KiB) Not downloaded yet
crash-20231208T140336Z.sav
(373.97 KiB) Downloaded 959 times
Last edited by Doomlord on 08 Dec 2023 19:29, edited 1 time in total.
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Doomlord wrote: 08 Dec 2023 19:26 Hi There,
just loaded latest version today but face crashes at different (random?) actions during the game in the timeframe of between 3 to ~15 min in game.

Assertion failed at line 100 of /src/core/span_type.hpp: offset + count <= size()

Hope there is an easy fix!
logs attached
Many thanks for the great work
Thanks for reporting this. It is a known issue which occurs with some languages. It will be fixed in the next release.
Ex TTDPatch Coder
Patch Pack, Github
Doomlord
Engineer
Engineer
Posts: 4
Joined: 08 Feb 2017 19:22

Re: JGR's Patch Pack

Post by Doomlord »

Hi JGR, thanks for the ultraspeedy reply!
Any way to get it worked around with current release? Want to play now, have only few hours per week :(
You mention language, shall I change language? In Windows? In the game? Which language setting in detail?
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Changing the language to English in the Game Options window should avoid this issue.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
fridaemon
Director
Director
Posts: 637
Joined: 27 Oct 2019 21:06
Location: Czech Republic

Re: JGR's Patch Pack

Post by fridaemon »

Hi JGR ;)
I will try to open the topic of endless water again...
img-2023-12-08-20-38-30.png
img-2023-12-08-20-38-30.png (202.26 KiB) Viewed 94887 times
Would it be possible to create an option (ON/OFF) to replace the black background with water? Like the Earth is not flat? In the case of islands that are sometimes located on the edge of the map, it would make a nicer impression. I really believe it'd appreciate more players. 8)
ImageImageImageImageImage
Beach Objects * Shopping Centres * Skyscrapers * Garage Entrances
Modular Warehouses * Trucks & Buses Parking Lots * Bus Depots * Bus Terminals
Road Waypoints * Road Stops * Eyecandy Objects * Building Set

Winner of the Screenshot of 09/20, 11/20, 02/21, 06/21, 07/21, 05/22 and 06/22.:twisted:
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

fridaemon wrote: 08 Dec 2023 19:41 Hi JGR ;)
I will try to open the topic of endless water again...
img-2023-12-08-20-38-30.png
Would it be possible to create an option (ON/OFF) to replace the black background with water? Like the Earth is not flat? In the case of islands that are sometimes located on the edge of the map, it would make a nicer impression. I really believe it'd appreciate more players. 8)
I'll take a look into it.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1211
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

With Firs 2.14 I am reporting a similar problem as with ECS.
Attachments
Královská Transportní, 5. čer 1937.png
(238.66 KiB) Not downloaded yet
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 08 Dec 2023 20:50 With Firs 2.14 I am reporting a similar problem as with ECS.
Perhaps it may be prudent to investigate the possibility a newer/faster computer?

I am limited in what I can do about other people's GRFs.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1211
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

This option is in the solution. However, I didn't experience this problem before. Of course, I understand that even openttd is becoming more demanding, but then again, such a sudden jump from version to version, when there was no problem before?
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 08 Dec 2023 21:09 This option is in the solution. However, I didn't experience this problem before. Of course, I understand that even openttd is becoming more demanding, but then again, such a sudden jump from version to version, when there was no problem before?
Which version specifically are you comparing it with?
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1211
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

With the previous one, just before this one. maybe i just didn't notice the game speed reduction? I doubt it.
Of course it doesn't occur to me that before I didn't even think to look at the framerate that everything was running smoothly, there were problems before with 4k or 8k games, but now 2k is at 4k level and that's a big jump in one version. In addition, shouldn't older graphics be less demanding?
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 08 Dec 2023 21:40 With the previous one, just before this one. maybe i just didn't notice the game speed reduction? I doubt it.
Of course it doesn't occur to me that before I didn't even think to look at the framerate that everything was running smoothly, there were problems before with 4k or 8k games, but now 2k is at 4k level and that's a big jump in one version. In addition, shouldn't older graphics be less demanding?
I've generated a few maps with the GRF config from your save you posted (minus vehicle/object ones I couldn't be bothered to track down) and got essentially the same numbers in the last two releases.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1211
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Apologies in that case, apparently I didn't notice the slowdown until now. However, it is always a slowdown in case of terrain steps like ECS, other values are normal and never go yellow. In the case of an increase in the game's system requirements, I would assume problems with everything....
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1684
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

I have a bit of problems with the signalling system ...

Below I have 4 high speed rail tracks (no speed limit) and 4 trains (200 km/h speed limited) at various stages of progress. All signals are block signals and show correct aspects (4) G-YG-YY-R according to Canadian Rail Operating Rules. All works fine, except the trains never reach their maximum speed; speed hovers around 100 km/h (in the real set up, signals are spaced 8 tiles apart). There are no other trains on each line. Without any signals present, trains travel happily at 200 km/h.

Signalling A.png
Signalling A.png (26.86 KiB) Viewed 94728 times

Here are the signal definitions for these signals :

Code: Select all

// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ** Signal Settings [Global]
// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

// DEFSIGPRO   FEATURE(*SIGNALS) TYPE(*SETTING) ;
//             PROGRAM_SIGNALS(*DEFAULT) ;
//             NO_ENTRY_SIGNALS(*DEFAULT) ;
//             RESTRICTED_SIGNALS(*ENABLE) ;
//             SIGNAL_RECOLOUR(*ENABLE) ;
//             SIGNAL_EXTRA_ASPECTS(2)
  190 * 8       00 0E 01 01 00 50 01 00                 // signals_enable_programmable_signals
  191 * 8       00 0E 01 01 00 51 01 00                 // signals_enable_no_entry_signals
  192 * 8       00 0E 01 01 00 52 01 01                 // signals_enable_restricted_signals
  193 * 8       00 0E 01 01 00 53 01 01                 // signals_enable_signal_recolour
  194 * 8       00 0E 01 01 00 54 01 02                 // signals_extra_aspects

// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ** Signal Properties
// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

// DEFSIGPRO   FEATURE(*SIGNALS) TYPE(*SIGNAL) ;
//             SIGNAL_ID(01) ;
//             SIGNAL_NAME("CA-Normal Signals" "CA-Normale Bahnsignale" "CA-Signaux normaux") ;
//             SIGNAL_TYPES_LIGHT(*PBS_ONE_WAY *PBS_TWO_WAY *BLOCK) ;
//             SIGNAL_TYPES_SEMAPHORE(*PBS_ONE_WAY *PBS_TWO_WAY *BLOCK) ;
//             SIGNAL_NO_ASPECT(*DEFAULT) ;
//             SIGNAL_LOOKAHEAD_SINGLE_ASPECT(*DEFAULT) ;
//             SIGNAL_LOOKAHEAD_EXTRA_ASPECT(*DEFAULT) ;
//             SIGNAL_RESERVE_THROUGH(*DEFAULT) ;
//             SIGNAL_NORMAL_SHUNT(*DEFAULT) ;
//             SIGNAL_OPPOSITE_SIDE(*DEFAULT) ;
//             SIGNAL_REALISTIC_BRAKING(*ENABLE) ;
//             SIGNALS_NO_DEFAULT(*DEFAULT) ;
//             COMMENT(Normal Signals)
  200 * 8       00 0E 01 01 00 60 01 01                 // signals_define_style
  201 * 9       00 0E 01 01 00 61 02 02 DC              // signals_style_name
  202 * 11      00 0E 01 01 00 62 04 31 00 00 00        // signals_style_electric_enabled
  203 * 11      00 0E 01 01 00 63 04 31 00 00 00        // signals_style_semaphore_enabled
  204 * 8       00 0E 01 01 00 64 01 00                 // signals_style_no_aspect_increase
  205 * 8       00 0E 01 01 00 65 01 00                 // signals_style_lookahead_extra_aspects
  206 * 8       00 0E 01 01 00 66 01 00                 // signals_style_lookahead_single_signal_only
  207 * 8       00 0E 01 01 00 67 01 00                 // signals_style_always_reserve_through
  208 * 8       00 0E 01 01 00 68 01 00                 // signals_style_combined_normal_shunt
  209 * 8       00 0E 01 01 00 69 01 00                 // signals_style_opposite_side
  210 * 8       00 0E 01 01 00 6A 01 01                 // signals_style_realistic_braking_only
  211 * 8       00 0E 01 01 00 6B 01 00                 // signals_no_default_style
The relevant game settings are set as follows :

Code: Select all

Interface
   Viewports
      Signals
         Show restricted electric signals using default graphics : OFF
         Show all signals using default graphics : OFF
      Signals (advanced)
         Show programmable pre-signal feature : OFF
         Show no-entry signals : OFF
         Show advanced routing restriction feature : ON
         Enable signals on bridges/tunnels advanced modes : ON

Vehicles
   Physics
      Train Acceleration Model : REALISTIC
      Train Braking Model : REALISTIC (Expert)
      Realistic train braking is aspect limited : ON (Expert, Difficult)
      Limit Train Acceleration : ON
What properties / settings do I have to change to make things work ? I would also like the trains to at least look ahead 3 signal blocks, i.e. reserve path for 3 signal blocks, if they can.

EDIT :

Some further testing has revealed :

Block Signals are ONE-WAY only. Why ?

Increasing the distance between signals (to 12), gets the train up to speed. But, slows to 100 km/h in front of every green block signal it encounters; although all signals are clear to the destination of the train.

Using two-way PBS signals, does not really work. Signals show a red aspect and only change to yellow briefly before passing. A high speed train driver should never see any yellow or red aspect, otherwise he will be late for dinner.
dol422
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 29 Dec 2015 20:06
Location: England

Re: JGR's Patch Pack

Post by dol422 »

Sometimes, I have a vehicle do a circular route, that is, it starts and ends in the same place. I usually do this for both directions. In the order list, you can set 'Departure board: Show as via' to indicate on the departure board where the vehicle goes, like below:
Department for Transport, 2676-09-16.png
(737.63 KiB) Not downloaded yet
However, on the departure board, the 07:00 departure shows as going via 'Flitwick Bridge Street' to get to 'Flitwick Hall Road'. The problem here is that 'Flitwick Hall Road' isn't the end station, as it loops back to the first order (highlighted green):
Department for Transport, 2676-09-16#1.png
(738.33 KiB) Not downloaded yet
The first three stops and last three stops for this vehicle are the same, which doesn't seem to be recognised by the departure board.

What I'm missing here, is an option to show which station appears as the end destination. I would presume some sort of setting which allows only scheduled dispatch stops" to appear on the departure board, or an order similar to the "departure board via" which says "show as end destination on departure board.
Take a look at: http://www.tt-forums.net/viewtopic.php?f=47&t=74993
Why do it tomorrow when you can do it today
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

OzTrans wrote: 09 Dec 2023 07:23 I have a bit of problems with the signalling system ...

Below I have 4 high speed rail tracks (no speed limit) and 4 trains (200 km/h speed limited) at various stages of progress. All signals are block signals and show correct aspects (4) G-YG-YY-R according to Canadian Rail Operating Rules. All works fine, except the trains never reach their maximum speed; speed hovers around 100 km/h (in the real set up, signals are spaced 8 tiles apart). There are no other trains on each line. Without any signals present, trains travel happily at 200 km/h.


Signalling A.png


Here are the signal definitions for these signals :

Code: Select all

// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ** Signal Settings [Global]
// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

// DEFSIGPRO   FEATURE(*SIGNALS) TYPE(*SETTING) ;
//             PROGRAM_SIGNALS(*DEFAULT) ;
//             NO_ENTRY_SIGNALS(*DEFAULT) ;
//             RESTRICTED_SIGNALS(*ENABLE) ;
//             SIGNAL_RECOLOUR(*ENABLE) ;
//             SIGNAL_EXTRA_ASPECTS(2)
  190 * 8       00 0E 01 01 00 50 01 00                 // signals_enable_programmable_signals
  191 * 8       00 0E 01 01 00 51 01 00                 // signals_enable_no_entry_signals
  192 * 8       00 0E 01 01 00 52 01 01                 // signals_enable_restricted_signals
  193 * 8       00 0E 01 01 00 53 01 01                 // signals_enable_signal_recolour
  194 * 8       00 0E 01 01 00 54 01 02                 // signals_extra_aspects

// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ** Signal Properties
// ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

// DEFSIGPRO   FEATURE(*SIGNALS) TYPE(*SIGNAL) ;
//             SIGNAL_ID(01) ;
//             SIGNAL_NAME("CA-Normal Signals" "CA-Normale Bahnsignale" "CA-Signaux normaux") ;
//             SIGNAL_TYPES_LIGHT(*PBS_ONE_WAY *PBS_TWO_WAY *BLOCK) ;
//             SIGNAL_TYPES_SEMAPHORE(*PBS_ONE_WAY *PBS_TWO_WAY *BLOCK) ;
//             SIGNAL_NO_ASPECT(*DEFAULT) ;
//             SIGNAL_LOOKAHEAD_SINGLE_ASPECT(*DEFAULT) ;
//             SIGNAL_LOOKAHEAD_EXTRA_ASPECT(*DEFAULT) ;
//             SIGNAL_RESERVE_THROUGH(*DEFAULT) ;
//             SIGNAL_NORMAL_SHUNT(*DEFAULT) ;
//             SIGNAL_OPPOSITE_SIDE(*DEFAULT) ;
//             SIGNAL_REALISTIC_BRAKING(*ENABLE) ;
//             SIGNALS_NO_DEFAULT(*DEFAULT) ;
//             COMMENT(Normal Signals)
  200 * 8       00 0E 01 01 00 60 01 01                 // signals_define_style
  201 * 9       00 0E 01 01 00 61 02 02 DC              // signals_style_name
  202 * 11      00 0E 01 01 00 62 04 31 00 00 00        // signals_style_electric_enabled
  203 * 11      00 0E 01 01 00 63 04 31 00 00 00        // signals_style_semaphore_enabled
  204 * 8       00 0E 01 01 00 64 01 00                 // signals_style_no_aspect_increase
  205 * 8       00 0E 01 01 00 65 01 00                 // signals_style_lookahead_extra_aspects
  206 * 8       00 0E 01 01 00 66 01 00                 // signals_style_lookahead_single_signal_only
  207 * 8       00 0E 01 01 00 67 01 00                 // signals_style_always_reserve_through
  208 * 8       00 0E 01 01 00 68 01 00                 // signals_style_combined_normal_shunt
  209 * 8       00 0E 01 01 00 69 01 00                 // signals_style_opposite_side
  210 * 8       00 0E 01 01 00 6A 01 01                 // signals_style_realistic_braking_only
  211 * 8       00 0E 01 01 00 6B 01 00                 // signals_no_default_style
The relevant game settings are set as follows :

Code: Select all

Interface
   Viewports
      Signals
         Show restricted electric signals using default graphics : OFF
         Show all signals using default graphics : OFF
      Signals (advanced)
         Show programmable pre-signal feature : OFF
         Show no-entry signals : OFF
         Show advanced routing restriction feature : ON
         Enable signals on bridges/tunnels advanced modes : ON

Vehicles
   Physics
      Train Acceleration Model : REALISTIC
      Train Braking Model : REALISTIC (Expert)
      Realistic train braking is aspect limited : ON (Expert, Difficult)
      Limit Train Acceleration : ON
What properties / settings do I have to change to make things work ? I would also like the trains to at least look ahead 3 signal blocks, i.e. reserve path for 3 signal blocks, if they can.

EDIT :

Some further testing has revealed :

Block Signals are ONE-WAY only. Why ?

Increasing the distance between signals (to 12), gets the train up to speed. But, slows to 100 km/h in front of every green block signal it encounters; although all signals are clear to the destination of the train.

Using two-way PBS signals, does not really work. Signals show a red aspect and only change to yellow briefly before passing. A high speed train driver should never see any yellow or red aspect, otherwise he will be late for dinner.
I can't test anything from just this, but this suggests that you're setting signals_style_lookahead_extra_aspects to 0?
If this is the case then you are explicitly preventing the "driver" from reading any signal aspect higher than that from the signal when using the realistic train braking is aspect limited setting, which is consistent with the behaviour above.
If you don't want to explicitly control this then there is no need to set this property at all.
Block Signals are ONE-WAY only. Why
Two way block signals don't make sense in any context using PBS, and therefore when using realistic braking.
It may be worth having a look at: https://github.com/JGRennison/OpenTTD-p ... ic-braking
dol422 wrote: 10 Dec 2023 15:43 Sometimes, I have a vehicle do a circular route, that is, it starts and ends in the same place. I usually do this for both directions. In the order list, you can set 'Departure board: Show as via' to indicate on the departure board where the vehicle goes, like below:
Department for Transport, 2676-09-16.png
However, on the departure board, the 07:00 departure shows as going via 'Flitwick Bridge Street' to get to 'Flitwick Hall Road'. The problem here is that 'Flitwick Hall Road' isn't the end station, as it loops back to the first order (highlighted green):
Department for Transport, 2676-09-16#1.png
The first three stops and last three stops for this vehicle are the same, which doesn't seem to be recognised by the departure board.

What I'm missing here, is an option to show which station appears as the end destination. I would presume some sort of setting which allows only scheduled dispatch stops" to appear on the departure board, or an order similar to the "departure board via" which says "show as end destination on departure board.
Those stops aren't shown as the final destination because they're part of the outbound journey.
In the general case of an A -> B -> C -> B -> A... route, the final destination from A is C, not B.
It may also be worth looking at the "Don't show termini that can be reached sooner on a later vehicle" setting.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1684
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote: 10 Dec 2023 16:19 I can't test anything from just this, but this suggests that you're setting signals_style_lookahead_extra_aspects to 0?
Yes, I have set it to 'default = 0'. I set all properties, including all the default ones. This enables me to make easy changes during development, i.e. without having to re-compile the source, only making changes to the NFO then just compile it with GRFCodec.

Is there a difference, between not setting a property at all -AND- setting it to its default value explicitly ?

I have set global setting 'signals_extra_aspects' to 2. Thinking that is enough. I will experiment with signal setting 'signals_style_lookahead_extra_aspects'.
I have read it, but a much older version; I'll go over it again.

Thank you for the info.
User avatar
JGR
Tycoon
Tycoon
Posts: 2565
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

OzTrans wrote: 10 Dec 2023 22:22 Is there a difference, between not setting a property at all -AND- setting it to its default value explicitly ?
The default value of signals_style_lookahead_extra_aspects is not 0, it's whatever value you set in the signals_extra_aspects property.
You can just set it to the value 2 to match what you used for signals_extra_aspects.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1684
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote: 11 Dec 2023 01:02
OzTrans wrote: 10 Dec 2023 22:22 Is there a difference, between not setting a property at all -AND- setting it to its default value explicitly ?
The default value of signals_style_lookahead_extra_aspects is not 0, it's whatever value you set in the signals_extra_aspects property.
You can just set it to the value 2 to match what you used for signals_extra_aspects.
All my fault, I should have read the specifications more carefully. All is working now, trains no longer slow before a signal and travel happily at full speed all the way to their destination even when passing junctions, stations and waypoints.
Wreckit
Engineer
Engineer
Posts: 3
Joined: 27 Feb 2023 15:43

Re: JGR's Patch Pack

Post by Wreckit »

Hi JGR
New update looks great tho by time i get round to playing again properly you maybe on another two versions :p
But overall keep up the good work. The programing signals have been great fun to use.

However the main reason to post is quirry if you've ever thought of implementing/ finnishing off Karn's "realistic shunting" to you're patch pack?

viewtopic.php?t=83374

I realise in its current state its kinda useless for cargodist but the potential it has could make for some great game play.


Regards
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests