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 in InterpreterInstaller during interpreter installation #118

Open damonkohler opened 9 years ago

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

What device(s) are you experiencing the problem on?
Nexus 1

What firmware version are you running on the device?
What is the device firmware version?  The build number? Or the baseband 
version, or build number?

What steps will reproduce the problem?
1. Install my interpreter

What is the expected output? What do you see instead?
Interpreter should get installed.

The installer is force-closed instead due to a NPE in the framework code.

I am building an adapter for an interpreter that uses the Dalvik VM to run a 
.jar. I am using Bsh interpreter as an example.  I am now installing the APK 
via the Eclipse Android SDK, and therefore have no interpreter archive, no 
extras archive and no scripts archive.

On install I get the following exception:

12-09 21:43:53.302: E/AndroidRuntime(28318): java.lang.NullPointerException
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
com.googlecode.android_scripting.InterpreterInstaller$2.run(InterpreterInstaller
.java:128)
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
android.os.Handler.handleCallback(Handler.java:587)
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
android.os.Handler.dispatchMessage(Handler.java:92)
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
android.os.Looper.loop(Looper.java:123)
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
com.googlecode.android_scripting.InterpreterInstaller.executeInBackground(Interp
reterInstaller.java:228)
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
com.googlecode.android_scripting.InterpreterInstaller.access$3(InterpreterInstal
ler.java:212)
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
com.googlecode.android_scripting.InterpreterInstaller$3.run(InterpreterInstaller
.java:199)
12-09 21:43:53.302: E/AndroidRuntime(28318):    at 
java.lang.Thread.run(Thread.java:1019)

Original issue reported on code.google.com by fil...@gmail.com on 10 Dec 2011 at 6:02

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

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

I took a look at the source code.  It seems that the installer gets confused 
when an interpreter descriptor says that the package has neither the 
interpreter zip, nor the scripts zip nor the extras zip.

Original comment by fil...@gmail.com on 10 Dec 2011 at 9:03