difference in simulator and device

Hi, I cannot get what is happening:

there is a next button which defined :
[lua] self.button_update = ui.newButton {
id = ‘button_update_item’,
default = “item_manager_button_release.png”,
over = “item_manager_button_press.png”,
onRelease = function(event) self:update_clicked(event, self.button_update); end,
text = ‘Update’,
textColor = {0, 0, 255, 255},
}[/lua]

and it’s handler :
[lua]function ItemManager:update_clicked(event)
– system.vibrate()
self.item.name = self:get_name()
self.item.qty = self:get_qty()
self.list_manager:replace_item(self.id, self.item)
print(’—’)
self:remove()
self.list_manager:show()
end[/lua]

The problem is in row [lua]self:remove()[/lua]
it has next code:
[lua]function ItemManager:remove()
native.showAlert(’…’, ‘point 1’, {‘OK’})
self.group.isVisible = false
if isSimulator then

else
native.showAlert(’+++’, ‘ItemManager:remove() inside not simulator’, {‘OK’})
if textField then
textField:removeSelf()
textField = nil
end
if qty_field then
qty_field:removeSelf()
qty_field = nil
end
end
end[/lua]

So the difference is that in simulator everything works fine.
But on device it looks like that function isn’t called. Because
[lua]native.showAlert(’…’, ‘point 1’, {‘OK’})[/lua]
doesn’t appear.

What can it be ? [import]uid: 44975 topic_id: 7906 reply_id: 307906[/import]

Of course without debug it was not easy but somehow was done :slight_smile:

but another problem still presents on real device

I have 3 text fields. if I make activity with the 1st everything is OK. but after touching 2nd or 3rd application crashes totally.
All 4 fields are global variables. What can it be ? [import]uid: 44975 topic_id: 7906 reply_id: 28084[/import]

i am not sure if this part of log can help ?
[text]
D/dalvikvm( 1365): GC freed 7503 objects / 380688 bytes in 130ms
D/dalvikvm( 1767): GC freed 229 objects / 10032 bytes in 77ms
D/WindowManager( 1278): interceptKeyTq event=android.view.RawInputEvent@2f8ce4a0 keycode=0 screenIsOn=true keyguardActive=false
D/WindowManager( 1278): interceptKeyTq event=android.view.RawInputEvent@2f8ce4a0 keycode=0 screenIsOn=true keyguardActive=false
I/Corona ( 2442): after replace item in list
I/Corona ( 2442): init ListManager
I/Corona ( 2442): end of ListManager:init()
I/Corona ( 2442): point 1
I/Corona ( 2442): point 2
I/Corona ( 2442): point 3
I/Corona ( 2442): point 4
I/Corona ( 2442): end of update
I/#LGIME ( 1359): ### onFinishInput
I/#LGIME ( 1359): #### onStartInput: false,-1
I/#LGIME ( 1359): #### mInputType (startInput): 524289
I/WindowManager( 1278): WIN DEATH: Window{2fb3e098 SurfaceView paused=false}
I/WindowManager( 1278): WIN DEATH: Window{2fa65590 info.peskov.corona.shoppingList/info.peskov.corona.shoppingList.MyCoronaActivity paused=false}
I/ActivityManager( 1278): Process info.peskov.corona.shoppingList (pid 2442) has died.
E/AudioPolicyManager( 1136): setOutputDevice() output 1 device 0 delayMs 108
I/UsageStats( 1278): Unexpected resume of com.lge.launcher while already resumed in info.peskov.corona.shoppingList
W/Flex ( 1365): getString FLEX_OPERATOR_CODE OPEN
D/Zygote ( 1135): Process 2442 terminated by signal (11)
W/InputManagerService( 1278): Got RemoteException sending setActive(false) notification to pid 2442 uid 10071
I/#LGIME ( 1359): #### onStartInput: false,2131230728
I/#LGIME ( 1359): #### mInputType (startInput): 0

[/text] [import]uid: 44975 topic_id: 7906 reply_id: 28102[/import]