Closed yakov-rs closed 2 years ago
I can reproduce it. @pvenkatraman will take a look
If it's matter, i'm using Oracle 18
@cjbj , @pvenkatraman please tell me when it will be fixed?
I'll let Chris comment on when it will be officially fixed. For now you can patch the code yourself using the following diff:
diff --git a/src/njsVariable.c b/src/njsVariable.c
index c0b78585..c87ba338 100644
--- a/src/njsVariable.c
+++ b/src/njsVariable.c
@@ -921,12 +921,15 @@ bool njsVariable_processJS(njsVariable *vars, uint32_t numVars, napi_env env,
if (var->bindDir != NJS_BIND_OUT &&
var->varTypeNum != DPI_ORACLE_TYPE_STMT)
continue;
- if (!var->dmlReturningBuffers)
- return njsVariable_processBufferJS(var, var->buffer, env, baton);
- for (j = 0; j < var->numDmlReturningBuffers; j++) {
- buffer = &var->dmlReturningBuffers[j];
- if (!njsVariable_processBufferJS(var, buffer, env, baton))
+ if (!var->dmlReturningBuffers) {
+ if (!njsVariable_processBufferJS(var, var->buffer, env, baton))
return false;
+ } else {
+ for (j = 0; j < var->numDmlReturningBuffers; j++) {
+ buffer = &var->dmlReturningBuffers[j];
+ if (!njsVariable_processBufferJS(var, buffer, env, baton))
+ return false;
+ }
}
}
@anthony-tuininga Thanks. It's worked. I hope that your changes will be pushed to repository. It's inconvenient to copy and compile files into several platforms and dockers by myself (against "npm install" command).
Glad to hear that it worked for you! These changes will make it to the repository. @cjbj will let you know when but it should be "soon". :-)
@yakov-rs I merged the changes to the main branch, so you could simplify your build and use our code, see https://oracle.github.io/node-oracledb/INSTALL.html#githubtags
We will wrap up the 5.4 release soon.
This was fixed back in 5.4.0. Thanks for reporting it.
oracledb: 5.3.0 node: 14.16.0
crash
Program stop working;
index.js
In database
Please help me to understand what is the problem. If you need some more information feel free to ask me.