当前位置:   article > 正文

strongswan报错:JNI DETECTED ERROR IN APPLICATION::use of deleted weak global reference 0xedc5338b_jni detected error in application: use of deleted

jni detected error in application: use of deleted global reference

07-20 17:09:55.356 20295-21145/org.strongswan.android E/art: JNI ERROR (app bug): accessed stale weak global reference 0xedc5338b (index 19682 in a table of size 5526)
07-20 17:09:55.404 20295-21145/org.strongswan.android A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: use of deleted weak global reference 0xedc5338b
07-20 17:09:55.404 20295-21145/org.strongswan.android A/art: art/runtime/java_vm_ext.cc:470]     from void org.strongswan.android.logic.CharonVpnService.initiate(java.lang.String)

android代码:

if (initializeCharon(builder, mLogFile, mCurrentProfile.getVpnType().has(VpnTypeFeature.BYOD)))
{
   Log.i(TAG, "charon started");
   SettingsWriter writer = new SettingsWriter();
   writer.setValue("global.language", Locale.getDefault().getLanguage());
   writer.setValue("global.mtu", mCurrentProfile.getMTU());
   writer.setValue("global.nat_keepalive", mCurrentProfile.getNATKeepAlive());
   writer.setValue("connection.type", mCurrentProfile.getVpnType().getIdentifier());
   writer.setValue("connection.server", mCurrentProfile.getGateway());
   writer.setValue("connection.port", mCurrentProfile.getPort());
   writer.setValue("connection.username", mCurrentProfile.getUsername());
   writer.setValue("connection.password", mCurrentProfile.getPassword());
   writer.setValue("connection.local_id", mCurrentProfile.getLocalId());
   writer.setValue("connection.remote_id", mCurrentProfile.getRemoteId());
   writer.setValue("connection.certreq", (mCurrentProfile.getFlags() & VpnProfile.FLAGS_SUPPRESS_CERT_REQS) == 0);
   initiate(writer.serialize());
}
/**
 * Initiate VPN, provided by libandroidbridge.so
 */
public native void initiate(String config);


C代码:

/**
 * Initiate a new connection
 *
 * @param settings       configuration settings (gets owned)
 */
static void initiate(settings_t *settings)
{
   private_charonservice_t *this = (private_charonservice_t*)charonservice;

   lib->settings->set_str(lib->settings,
                  "charon.plugins.tnc-imc.preferred_language",
                  settings->get_str(settings, "global.language", "en"));
   /* this is actually the size of the complete IKE/IP packet, so if the MTU
    * for the TUN devices has to be reduced to pass traffic the IKE packets
    * will be a bit smaller than necessary as there is no IPsec overhead like
    * for the tunneled traffic (but compensating that seems like overkill) */
   lib->settings->set_int(lib->settings,
                  "charon.fragment_size",
                  settings->get_int(settings, "global.mtu",
                                ANDROID_DEFAULT_MTU));
   /* use configured interval, or an increased default to save battery power */
   lib->settings->set_int(lib->settings,
                  "charon.keep_alive",
                  settings->get_int(settings, "global.nat_keepalive",
                                ANDROID_KEEPALIVE_INTERVAL));

   this->creds->clear(this->creds);
   DESTROY_IF(this->service);
   this->service = android_service_create(this->creds, settings);
}

求教strongswan报错:JNI DETECTED ERROR IN APPLICATION::use of deleted weak global reference 0xedc5338b原因



声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/158504
推荐阅读
相关标签
  

闽ICP备14008679号