Android Question Having massive problems with signal 11 bug

chrjak

Active Member
Licensed User
Longtime User
Hey guys,

My app keeps crashing for years due to some mysterious signal 11 bug. the logs aren't very helpful. I don't think it's a simple code-mistake bug but maybe some configuration problem

I can't reproduce that bug on my phone... has somebody an idea? Can somebody help me please?

all logs are full with this error. there are 3 variations: code 0, code 1, code 2
they occur mostly on android 5, 6 and 7

 
Last edited:

chrjak

Active Member
Licensed User
Longtime User
Yes that could be the mistake.
I use lots of DoEvents in my app. They update the Progressdialog after some seconds...
Without that my app crashed.

I have to use Progressdialog as my App calculates values with big lists. That can take some time and if there is no doevents my app gets killed...

Any way to fix that? Msgboxes and everything else should be fine. However i don't see an AsyncProgressDialog
 
Upvote 0

chrjak

Active Member
Licensed User
Longtime User
I have found the thread about services for long background tasks.

However my app also creates lots of activity items. I can't put this into the service
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I have found the thread about services for long background tasks.
This is not related. Services code runs on the main thread.

ProgressDialog is already asynchronous.

I use lots of DoEvents in my app. They update the Progressdialog after some seconds...
Without that my app crashed.
The actual solution depends on your specific code.

Post a small example and we can help you optimize it.
 
Upvote 0

chrjak

Active Member
Licensed User
Longtime User
This is not related. Services code runs on the main thread.

ProgressDialog is already asynchronous.


The actual solution depends on your specific code.

Post a small example and we can help you optimize it.
I use it to write data (as there are more than 3000 lines it takes some time):
B4X:
Sub ExportData
    ProgressDialogShow2(Texts(119), False)
    DoEvents
    Dim raf As RandomAccessFile
    DateTime.DateFormat = "dd/MM/yyyy"
    exportfilename = DateTime.Date(DateTime.Now) & DateTime.Time(DateTime.Now) & "_Data"
    exportfilename = exportfilename.Replace(".", "")
    exportfilename = exportfilename.Replace("/", "")
    exportfilename = exportfilename.Replace(":", "")
    exportfilename = exportfilename & ".ap"
    File.WriteString(File.DirRootExternal, exportfilename, "")
    raf.Initialize(File.DirRootExternal, exportfilename, False)
    DoEvents
    Dim writelist As List = File.ReadList(File.DirInternal, "data.txt")
    writelist.Add(DateTime.Now)
    DoEvents
    raf.WriteEncryptedObject(writelist, ExportPassword, 0)
    DoEvents
    raf.Close
    ProgressDialogHide
    DoEvents
End Sub
I use it to draw a chart with lots of values
(see the charts class. I can send you the code privately)

I use it when i collect phone data - is faster but takes some time on some devices. In order to prevent crashes i added doevents

I use it to show the data in a list. (i thought about the sense of this already. It takes a long time on smartphones and if there are 3000 values it is not easy to get the overview. Maybe I remove this in the future)
I do not use listview but add my own views with their value

I use it when i read a new file with big data (import)

I use it when i calculate a summary of the big data

Also i remember that i needed a DoEvents directly after the progressdialog to make it visible
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…