iOS Question EXC_CRASH (SIGABRT) or EXC_BAD_ACCESS

Filippo

Expert
Licensed User
Longtime User
Hi,

I currently have several customers sending the same crash report.
Of course I can't reproduce these errors with my devices, so I don't know where the error is.
Can anyone do anything with this crash report?

Many thanks in advance
 

Attachments

  • crash-report-1.txt
    108.1 KB · Views: 113
  • crash-report-2.txt
    115.2 KB · Views: 105
  • crash-report-3.txt
    107 KB · Views: 116
  • crash-report-4.txt
    115.6 KB · Views: 105

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. All of these come from iPads. Make sure to test your app on one.
2. Integrate KSCrash. It will help with such crashes.
3. Symbolicating the crash report: https://www.b4x.com/android/forum/threads/symbolicating-a-crash-report.69145/#content
4.

The logs here do include some useful information:
17 MoR 0x000000010436ef58 0x104214000 + 1421144 (-[B4IPanelWrapper AddView:::::] + 136)
18 MoR 0x00000001042ff7d4 0x104214000 + 964564 ( + 5504)
19 MoR 0x00000001042f8628 0x104214000 + 935464 ( + 1828)
20 MoR 0x000000010435bd78 0x104214000 + 1342840 (__21-[B4ICommon Sleep:::]_block_invoke + 48)

Look for a code that calls Sleep and then adds a view. Maybe you are adding an uninitialized view at this point.
 
Upvote 0

Filippo

Expert
Licensed User
Longtime User
Hi Erel,

I think I have found the error.
The error happens when displaying "ShowProgressBar".
I added the variable "ClvIndex" according to your advice some time ago, and it all worked without problems until now.

Here is my code:
B4X:
Private Sub FillCronoTimer(Timerlist As List, IsListChanged As Boolean)
    Dim racetime1 As RaceProperty
    Dim pnl As Panel
    
    ClvIndex = ClvIndex + 1 'global int variable
    Dim MyIndex As Int = ClvIndex
    
    scvCronoTimer.Panel.Height = 0
    scvCronoTimer.Panel.RemoveAllViews

    ShowProgressBar(True, 0)
        
    For i = 0 To Timerlist.Size -1
        racetime1 = Timerlist.get(i)

        ...

        AddCronoTimer(racetime1,False)
        
        If Timerlist.Size > 10 And (i Mod 4) = 0 Then
            ShowProgressBar(True, i / Timerlist.Size)
            Sleep(0)
        End If

        If MyIndex <> ClvIndex Then Return
    Next

    ColorAllPanel
    
    For i = 0 To scvCronoTimer.Panel.NumberOfViews - 1
        pnl = scvCronoTimer.Panel.GetView(i)

        Racetime = pnl.Tag
        If Racetime.Visible Then
            Dim tbtn As fsToggleButton = pnl.GetView(13).Tag
            tbtn.Checked = Racetime.Checked
        End If
    Next

    'Keine Änderung bis jetzt
    Starter.IsListCronoTimerChanged = IsListChanged
    
    ShowProgressBar(False, 0)
End Sub

#Region ProgressBar
Private Sub ShowProgressBar(Visible As Boolean, Value As Double)
    pnlProgressBar.BringToFront
    pnlProgressBar.Visible = Visible
    lblProgress.Width = Value * (ProgressBar.Width - 2dip)
End Sub

Private Sub pnlProgressBar_Click
    'Platzhalter
End Sub
#End Region

What do you think, should I remove "ShowProgressBar" or do you have another tip?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I added the variable "ClvIndex" according to your advice some time ago
[B4X] Resumable subs and the index pattern

My guess is that the error still happens when this sub is called multiple times.
Do something different:
B4X:
Private Sub FillCronoTimer(Timerlist As List, IsListChanged As Boolean)
 If FillCronoTimerRunning Then Return
 FillCronoTimerRunning = True
..


FillCronoTimerRunning = False
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…