HaxeFoundation / HaxeFoundation/hxcpp

Rare startup crash when using multiple threads

Open
#835 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

Since a long time I experience a very rare startup crash in GCFreeZone (see also my confusion in #758). When it happens, it only happens rarely, preferably in release builds and when it started happening more often a small sleep or shifting things around helped. But tonight I could create a situation which caused the issue very reliably, I tried to use that to finally find the cause... I'm still not 100% sure but I think the problem is caused by setting gMultiThreadMode to true at the exact wrong moment, namely after entering and before leaving a gc-free-zone. I fixed it for Kha by just setting it to true from the start (Kha always runs mutltithreaded anyway) and so far things seem to be fine for me now.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.