Hello guys.
I don’t understand where I’m wrong. The system.activate( “multitouch” ) breaks my app on many levels.
Development environment: windows8.1 64 bit. Last corona build (2014.2511). Java SE 7, as requested.
In the main.lua file I just call the
[lua]
system.activate( “multitouch” )
[/lua]
First issue.
On the simulator I get the console error
Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?
attempt to call a table value
and sometimes the app crashes with the alert error “attempt to call a table value”.
But well, ok, I read that the multitouch is not supported on the simulator. So I add the multitouch only on the devices.
[lua]
if system.getInfo( ‘environment’ ) ~= ‘simulator’ then
system.activate( “multitouch” )
end
[/lua]
Now, I build the app for android without issue. Also the installation on the devices (kindle fire hd and nexus7) doesn’t report errors. But then it crashes when I close an overlay. The code is really simple. 3 files,
In main.lua
[lua]
system.activate( “multitouch” )
composer.goToScene(‘gamelist’)
[/lua]
On gamelist.lua I add a widget.newButton with the onPress that does a
[lua]
composer.showOverlay(“difficulty_level_overlay”)
[/lua]
No problem until here.
On the difficulty_level_overlay.lua file, just another widget.newButton with the onPress that does a
[lua]
composer.hideOverlay()
[/lua]
With the multitouch activated, if I repeat to open-close the overlay with the two buttons, eventually the app crashes. No lua errors, but if I check the logcat, I see a
libc (13987): Fatal signal 11 (SIGSEGV)
Here (dropbox) the corona project, the compiled app, and the logcat.
Could someone take a look and tell me what I’m doing wrong? Thank you!