Android app crashes after successfully executing all desired actions

0

I'm developing with RAD-Studio XE7 an app for Android. Everything is going fine up to the point where the app crashes with seg-fault(11). I retraced this to the "end;" of a procedure, where the system-memory-releases are executed. In System._InstClear the program stops at "ldr.w r1 [r1,#-60]" where the register R1 is 0.

  • Hardware: Sony Xperia Z2 Tablet (SGP511)
  • Android: 4.4.2
  • Kernel: 3.4.0-perf-g46a79a0

It has both NEON and ArmV7.

Compiling and running as an .exe works flawless.

I'm using runtime-created Indy-TCPComponents. Maybe this could cause issues.

If some useful information is missing, I would be delighted to provide it.

Edit: Logcat output added

I/ActivityManager(  966): START u0 {act=com.android.systemui.recent.action.TOGGL
E_RECENTS flg=0x10800000 cmp=com.android.systemui/.recent.RecentsActivity} from
pid 1274
D/dalvikvm( 1274): GC_FOR_ALLOC freed 7K, 6% free 56524K/60036K, paused 25ms, to
tal 26ms
I/dalvikvm-heap( 1274): Grow heap (frag case) to 56.458MB for 280156-byte alloca
tion
I/ActivityManager(  966): Start proc com.sony.smallapp.managerservice for servic
e com.sony.smallapp.managerservice/.SmallAppManagerService: pid=5678 uid=10158 g
ids={50158, 3003}
D/dalvikvm( 1274): GC_FOR_ALLOC freed 3K, 6% free 56835K/60312K, paused 29ms, to
tal 30ms
I/dalvikvm-heap( 1274): Grow heap (frag case) to 56.762MB for 280156-byte alloca
tion
W/GAV2    ( 5678): Thread[main,5,main]: Need to call initialize() and be in fall
back mode to start dispatch.
I/ActivityManager(  966): Killing 3056:com.sonyericsson.album/u0a41 (adj 15): em
pty #17
D/dalvikvm( 1274): GC_FOR_ALLOC freed 32K, 6% free 57158K/60588K, paused 20ms, t
otal 21ms
I/dalvikvm-heap( 1274): Grow heap (frag case) to 57.079MB for 280156-byte alloca
tion
I/ActivityManager( 1274): Timeline: Activity_idle id: android.os.BinderProxy@44a
cb540 time:225750587
I/ActivityManager(  966): Timeline: Activity_windows_visible id: ActivityRecord{
44bc8ea0 u0 com.android.systemui/.recent.RecentsActivity t269} time:225750612
E/AdvWidget( 6877): Unknown function: onTrimMemory
I/        (  304): 'usb' is online
D/SonySWEffect(  297): PARAM_CA_CHSEP Clear Stereo Off(0x80000001)
I/        (  304): 'usb' is online
D/SonySWEffect(  297): Unsupported frame count 240
D/dalvikvm( 1274): GC_FOR_ALLOC freed 40K, 6% free 57539K/60864K, paused 34ms, t
otal 34ms
D/StatusBar.NetworkController( 1274): refreshViews: Data not connected!! Set no
data type icon / Roaming
D/ConnectivityServiceHSM(  966): Actual State: DefaultConnectivityState, Current
 State: DefaultConnectivityState.processMessage what=115
