Android Question Error in accelerometer ?

AlpVir

Well-Known Member
Licensed User
Longtime User
I'm writing an app that uses accelerometer sensor
After a few seconds and a few dozen seemingly correct readings appears the error
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 12687 (4A.Oscilloscope)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 12687

What information do I get from this message?
What is the number 11 ?
What SIGSEGV ?
 

JordiCP

Expert
Licensed User
Longtime User
Normally SIGSEGV signals are thrown when there is some sort of not allowed memory access. This can happen for instance in a rendering routine inside a lib, where just the pointer to memory has been passed and either this pointer is not valid or the routine is trying to access memory beyond its limits.

For instance: there is a routine which expects, as parameters, a pointer to an allocated array which is 10000 (ints), and also a list of points inside that array. The purpose of the routine is to set those points in the array as "1". This routine can check whether all these coordinates are inside the allocated memory (so there will not be any error) or just assume the parameters will already be correct and try "blindly" to set those elements to "1". If anyone falls outside the allocated memory and it hasn't been captured by java before (that's why normally these signals are thrown by low-level routines), a SIGSEGV signal will be thrown.

So it is possible that the accelerometer itself isn't causing any error, but the routines/libraries in charge of dealing with its data. "4a.Oscilloscope" seems the process where this signal was thrown?

I'd try to isolate, if possible, from which high-level Sub the error comes from and check for conditions (variable values, null objects,...) via Logs
 
Upvote 0

AlpVir

Well-Known Member
Licensed User
Longtime User
Thank you.
I tried to isolate the part of the code that caused the error. It seems that both the sub sensor_SensorChanged (Values () As Float).
I could not find the error.
Below is the log, without filters.
It seems very strange that
** Activity (main) Create, isFirst = true **
It is shown 3 times !!!

Logger connected to: asus ASUS_Z008D
--------- beginning of crash
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 8412 (4A.Oscilloscope)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 8942 (4A.Oscilloscope)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 9078 (4A.Oscilloscope)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 9724 (4A.Oscilloscope)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 10212 (4A.Oscilloscope)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 10786 (4A.Oscilloscope)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 10916 (4A.Oscilloscope)
--------- beginning of main
[11033] Initialize library(version: 5.0.7a_y.48167 RELEASE)... successfully.
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
Starting remote logger. Port: 17877
After accept
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 11033 (4A.Oscilloscope)
Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0
[11145] Initialize library(version: 5.0.7a_y.48167 RELEASE)... successfully.
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
Starting remote logger. Port: 17877
After accept
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sensor or listener is null
sensor or listener is null
System.exit called, status: 0
VM exiting with result code 0, cleanup skipped.
[11266] Initialize library(version: 5.0.7a_y.48167 RELEASE)... successfully.
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
Starting remote logger. Port: 17877
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
After accept
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff3 in tid 11266 (4A.Oscilloscope)
Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0
[11484] Initialize library(version: 5.0.7a_y.48167 RELEASE)... successfully.
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
SetAppTypeFace- try to flip, app = B4A.Oscilloscope
Typeface getFontPathFlipFont - systemFont = default#default
Starting remote logger. Port: 17877
After accept
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
Really difficult to say what is happening...I suppose there are other libraries involved

Inside the "sensor_SensorChanged" Sub, how is the array data processed? I would try to replace it and use a fake array with always holds the same data (and not the one given by the event), just to see if the error is due to non-valid length and/or values...
 
Upvote 0
Top