damonkohler / sl4a

SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.
Apache License 2.0
2.43k stars 800 forks source link

App frozen when adding a phone trigger #148

Open damonkohler opened 9 years ago

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:29

What device(s) are you experiencing the problem on?
HTC Desire Z

What firmware version are you running on the device?
Android 2.2.1
2.6.32.21 kernel
1.82.405.1 software number

What steps will reproduce the problem?
1. Open SL4A
2. Menu -> View -> Triggers
3. Menu -> Add
4. Select a script
5. Select "phone" as the trigger kind

What is the expected output? What do you see instead?
The app is frozen. It should not freeze and create the trigger.

What version of the product are you using? On what operating system?
SL4A R4 on Android 2.2.1.
Also tried with source build, and got the same defect.

Please provide any additional information below.

It looks like a deadlock, as the MainThread.run() method is executed in the 
main thread associated with the supplied context, so the supplied task cannot 
be run until the MainThread.run() finishes, and MainThread.run() does not 
finish if the task is not ran.
I solved the problem with the attached patch.

Original issue reported on code.google.com by alessand...@gmail.com on 4 May 2011 at 8:31

Attachments:

Copied from original issue: damonkohler/android-scripting#544

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:29

....sorry for the log file extension... obviously it's a txt.
And the patch I attached is wrong... I am deleting it. This is the good one.

Original comment by alessand...@gmail.com on 4 May 2011 at 8:37

Attachments:

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:29

If someone is interested, have created a patched apk that fixes this issue 
which can be downloaded here:

http://www.alessandropira.org/sl4a/sl4a.html

Original comment by alessand...@gmail.com on 27 May 2011 at 11:57

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:29

Thanks. Will investigate.

Looking at incorporating your fixes in the next release, but you'll need to 
sing a CLA:

http://code.google.com/p/android-scripting/wiki/DeveloperGuide#Contributor_Licen
se_Agreements

You must sign a Contributor License Agreement (CLA) before we can
accept any code. The CLA protects you and us. It's quick and painless,
just type in your name and click submit.

Let us know when it's done.

Original comment by rjmatthews62 on 21 Aug 2011 at 12:40

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:29

[deleted comment]
damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:29

Done.

Original comment by alessand...@gmail.com on 23 Aug 2011 at 7:10