mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-15 20:48:00 +01:00
logging toward tracking ANRs
This commit is contained in:
parent
bc695d1a65
commit
6314fd8a01
2 changed files with 10 additions and 3 deletions
|
@ -552,11 +552,13 @@ class BoardDelegate(delegator: Delegator) :
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
Log.d( TAG, "onDestroy()" )
|
||||||
closeIfFinishing(true)
|
closeIfFinishing(true)
|
||||||
releaseThreadOnce()
|
releaseThreadOnce()
|
||||||
GamesListDelegate.boardDestroyed(mRowid)
|
GamesListDelegate.boardDestroyed(mRowid)
|
||||||
noteClosed(mRowid)
|
noteClosed(mRowid)
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
Log.d( TAG, "onDestroy() DONE" )
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(Throwable::class)
|
@Throws(Throwable::class)
|
||||||
|
|
|
@ -238,8 +238,11 @@ map_remove_prv( EnvThreadInfo* ti, JNIEnv* env, const char* caller )
|
||||||
found = env == entry->env;
|
found = env == entry->env;
|
||||||
if ( found ) {
|
if ( found ) {
|
||||||
if ( pthread_self() != entry->owner ) {
|
if ( pthread_self() != entry->owner ) {
|
||||||
XP_LOGFF( "mismatch; called from %s", caller );
|
XP_LOGFF( "mismatch; called from %s (but mapped by %s()?",
|
||||||
XP_ASSERT(0);
|
caller, entry->ownerFunc );
|
||||||
|
/* XP_ASSERT(0);*/ /* <-- Is this causing ANRs? Does NOT
|
||||||
|
show up as an assert sometimes anyway, though it does kill
|
||||||
|
the thread. */
|
||||||
}
|
}
|
||||||
# ifdef LOG_MAPPING
|
# ifdef LOG_MAPPING
|
||||||
RAW_LOG( "UNMAPPED env %p to thread %x (called from %s(); mapped by %s)",
|
RAW_LOG( "UNMAPPED env %p to thread %x (called from %s(); mapped by %s)",
|
||||||
|
@ -247,7 +250,9 @@ map_remove_prv( EnvThreadInfo* ti, JNIEnv* env, const char* caller )
|
||||||
RAW_LOG( "%d entries left", countUsed( ti ) );
|
RAW_LOG( "%d entries left", countUsed( ti ) );
|
||||||
entry->ownerFunc = NULL;
|
entry->ownerFunc = NULL;
|
||||||
# endif
|
# endif
|
||||||
XP_ASSERT( 1 == entry->refcount );
|
if ( 1 != entry->refcount ) {
|
||||||
|
XP_LOGFF( "ERROR: refcount %d, not 1", entry->refcount );
|
||||||
|
}
|
||||||
--entry->refcount;
|
--entry->refcount;
|
||||||
entry->env = NULL;
|
entry->env = NULL;
|
||||||
entry->owner = 0;
|
entry->owner = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue