tyaslab / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

waitForEvent() crashes #643

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What device(s) are you experiencing the problem on?
Iconia Tab A200

What firmware version are you running on the device?
Cyanogenmod 9

What steps will reproduce the problem?
1. Run this Lua script:
require "android"
android.webViewShow("http://google.ca") --any page or local file works
local str = android.waitForEvent("quit")
print("Got event: ", str)

What is the expected output? What do you see instead?
Expected: nothing until the page posts a quit event, at which point the script 
exits normally.
Actual: waitForEvent() returns some table immediately, and SL4A crashes when 
the script completes, which occurs before the webview even appears.

What version of the product are you using? On what operating system?
r6 on CM9.

Please provide any additional information below.

Original issue reported on code.google.com by hyperhac...@gmail.com on 14 Jul 2012 at 7:50

GoogleCodeExporter commented 9 years ago
Tsk, a bracket disappeared from the script when I copied it:
android.webViewShow("http://google.ca")

Original comment by hyperhac...@gmail.com on 14 Jul 2012 at 7:51

GoogleCodeExporter commented 9 years ago
Probably related: every call to waitForEvent("quit") returns an object with the 
field error=java.Lang.NullPointerException. SL4A also doesn't crash if you 
select the gear icon instead of the terminal icon to execute the script.

Original comment by hyperhac...@gmail.com on 14 Jul 2012 at 8:36