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

NPE when launching script from desktop shortcut #149

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. Create a python script
2. Add a shortcut on the desktop
3. Reboot the phone (or wait for a long time)
4. Tap on the shortcut

What is the expected output? What do you see instead?
The script should be executed with no error. I see an error popup, instead. 
Then, after a while, the script is executed.

What version of the product are you using? On what operating system?
SL4A R4 on Android 2.2.1 with python for android (interpreter version: 16)
Also tried with source build, and got the same error.

Please provide any additional information below.

This issue is somehow like issue n. 432, but the proposed patch for the 432 
does not fix this problem.
It seems that the script is executed before the python interpreter is started. 
This does not happens every time, and it's not easy to reproduce, since once 
that the interpreter is loaded the problem does not show up anymore.
I am attaching a patch that I tried and it seems to solve the problem.

Original issue reported on code.google.com by alessand...@gmail.com on 3 May 2011 at 6:55

Attachments:

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

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:58