You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when use ffi-napi to call the lib method ,the native qt dialog can show but electron seems unresponsive , the menus disappear except the app name and the paste operation can not work for input element , then click the app name in menu bar it will crash or unresponsive
Testcase Gist URL
No response
Additional Information
As I test that , once run ffi-napi to invoke dylib method which in native qt part create QApplication (
the code like void test(){ QApplication a(argc,argv); }
), in electron main process will make crash.
If someone hit this case , please kindly comment the solution , thanks advance.
The text was updated successfully, but these errors were encountered:
Given the warning from ffi-napi: WARNING: node-ffi-napi assumes you know what you're doing. You can pretty easily create situations where you will segfault the interpreter and unless you've got C debugger skills, you probably won't know what's going on., you will probably have better luck with this question at one of the links at the project's Community page -- in particular, be sure to give the Electron Discord server a try.
Preflight Checklist
Electron Version
12.0.5
What operating system are you using?
macOS
Operating System Version
macOs Majave 10.14.6
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
I would like to use the ffi-napi to call a dylib that builded by qt , then invoke the lib method should open a dialog(qt gui).
The code like:
JS part
`
const {Library:FFLib} = require('ffi-napi')
const lib = FFLib("resource/vendor/libdyLibDemo.dylib",{
"test":['void',[]],
})
lib.test()
`
QT part
`
#include
#ifdef __cplusplus
extern "C" {
void test(){
char *argv[0] = {};
int argc = 1;
qDebug() << "start checkLib";
QApplication a(argc, argv);
QDialog dl;
dl.setWindowTitle("Test Win");
dl.show();
dl.raise();
dl.exec();
}
#ifdef __cplusplus
}
#endif
`****
Actual Behavior
when use ffi-napi to call the lib method ,the native qt dialog can show but electron seems unresponsive , the menus disappear except the app name and the paste operation can not work for input element , then click the app name in menu bar it will crash or unresponsive
Testcase Gist URL
No response
Additional Information
As I test that , once run ffi-napi to invoke dylib method which in native qt part create QApplication (
the code like
void test(){ QApplication a(argc,argv); }
), in electron main process will make crash.
If someone hit this case , please kindly comment the solution , thanks advance.
The text was updated successfully, but these errors were encountered: