Bug? Another "Fatal signal 11 (SIGSEGV)" issue

Serdar K.

Member
Licensed User
Longtime User
Hi,

I am getting a "Fatal signal 11 (SIGSEGV) at 0xfff0f0f0 (code=1), thread 13012 (om.census.ipsos)" message in the code below (with an Android 4.1.2 device). It is random. Once in 3-4 executions , it happens and the app crashes without any B4A error message. I found out that this is related to the same issue on the keypress event reported in another post :
https://www.b4x.com/android/forum/threads/android-4-3-pb-with-closing-the-app.31328/#post-186702

The original code resulting the issue (sometimes) is :

B4X:
Sub OnMarkerDragListener1_DragEnd(Marker1 As Marker)
  
Dim str0,strlat00, strlon00  As String
    Dim m001 As Marker
    Dim vstrSourceID As String

    m001 = Marker1
    If m001<>Null Then
        If m001.IsInitialized Then

        vstrSourceID = m001.Snippet
        strlat00 = m001.Position.Latitude
        strlon00 = m001.Position.Longitude

         Dim bmp As Bitmap
        bmp.Initialize(File.DirAssets, "question.png")
        Dim choice As Int
        str0 = "'" & vstrSourceID & " kodlu '" & m001.Title& "' noktası E:" & strlat00 & "-B:" & strlon00 & " konumuna taşınıyor." & CRLF & "İşlemi onaylıyor musunuz ?"
        choice = Msgbox2(str0, "Nokta taşıma", "Evet", "", "Hayır", bmp)

          If choice = DialogResponse.POSITIVE Then
            str0 = "UPDATE Sources SET Latitude='" & strlat00 & "', Longitude='" & strlon00 & "', Changed=1, Synchronized=NULL WHERE SourceID='" & vstrSourceID & "' ;"
            General.SQL1.ExecNonQuery(str0)

            CallSubDelayed2(SourceScreen, "EditSource", m001 )
            ToastMessageShow("Nokta bilgilerini ve adresi güncelleyip gerekli değişiklikleri yaptıktan sonra kaydı güncelleyiniz.", False )
          Else
          
             Dim Cursor12 As Cursor
            Dim vstrSQL002 As String = "SELECT Latitude, Longitude FROM Sources where SourceID='" & vstrSourceID & "' LIMIT 1 ;"
            Cursor12 = General.SQL1.ExecQuery( vstrSQL002 )
            If Cursor12.RowCount > 0 Then
               Cursor12.Position=0              
               Dim vfltLat As Float= Cursor12.GetString("Latitude")
               Dim vfltLon As Float= Cursor12.GetString("Longitude")
               MarkerOldPos.Initialize(vfltLat, vfltLon)
            Else
            End If
             Cursor12.Close      
          
            Marker1.Position = MarkerOldPos
  
            ToastMessageShow("Nokta eski yerine geri alındı.", False )
          End If
      
        End If
    End If   
MarkerOldPos = Marker1.Position
  
End Sub


The unfiltered log messages related to issue :

