STREGAsGate / GateEngine

Swift Game Engine supporting Windows, Linux, macOS, HTML5, and more 🚂
Apache License 2.0
280 stars 6 forks source link

Gravity Tests Crash on HTML5 #36

Open STREGA opened 11 months ago

STREGA commented 11 months ago

The test executable crashes during tests involving Gravity scripts at WASIPlatform.fetch() Deferring solving this bug until it gets hit in a GateEngine project where more information might be available in output.

Debugging Discoveries The crash occurs after JSPromise.value returns and before the retuned value is stored.

Thoughts:

The crash trace:

<?>.wasm-function[swift_task_asyncMainDrainQueueImpl()]@[wasm code]
<?>.wasm-function[swift_task_asyncMainDrainQueue]@[wasm code]
<?>.wasm-function[XCTMainRunLoopMain]@[wasm code]
<?>.wasm-function[$s6XCTest7XCTMain_9arguments9observersySayAA0A4CaseCm04testE5Class_SaySS_yAFKctG8allTeststG_SaySSGSayAA0A11Observation_pGtF]@[wasm code]
<?>.wasm-function[$s6XCTest7XCTMainyySayAA0A4CaseCm04testC5Class_SaySS_yADKctG8allTeststGF]@[wasm code]
<?>.wasm-function[$s22GateEnginePackageTests6RunnerV4mainyyFZ]@[wasm code]
<?>.wasm-function[$s22GateEnginePackageTests6RunnerV5$mainyyFZ]@[wasm code]
<?>.wasm-function[main]@[wasm code]
wasm-stub@[wasm code]
49869@[native code]
@http://127.0.0.1:8080/test.js:8948:30

Tests involving gravity are disabled on HTML5 using a package define DISABLE_GRAVITY_TESTS