mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-11 06:54:06 +00:00
Looks like it was the JNI cash causing the crash.
Forcing it to look up classes and methods instead of caching them stopped the crashes in the GC. Will investigate more later.
This commit is contained in:
parent
4dc0ff8f13
commit
6889fcfc28
@ -111,7 +111,7 @@ jclass JniCache::findClass(const std::string &name)
|
|||||||
|
|
||||||
jclass cls = (jclass)env->NewGlobalRef(localCls);
|
jclass cls = (jclass)env->NewGlobalRef(localCls);
|
||||||
|
|
||||||
m_classes.insert(std::make_pair(name, cls));
|
//m_classes.insert(std::make_pair(name, cls));
|
||||||
|
|
||||||
return cls;
|
return cls;
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ jmethodID JniCache::findMethod(jclass cls, const std::string &methodName, const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_methods.insert(std::make_pair(id, mid));
|
//m_methods.insert(std::make_pair(id, mid));
|
||||||
|
|
||||||
return mid;
|
return mid;
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ jmethodID JniCache::findStaticMethod(jclass cls, const std::string &methodName,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_staticMethods.insert(std::make_pair(id, mid));
|
//m_staticMethods.insert(std::make_pair(id, mid));
|
||||||
|
|
||||||
return mid;
|
return mid;
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ jfieldID JniCache::findField(jclass cls, const std::string &fieldName, const std
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fields.insert(std::make_pair(id, fid));
|
//m_fields.insert(std::make_pair(id, fid));
|
||||||
|
|
||||||
return fid;
|
return fid;
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ jfieldID JniCache::findStaticField(jclass cls, const std::string &fieldName, con
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_staticFields.insert(std::make_pair(id, fid));
|
//m_staticFields.insert(std::make_pair(id, fid));
|
||||||
|
|
||||||
return fid;
|
return fid;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user