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 !!!

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