News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

V124.0 and maybe before: message list overflows

Started by FLN, May 26, 2025, 07:04:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FLN

Particularly in multiplayer games, it becomes obvious, that the message list overflows.
I mean, after a certain date/amount of messages the list will no longer hold new entries between sessions.

While a session takes place, the list get's updated as normal, but after leaving the game and returning later, all future messages after this certain point are lost and won't be shown in the list anymore.
(I guess it might have a similar cause like the "bug" with the chat history overflowing, July/August last year. Though I wasn't able to find the concerning bug report anymore.)


victor_18993

I investigated this and was able to reproduce the historical problem.

The bug was in the save path for the message history.

The important detail is that the normal message list and the chat list use opposite ordering:

- normal messages: newest messages are stored at the front
- chat messages: newest messages are stored at the back

In r11301, a change intended to keep the newest entries when saving was applied to both lists in the same way.

That was correct for chat, but wrong for the normal message list: once there were more than 2000 messages, the savegame kept the oldest 2000 and discarded the newer ones.

This explains the reported behaviour exactly:

- new messages were visible normally during the active session
- after saving/leaving and loading/rejoining, messages beyond that point disappeared

The issue was corrected in two later revisions:

- r11690 corrected which 2000 messages are retained
- r11694 corrected the corresponding write loop

The first release containing the complete fix is Simutrans 124.4.

I also tested the current trunk around the boundary:

1999 messages -> all retained
2000 messages -> all retained
2001 messages -> oldest one discarded
2500 messages -> newest 2000 retained

So the current behaviour is correct: the history intentionally retains the newest 2000 messages.

Could you please re-check this with 124.4 or newer?

If it still occurs there, we can investigate that as a separate current issue.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)