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

Occasional crash when testing VoxelLodTerrain #52

Closed
Zylann opened this issue Aug 22, 2019 · 1 comment
Closed

Occasional crash when testing VoxelLodTerrain #52

Zylann opened this issue Aug 22, 2019 · 1 comment
Labels

Comments

@Zylann
Copy link
Owner

Zylann commented Aug 22, 2019

I'm sometimes getting a crash when testing VoxelLodTerrain. It's happening randomly, but so far it's been happening when duplicate_rejection is enabled in one of the threaded block managers. I need to investigate more to find the cause. It seems to happen more if you move fast in a very erratic way, back and forth etc.
I suspect this one has been there for a while according to 3465334

Clues:

Assigning an input block in shared input, but the previous value in the vector contains a Ref<T> with uninitialized memory, causing garbage delete. Considering stuff like this is able to run, it could be a vector overrun. I also found that in Godot debug builds, _DEBUG isn't defined on Windows, which disables STL boundary checks...
image

Inserting an item into the block_indexes HashTable which is used for duplicate rejection. But that hashmap's memory was already freed according to the magic number there
image

Okay, I think I found it.
duplicate rejection isn't locking the mutex to access block_indexes, and both threads are writing to it.

@Zylann Zylann added the bug label Aug 22, 2019
@Zylann
Copy link
Owner Author

Zylann commented Aug 24, 2019

Should be fixed by adc6a93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant