Zandronum Chat @
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003477Doomseeker[All Projects] Bugpublic2018-08-30 09:582018-10-13 19:09
Assigned To 
PlatformOSOS Version
Product Version1.1 
Target VersionFixed in Version 
Summary0003477: ServerPtr and multiple "sources of truth"
DescriptionThere is a problem with multiple "sources of truth" when it comes to storing in memory all Server objects known to the program runtime. Some time ago we have solved crashes caused by using deleted Server objects by introducing ServerPtr, but it is still vague what is responsible for maintenance of their lifetime.

Depending on the server type, it is stored on following lists:

Master-server servers:
- ServerListModel ("GUI" element)
- MasterManager
- MasterClient

Custom/Pinned servers:
- ServerListModel ("GUI" element)
- CustomServers (which itself is stored in MasterManager)

LAN servers:
- ServerListModel ("GUI" element)
- BroadcastManager (which is owned by MainWindow GUI element)

This begun to cause problems upon implementation of 0003388 which allows the "Master-server servers" to be dynamically converted into "Custom servers" and then survive the total refresh. This exposed a problem with disconnect() where the Server was made "mute" to the world while still being on the list. Calling disconnect() is not unlike using the 'delete' instruction, the only difference is if there is an error in ownership assumption, in the latter case the program will crash, and in the former it will go into undefined states.

Ownership issues should be resolved - possibly by removing all collections of servers from MasterClients, MasterManagers, CustomServers and etc. In some cases it will be necessary to keep such "secondary" list, however none of the objects other than the sanctioned one should assume any ownership privileges.

It looks like ServerListModel should be the best candidate for the "single source of truth", however there's an issue of it being a GUI element. On the other hand, this GUI element already must have information on servers for filtering and sorting purposes and for performance, so perhaps it's the only logical place.
Attached Files

- Relationships
related to 0003388closedZalewa Mark servers as favorite 
related to 0003397closedPol M Buddies in LAN servers are not detected. 

-  Notes
There are no notes attached to this issue.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2018-08-30 09:58 Zalewa New Issue
2018-08-30 09:59 Zalewa Relationship added related to 0003388
2018-10-05 06:36 WubTheCaptain Priority normal => low
2018-10-13 14:45 Zalewa Relationship added related to 0003397
2018-10-13 19:09 WubTheCaptain Status new => acknowledged

Questions or other issues? Contact Us.


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker