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

Some touches cause crash on android #160

Open
vincent-schirmann opened this issue Aug 20, 2021 · 0 comments
Open

Some touches cause crash on android #160

vincent-schirmann opened this issue Aug 20, 2021 · 0 comments

Comments

@vincent-schirmann
Copy link

We noticed a lot of crashes in the TouchProcessor.
I can't reproduce it very often. Sometimes when I touch a lot, or when I slide the android status bar...
Here's the trace

08-20 13:46:27.651 24475 25974 E HXCPP   : Called from hxcpp::__hxcpp_main
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from ApplicationMain::main ApplicationMain.hx line 25
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from ApplicationMain::create ApplicationMain.hx line 130
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from lime.app.Application::exec lime/app/Application.hx line 150
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from lime._internal.backend.native.NativeApplication::exec lime/_internal/backend/native/NativeApplication.hx line 146
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from lime._internal.backend.native.NativeApplication::handleRenderEvent lime/_internal/backend/native/NativeApplication.hx line 370
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from lime.app._Event_lime_graphics_RenderContext_Void::dispatch lime/_internal/macros/EventMacro.hx line 91
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from openfl.display.Stage::__onLimeRender openfl/display/Stage.hx line 1950
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from openfl.display.Stage::__broadcastEvent openfl/display/Stage.hx line 1166
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from openfl.display.DisplayObject::__dispatch openfl/display/DisplayObject.hx line 1399
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from openfl.events.EventDispatcher::__dispatchEvent openfl/events/EventDispatcher.hx line 402
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from starling.core.Starling::onEnterFrame starling/core/Starling.hx line 700
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from starling.core.Starling::nextFrame starling/core/Starling.hx line 469
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from starling.core.Starling::advanceTime starling/core/Starling.hx line 482
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from starling.events.TouchProcessor::advanceTime starling/events/TouchProcessor.hx line 201
08-20 13:46:27.651 24475 25974 E HXCPP   : Called from starling.events.TouchProcessor::processTouches starling/events/TouchProcessor.hx line 273
08-20 13:46:27.651 24475 25974 E Exception: Null Object Reference

Anyway, I found it to be relative to openfl bug : openfl/openfl#2495

Until the bug is fixed, the workaround could be either use Array instead of Vector, or protect the Std.isOfType(touchData, Touch) && cast(Reflect.field(touchData, "touch"), Touch) by a isOfType test.

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

No branches or pull requests

1 participant