feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
915 stars 386 forks source link

App crashes after setting `text` property of TextInput #1727

Closed subdan closed 6 years ago

subdan commented 6 years ago

Hello, Josh. I use the latest version of Feathers and Starling. I have a simple TextInput:

var nameInput:TextInput = new TextInput();
nameInput.addEventListener(Event.CHANGE, nameInput_changeHandler);
nameInput.prompt = "Your name";
// nameInput.text = "John";
addChild(nameInput);

If I uncomment nameInput.text = "John"; my app crashes.

Why my app crashes?

If I set text property after 5 sec it doesn't crash.

setTimeout(setName, 5000);
function setName()void
{
    nameInput.text = "John";
}
joshtynjala commented 6 years ago

Which platform? Which ITextEditor? Which version of AIR?

subdan commented 6 years ago

Android, AIR 29, StageTextTextEditor, TopcoatLightMobileTheme

It happens only when I debug my app on real Android device.

joshtynjala commented 6 years ago

I tried to reproduce this issue on a couple of different Android devices (Google Nexus 5 and Samsung Galaxy S5), but I could not make it crash.

I implemented nameInput_changeHandler like this:

private function nameInput_changeHandler(event:Event):void
{
    trace("change", TextInput(event.currentTarget).text);
}
subdan commented 6 years ago

I do not know why it doesn't crash on your devices. I use a workaround to avoid this issue. You can close this issue.