-
Notifications
You must be signed in to change notification settings - Fork 302
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
Vehicles: Additional cleanup #583
Open
insunaa
wants to merge
3
commits into
cmangos:master
Choose a base branch
from
insunaa:vehiclecleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the nullptr is unnecessary. It will happen when unit is deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so too, and then I had a crash
![image](https://private-user-images.githubusercontent.com/3718129/400142086-80323d88-43df-40df-bc42-370c460ac80b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTkzNTEsIm5iZiI6MTczODk5OTA1MSwicGF0aCI6Ii8zNzE4MTI5LzQwMDE0MjA4Ni04MDMyM2Q4OC00M2RmLTQwZGYtYmM0Mi0zNzBjNDYwYWM4MGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMDcxNzMxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWEzZWU0MTQ5MGMzMzcwMTMxMzJhYmM0MjIyY2RhM2Q1ZTQ1OTU1ZmFkNjYyODNmMTA1MDk0MTgyYzRmODY1YSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.pPmno9YCcDjLMJDeyetZIqFqdnUMHyLNa-EE38sOZpU)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I mean sure, that fails due to MANGOS_ASSERT(m_passengers.empty()); but I fail to see how calling destructor (by setting the ptr to nullptr) fixes that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because setting it to nullptr early means that
IsVehicle()
orif (m_vehicleInfo)
returns false, both of which are used in other aspects of the cleanup.I haven't yet been able to provoke this same crash again, the server has been running stably for ~2 hours now with no crashes since I added the
= nullptr;
and I'll keep it running some more to see if maybe the crash re-occurs. If it doesn't then I'll just assume setting it tonullptr
fixed the issue. If it does I'll have to investigate some more. In any case this crash occurred as shown in the crashlog and I couldn't find any other reason for why passengers might not be empty when the crash occurred