mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
remove assert firing in field
There must be some race condition. Better than crashing is to fail to dispose a game's memory, which hopefully will be the effect here. I don't understand how this happens to can't test.
This commit is contained in:
parent
4ee1a2bab2
commit
9f0324f8ae
3 changed files with 7 additions and 5 deletions
|
@ -28,6 +28,7 @@
|
|||
<li>Fix board sometimes being blank after chat window dismissed</li>
|
||||
<li>Don't show NFC stats if it's not been used</li>
|
||||
<li>Include new Catalan and Spanish translations (from Weblate)</li>
|
||||
<li>Fix crash reported via Google Play Store</li>
|
||||
</ul>
|
||||
|
||||
<p>(The full changelog
|
||||
|
|
|
@ -73,10 +73,13 @@ public class XwJNI {
|
|||
// getClass().getName(), this, m_rowid, m_refCount );
|
||||
if ( 0 == m_refCount ) {
|
||||
if ( 0 != m_ptrGame ) {
|
||||
if ( !haveEnv( getJNI().m_ptrGlobals ) ) {
|
||||
Assert.fail();
|
||||
if ( haveEnv( getJNI().m_ptrGlobals ) ) {
|
||||
game_dispose( this ); // will crash if haveEnv fails
|
||||
} else {
|
||||
Log.d( TAG, "release(): no ENV!!! (this=%H, rowid=%d)",
|
||||
this, m_rowid );
|
||||
Assert.failDbg(); // seen on Play Store console
|
||||
}
|
||||
game_dispose( this ); // will crash if haveEnv fails
|
||||
m_ptrGame = 0;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -910,7 +910,6 @@ struct _JNIState {
|
|||
XWGame game;
|
||||
JNIGlobalState* globalJNI;
|
||||
AndGameGlobals globals;
|
||||
// pthread_mutex_t msgMutex;
|
||||
XP_U16 curSaveCount;
|
||||
XP_U16 lastSavedSize;
|
||||
#ifdef DEBUG
|
||||
|
@ -1029,7 +1028,6 @@ JNIEXPORT void JNICALL Java_org_eehouse_android_xw4_jni_XwJNI_game_1dispose
|
|||
vtmgr_destroy( MPPARM(mpool) globals->vtMgr );
|
||||
|
||||
MAP_REMOVE( &state->globalJNI->ti, env );
|
||||
/* pthread_mutex_destroy( &state->msgMutex ); */
|
||||
|
||||
XP_FREE( mpool, state );
|
||||
} /* game_dispose */
|
||||
|
|
Loading…
Reference in a new issue