...
setHidden false
setHidden false
Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.1880 ] (Here is marker touched for drag)
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] (Here is marker released for drop)
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
PhoneWindowManager: focusChangedLw
PhoneWindowManager: focusChangedLw: Call setFocusedWindow()
SpenGestureView: setFocusedWindow
setHidden false
setHoveringSpenIconStyle1 pointerType: 10001iconType:1
setHoveringSpenCustomIcon IconType is same.1
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@433148c0 attribute=null
setHidden false
id=1316 Removed nain idx=5 MapSz=5
id=1316 Removed nain idx=-2 MapSz=5
setHidden false
setHidden false
Fatal signal 11 (SIGSEGV) at 0xfff0f0f0 (code=1), thread 13012 (om.census.ipsos) (the error)
enqueueToast()
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/p4noterfjv/p4noterf:4.1.2/JZO54K/N8005JVCMA3:user/release-keys'
pid: 13012, tid: 13012, name: om.census.ipsos >>> com.census.ipsos <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr fff0f0f0
r0 00000001 r1 40fe7068 r2 ffffffff r3 fff0f0f0
r4 62bb1efc r5 40252d89 r6 5161d1e0 r7 00000001
r8 00000029 r9 00000000 sl 5161d1f4 fp 00000029
ip 402c40b4 sp beaf84a8 lr 4086bfa9 pc 40090a4c cpsr 60000030
d0 0000000080000000 d1 404474ba80000000
d2 419fef9f5be0c5f8 d3 449a000000000000
d4 0000007300000127 d5 449a000044480000
d6 000000004447c000 d7 00000000c2600000
d8 0000000000000000 d9 8000000000000000
d10 419ff5bc36fb6e5d d11 419ff5bc07fd6f0d
d12 08035a9240000000 d13 41a006b524000000
d14 0000000008035a92 d15 c117ae110491a2e3
d16 0000000e0000000d d17 7e37e43c8800759c
d18 3f60d152b6088630 d19 3fe9151e6e2f3ff0
d20 3ff0000000000000 d21 3fa732c9cf959fb4
d22 3fcc71ca8790650d d23 3fd24927cb01c985
d24 3fd9999d873a361c d25 3fe55557dbd00e1f
d26 3f57fef05f48aa82 d27 3f9684d6e47700d6
d28 3f8240bf511a7285 d29 3fabc91078279ad0
d30 bc5a626331000000 d31 0000000000000000
scr 60000011
backtrace:
#00 pc 00014a4c /system/lib/libutils.so (android::Looper:: PollInner(int)+531)
#01 pc 00014b01 /system/lib/libutils.so (android::Looper:: PollOnce(int, int*, int*, void**)+104)
#02 pc 0006315b /system/lib/libandroid_runtime.so (android::NativeMessageQueue:: PollOnce(_JNIEnv*, int)+22)
#03 pc 0001df30 /system/lib/libdvm.so (dvmPlatformInvoke+112)
#04 pc 0004d183 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
#05 pc 00027360 /system/lib/libdvm.so
#06 pc 0002bc68 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
#07 pc 0005fbb7 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
#08 pc 00067165 /system/lib/libdvm.so
#09 pc 00027360 /system/lib/libdvm.so
#10 pc 0002bc68 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
#11 pc 0005f8f1 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
#12 pc 00049773 /system/lib/libdvm.so
#13 pc 0004c169 /system/lib/libandroid_runtime.so
#14 pc 0004d26f /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
#15 pc 00000dcf /system/bin/app_process
stack:
beaf8468 402aac19 /system/lib/libandroid_runtime.so
beaf846c 40fe7068
beaf8470 40fe7068
beaf8474 40258057 /system/lib/libandroid_runtime.so (android::MessageQueue::raiseAndClearException(_JNIEnv*, char const*)+18)
beaf8478 00000000
beaf847c 40fe7068
beaf8480 511a1008
beaf8484 00000001
beaf8488 00000029
beaf848c 40252de9 /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::handleEvent(int, int, void*)+96)
beaf8490 ffffffff
beaf8494 ffffffff
beaf8498 62bb1efc
beaf849c 40252d89 /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::handleEvent(int, int, void*))
beaf84a0 df0027ad
beaf84a4 00000000
#00 beaf84a8 58580440
beaf84ac 5875f28c /system/lib/egl/libGLESv2_mali.so (_gles_set_draw_frame_builder+1660)
beaf84b0 00000004
beaf84b4 00000001
beaf84b8 00000003
beaf84bc 5161d228
beaf84c0 000027b5
beaf84c4 000027e2
beaf84c8 00000000
beaf84cc 00000000
beaf84d0 00000000
beaf84d4 00000029
beaf84d8 58677f00 /system/lib/egl/libEGL_mali.so
beaf84dc 00000000
beaf84e0 00000000
beaf84e4 5728bb88
........ ........
#01 beaf8610 00000000
beaf8614 5161d1b0
beaf8618 00000000
beaf861c 40fe7068
beaf8620 5738de20
beaf8624 beaf8648 [stack]
beaf8628 5738de18
beaf862c 4025815f /system/lib/libandroid_runtime.so (android::NativeMessageQueue:: PollOnce(_JNIEnv*, int)+26)
#02 beaf8630 00000000
beaf8634 40fe7068
beaf8638 574e3b18 /dev/ashmem/dalvik-LinearAlloc (deleted)
beaf863c 40ef39a0
beaf8640 00000000
beaf8644 40840f34 /system/lib/libdvm.so (dvmPlatformInvoke+116)
memory near r1:
40fe7048 41152530 4013a544 4013a53c 4013a53c 0%.AD..@<..@<..@
40fe7058 00000000 00000000 00000020 00000023 ........ ...#...
40fe7068 408c6dd4 00000000 00000001 40ef39a0 [email protected].@
40fe7078 00000000 40dd2230 00000000 00000013 ....0".@........
40fe7088 40fe7158 40fe71a0 40fe71b8 000000a3 [email protected][email protected].@....
memory near r4:
62bb1edc 41b00000 3f800000 00000000 00000000 ...A...?........
62bb1eec 00000000 00000000 00000000 00000000 ................
62bb1efc 00000000 573ce630 00000000 fff0f0f0 ....0.<W........
62bb1f0c 00000000 40800000 05000101 628614a0 [email protected]
62bb1f1c 00000009 00000050 0000001b 00000001 ....P...........
memory near r5:
40252d68 00057e11 00057dc3 0007bc42 00057e39 .~...}..B...9~..
40252d78 00057e4a 00057e21 00053ce4 00057e00 J~..!~...<...~..
40252d88 f012b573 4606040c d0084613 20064919 s......F.F...I.
40252d98 44794a19 f7de447a 2000eb10 07dae029 .JyDzD..... )...
40252da8 4916d408 4a162005 447a4479 eb04f7de ...I. .JyDzD....
memory near r6:
5161d1c0 00000000 0000001b 00000004 00000004 ................
5161d1d0 5161d1b0 00000000 00000000 00000073 ..aQ........s...
5161d1e0 40095bb8 57066f28 dead1000 0000001c .[.@(o.W........
5161d1f0 0000001f 00000000 400959f8 00000000 .........Y.@....
5161d200 00000000 00000000 00000010 00000000 ................
memory near sl:
5161d1d4 00000000 00000000 00000073 40095bb8 ........s....[.@
5161d1e4 57066f28 dead1000 0000001c 0000001f (o.W............
5161d1f4 00000000 400959f8 00000000 00000000 .....Y.@........
5161d204 00000000 00000010 00000000 00000020 ............ ...
5161d214 40095a40 511a25d8 00000003 00000000 @Z.@.%.Q........
memory near ip:
402c4094 4002e915 4002d571 400fdc30 40181299 ...@q..@0..@...@
402c40a4 401812f9 4002e517 4002e775 4002e14d ...@...@u..@M..@
402c40b4 401819fb 40178fe5 40179021 4017906b ...@...@!..@k..@
402c40c4 4017ac39 4017a5f5 4017a6cb 4017a675 9..@...@...@u..@
402c40d4 4017a6bb 4017a76f 4017a7a1 4017acdd ...@o..@...@...@
memory near sp:
beaf8488 00000029 40252de9 ffffffff ffffffff )....-%@........
beaf8498 62bb1efc 40252d89 df0027ad 00000000 ...b.-%@.'......
beaf84a8 58580440 5875f28c 00000004 00000001 @.XX..uX........
beaf84b8 00000003 5161d228 000027b5 000027e2 ....(.aQ.'...'..
beaf84c8 00000000 00000000 00000000 00000029 ............)...
code around pc:
40090a2c 8004f8d0 692368c0 68024641 68226895 .....h#iAF.h.h"h
40090a3c b91847a8 46414630 fcfef7ff b14b68e3 .G..0FAF.....hK.
40090a4c f8516819 f1040c0c 1818010c fa46f7fa .hQ...........F.
40090a5c 900cf8c4 0501f06f 6d333701 d3d7429f ....o....73m.B..
40090a6c b0514628 8ff0e8bd 8000f3af ffffffff (FQ.............
code around lr:
4086bf88 ff8cf009 bd3e4620 0005cb8e 000422e2 .... F>......"..
4086bf98 00046737 2107b510 68004604 ff7ef009 7g.....!.F.h..~.
4086bfa8 bd104620 b5374603 a801460d f7ff4619 F...F7..F...F..
4086bfb8 b1cdffcd 447c4c0e f5046824 f7d47052 .....L|D$h..Rp..
4086bfc8 f504eb1a 2100704c f7df462a b938ef96 ....Lp.!*F....8.
memory map around fault addr fff0f0f0:
bead8000-beaf9000 [stack]
(no map for address)
ffff0000-ffff1000 [vectors]
waitForAlarm result :4
trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
P2pDisabledState{ what=131204 }
FACTORY_ON= 0
FACTORY_ON= 0
FACTORY_ON= 0
P2pDisabledState{ what=131204 }
update start
level:23 scale:100 status:3 health:2 present:true voltage: 3728 temperature: 300 technology: Li-ion AC powered:false USB powered:true icon:17303206 invalid charger:0
onReceive() - ACTION_BATTERY_CHANGED
onReceive() - level:23
onReceive() - plugged:2
In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
onReceive() - BATTERY_STATUS_DISCHARGING: tw_stat_sys_battery_usb_not_charge
battPlugged Type : 2
!@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 13012
Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE)
begin



The solution is the same as Erel explained with the post mentioned in the above post.

My solution implementation :

B4X:
Sub OnMarkerDragListener1_DragEnd(Marker1 As Marker)
  
    CallSubDelayed2 (Me,"DoDragEndProcedure", Marker1)
  
End Sub

Sub DoDragEndProcedure ( Marker1 As Marker )
  
Dim str0,strlat00, strlon00  As String
    Dim m001 As Marker
    Dim vstrSourceID As String

    m001 = Marker1
    If m001<>Null Then
        If m001.IsInitialized Then

        vstrSourceID = m001.Snippet
        strlat00 = m001.Position.Latitude
        strlon00 = m001.Position.Longitude

         Dim bmp As Bitmap
        bmp.Initialize(File.DirAssets, "question.png")
        Dim choice As Int
        str0 = "'" & vstrSourceID & " kodlu '" & m001.Title& "' noktası E:" & strlat00 & "-B:" & strlon00 & " konumuna taşınıyor." & CRLF & "İşlemi onaylıyor musunuz ?"
        choice = Msgbox2(str0, "Nokta taşıma", "Evet", "", "Hayır", bmp)

          If choice = DialogResponse.POSITIVE Then
            str0 = "UPDATE Sources SET Latitude='" & strlat00 & "', Longitude='" & strlon00 & "', Changed=1, Synchronized=NULL WHERE SourceID='" & vstrSourceID & "' ;"
            General.SQL1.ExecNonQuery(str0)

            CallSubDelayed2(SourceScreen, "EditSource", m001 )
            ToastMessageShow("Nokta bilgilerini ve adresi güncelleyip gerekli değişiklikleri yaptıktan sonra kaydı güncelleyiniz.", False )
          Else
          
             Dim Cursor12 As Cursor
            Dim vstrSQL002 As String = "SELECT Latitude, Longitude FROM Sources where SourceID='" & vstrSourceID & "' LIMIT 1 ;"
            Cursor12 = General.SQL1.ExecQuery( vstrSQL002 )
            If Cursor12.RowCount > 0 Then
               Cursor12.Position=0              
               Dim vfltLat As Float= Cursor12.GetString("Latitude")
               Dim vfltLon As Float= Cursor12.GetString("Longitude")
               MarkerOldPos.Initialize(vfltLat, vfltLon)
            Else
            End If
             Cursor12.Close      
          
            Marker1.Position = MarkerOldPos
  
            ToastMessageShow("Nokta eski yerine geri alındı.", False )
          End If
      
        End If
    End If   
MarkerOldPos = Marker1.Position
  
End Sub


The issue was in discussion also with Drag-Drop events of markers, may be there are other uses which cause this "SIGNAL 11" issue.
 

Serdar K.

Member
Licensed User
Longtime User
Is there a way for moving this entry, because I wouldn't like to duplicate it for the sake of the forum.
In fact i thought that this is a system issue and treated like the other similar (Android, SIGNAL 11) issues.

Thanks,
Serdar
 
Top