D/QcConnectivityService(  966): Sampling interval elapsed, updating statistics .
.
D/QcConnectivityService(  966): Done.
D/QcConnectivityService(  966): Setting timer for 720seconds
D/Ulp_jni (  966): Location CB invoked
D/effect_intf(  297): remove_active_usecase: Remove effect handle, usecase ID 1
D/hardware_info(  297): hw_info_append_hw_type : device_name = speaker
D/audio_hw_extn(  297): audio_extn_get_anc_enabled: anc_enabled:0
I/        (  304): 'usb' is online
W/ContextImpl( 5678): Implicit intents with startService are not safe: Intent {
act=com.google.android.gms.analytics.service.START (has extras) } android.conten
t.ContextWrapper.bindService:517 com.google.analytics.tracking.android.Analytics
GmsCoreClient.connect:82 com.google.analytics.tracking.android.GAServiceProxy.co
nnectToService:279
I/GAV2    ( 5678): Thread[GAThread,5,main]: No campaign data found.
I/        (  304): 'usb' is online
I/        (  304): 'usb' is online
D/StatusBar.NetworkController( 1274): refreshViews: Data not connected!! Set no
data type icon / Roaming
I/        (  304): 'usb' is online
I/InputDispatcher(  966): Dropped event because the current application is not responding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
V/DeadZone( 1274): consuming errant click: (849.0,8.0)
W/InputDispatcher(  966): Asynchronous input event injection failed.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
W/InputDispatcher(  966): Asynchronous input event injection failed.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
W/InputDispatcher(  966): Asynchronous input event injection failed.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
I/InputDispatcher(  966): Dropped event because the current application is not r
esponding and the user has started interacting with a different application.
W/ActivityManager(  966): Launch timeout has expired, giving up wake lock!
I/        (  304): 'usb' is online
I/InputDispatcher(  966): Application is not responding: AppWindowToken{447e94b0
 token=Token{44808ad0 ActivityRecord{44bc8ea0 u0 com.android.systemui/.recent.Re
centsActivity t269}}} - Window{44fdfe90 u0 com.embarcadero.Project1/com.embarcad
ero.firemonkey.FMXNativeActivity}.  It has been 5007.3ms since event, 5005.6ms s
ince wait started.  Reason: Waiting because the focused window has not finished
processing the input events that were previously delivered to it.
I/WindowManager(  966): Input event dispatching timed out sending to com.embarca
dero.Project1/com.embarcadero.firemonkey.FMXNativeActivity.  Reason: Waiting bec
ause the focused window has not finished processing the input events that were p
reviously delivered to it.
W/InputDispatcher(  966): Asynchronous input event injection timed out.
I/Process (  966): Sending signal. PID: 3838 SIG: 3
I/dalvikvm( 3838): threadid=3: reacting to signal 3
I/        (  304): 'usb' is online
I/dalvikvm( 3838): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  966): Sending signal. PID: 966 SIG: 3
I/dalvikvm(  966): threadid=3: reacting to signal 3
D/Ulp_jni (  966): Location CB invoked
I/Process (  966): Sending signal. PID: 10458 SIG: 3
I/dalvikvm(10458): threadid=3: reacting to signal 3
I/dalvikvm(  966): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  966): Sending signal. PID: 1553 SIG: 3
I/dalvikvm( 1553): threadid=3: reacting to signal 3
I/dalvikvm( 1553): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  966): Sending signal. PID: 1540 SIG: 3
I/dalvikvm( 1540): threadid=3: reacting to signal 3
I/dalvikvm( 1540): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  966): Sending signal. PID: 1525 SIG: 3
I/dalvikvm( 1525): threadid=3: reacting to signal 3
I/dalvikvm(10458): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  966): Sending signal. PID: 1512 SIG: 3
I/dalvikvm( 1512): threadid=3: reacting to signal 3
I/dalvikvm( 1525): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  966): Sending signal. PID: 1499 SIG: 3
I/dalvikvm( 1499): threadid=3: reacting to signal 3
I/dalvikvm( 1512): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  966): Sending signal. PID: 1274 SIG: 3
I/dalvikvm( 1274): threadid=3: reacting to signal 3
I/dalvikvm( 1499): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 1274): Wrote stack traces to '/data/anr/traces.txt'
I/        (  304): 'usb' is online
I/        (  304): 'usb' is online
D/StatusBar.NetworkController( 1274): refreshViews: Data not connected!! Set no
data type icon / Roaming
D/dalvikvm(  966): GC_CONCURRENT freed 3782K, 19% free 65487K/80412K, paused 3ms
+11ms, total 130ms
D/dalvikvm(  966): WAIT_FOR_CONCURRENT_GC blocked 97ms
D/dalvikvm(  966): WAIT_FOR_CONCURRENT_GC blocked 113ms
D/dalvikvm(  966): GC_EXPLICIT freed 701K, 19% free 65613K/80412K, paused 3ms+9m
s, total 123ms
android
delphi
firemonkey
asked on Stack Overflow Nov 3, 2014 by Knowbuddy • edited Nov 3, 2014 by Knowbuddy

1 Answer

0

The log indicates that the application is not responding anymore for several (> 5) seconds:

I/InputDispatcher( 966): Application is not responding: AppWindowToken{447e94b0 token=Token{44808ad0 ActivityRecord{44bc8ea0 u0 com.android.systemui/.recent.RecentsActivity t269}}} - Window{44fdfe90 u0 com.embarcadero.Project1/com.embarcadero.firemonkey.FMXNativeActivity}. It has been 5007.3ms since event, 5005.6ms s ince wait started. Reason: Waiting because the focused window has not finished processing the input events that were previously delivered to it.

And then

W/InputDispatcher( 966): Asynchronous input event injection timed out.

So it seems that after all the successful execution of desired actions, the application stops to respond to input.

Does the app use threads (maybe indirectly, in Indy components) without terminating and freeing them properly?

Can you reduce the application to a minimum which shows the error?

answered on Stack Overflow Nov 3, 2014 by mjn • edited Nov 4, 2014 by mjn

User contributions licensed under CC BY-SA 3.0