Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch to guard for NO_DEBUG_MESSAGES #6652

Closed
DorpsGek opened this issue Jan 3, 2018 · 4 comments · Fixed by #6703
Closed

Patch to guard for NO_DEBUG_MESSAGES #6652

DorpsGek opened this issue Jan 3, 2018 · 4 comments · Fixed by #6703
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jan 3, 2018

Borg opened the ticket and wrote:

Here is patch do suppress all debug messages when
someone is compiling with NO_DEBUG_MESSAGES defined.
No all places had it.

Attachments

Reported version: 1.7.2
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6652
@DorpsGek
Copy link
Member Author

frosch wrote:

The desync debug messages are no ordinary debug messages. They are for replaying games.
Making NO_DEBUG_MESSAGES interfer with that sounds weird to me.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6652#comment14866

@DorpsGek
Copy link
Member Author

Borg wrote:

Woops, indeed.. I got carried away here..
Attaching fixed patch.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6652#comment14874

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
@TrueBrain
Copy link
Member

TrueBrain commented Apr 10, 2018

This feels off to me. NO_DEBUG_MESSAGE seems a bit unrelated to debugging the debug_desync_level. I would at least except either another define, or higher up an error that you cannot have a debug_desync_level with NO_DEBUG_MESSAGE. I should have read the comments; frosch already said this :D

The genworld.cpp seems valid :D

@TrueBrain
Copy link
Member

Okay, this NO_DEBUG_MESSAGES is a bit weird. First of all, you cannot change it without modifying files. But also, debug_desync_level does a lot more than just spitting out messages. But the other debug_NNN_level mostly only changes what is being printed. A very weird combination, that is hard to untangle. Not sure that the supplied patch is the best way.

Possibly it is easier to just remove NO_DEBUG_MESSAGES.

TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Apr 11, 2018
Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action

This fixes OpenTTD#6652.
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Apr 11, 2018
Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action

This fixes OpenTTD#6652.
TrueBrain added a commit that referenced this issue Apr 11, 2018
…ion (#6703)

Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action

This fixes #6652.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants