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 :




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
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…