SaxonC EE 11.2 的 "SaxonProcessor::newXslt30Processor()" returns 调试断言失败:"vector subscript out of range"
SaxonC EE 11.2's "SaxonProcessor::newXslt30Processor()" returns a Debug Assertion Failed : "vector subscript out of range"
我在 Saxon EE 中使用来自 C API 的 cpp 和 hpp 文件,我刚刚编译 运行 这些行:
SaxonProcessor* processor = new SaxonProcessor(false);
Xslt30Processor* xslt = processor->newXslt30Processor();
它在我创建 XSLT30Processor 时显示错误。
我也没有使用许可证。
我调试了它,在它调用 JNI 方法之前我能到达的最远的地方是 Xslt30Processor.cpp 的第 36 行:
Xslt30Processor::Xslt30Processor(SaxonProcessor * p, std::string curr) {
proc = p;
jitCompilation = false;
exception = nullptr;
/*
* Look for class.
*/
cppClass = lookForClass(SaxonProcessor::sxn_environ->env, \ It fails here
"net/sf/saxon/option/cpp/Xslt30Processor");
jobject tempcppXT = createSaxonProcessor2(SaxonProcessor::sxn_environ->env, cppClass,
"(Lnet/sf/saxon/s9api/Processor;)V", proc->proc);
if(tempcppXT) {
cppXT = SaxonProcessor::sxn_environ->env->NewGlobalRef(tempcppXT);
SaxonProcessor::sxn_environ->env->DeleteLocalRef(tempcppXT);
} else {
createException("Error: Failed to create the Xslt30Processor internal object");
}
#ifdef DEBUG
jmethodID debugMID = SaxonProcessor::sxn_environ->env->GetStaticMethodID(cppClass, "setDebugMode", "(Z)V");
SaxonProcessor::sxn_environ->env->CallStaticVoidMethod(cppClass, debugMID, (jboolean)true);
#endif
if(cppXT == nullptr) {
createException();
}
if(!(proc->cwd.empty()) && curr.empty()){
cwdXT = proc->cwd;
} else if(!curr.empty()){
cwdXT = curr;
}
}
我想通了,我的 cpp 文件不包括写入顺序中的文件。难以置信
我在 Saxon EE 中使用来自 C API 的 cpp 和 hpp 文件,我刚刚编译 运行 这些行:
SaxonProcessor* processor = new SaxonProcessor(false);
Xslt30Processor* xslt = processor->newXslt30Processor();
它在我创建 XSLT30Processor 时显示错误。 我也没有使用许可证。
我调试了它,在它调用 JNI 方法之前我能到达的最远的地方是 Xslt30Processor.cpp 的第 36 行:
Xslt30Processor::Xslt30Processor(SaxonProcessor * p, std::string curr) {
proc = p;
jitCompilation = false;
exception = nullptr;
/*
* Look for class.
*/
cppClass = lookForClass(SaxonProcessor::sxn_environ->env, \ It fails here
"net/sf/saxon/option/cpp/Xslt30Processor");
jobject tempcppXT = createSaxonProcessor2(SaxonProcessor::sxn_environ->env, cppClass,
"(Lnet/sf/saxon/s9api/Processor;)V", proc->proc);
if(tempcppXT) {
cppXT = SaxonProcessor::sxn_environ->env->NewGlobalRef(tempcppXT);
SaxonProcessor::sxn_environ->env->DeleteLocalRef(tempcppXT);
} else {
createException("Error: Failed to create the Xslt30Processor internal object");
}
#ifdef DEBUG
jmethodID debugMID = SaxonProcessor::sxn_environ->env->GetStaticMethodID(cppClass, "setDebugMode", "(Z)V");
SaxonProcessor::sxn_environ->env->CallStaticVoidMethod(cppClass, debugMID, (jboolean)true);
#endif
if(cppXT == nullptr) {
createException();
}
if(!(proc->cwd.empty()) && curr.empty()){
cwdXT = proc->cwd;
} else if(!curr.empty()){
cwdXT = curr;
}
}
我想通了,我的 cpp 文件不包括写入顺序中的文件。难以置信