Re: [v8-users] v8 embedded: crash at Isolate::New when trying to initialize again

2020-04-11 Thread Chris Chen
Thanks for your reply, Ben. In hello-world example, if call V8::xxx() only once, things are alright. However, in my embedded program, those initializations are called in seperate thread, and it fails, is that v8 can only do those initializations in only one process? 在 2020年4月10日星期五 UTC+8下午11:

Re: [v8-users] v8 embedded: crash at Isolate::New when trying to initialize again

2020-04-11 Thread Chris Chen
Thanks for your reply, Ben. I tried to use V8::InitializePlatform(), V8::Initialize(), V8::Dispose() and V8::ShutdownPlatform() only once as you said. And renew an Isolate instance like the following, still got a SIGSEGV. int main(int argc, char* argv[]) { > > // Initialize V8. > > v8::V8::

Re: [v8-users] v8 embedded: crash at Isolate::New when trying to initialize again

2020-04-10 Thread Ben Noordhuis
On Fri, Apr 10, 2020 at 12:47 PM Chris Chen wrote: > > Hi, all, I am embedding v8 into a c++ program, and when trying to initialize > an Isolate again, the program crashes. > > The way I was doing is made an v8::Isolate as a member field of an JsEngine > instance, then call ~JsEngine() and rene

[v8-users] v8 embedded: crash at Isolate::New when trying to initialize again

2020-04-10 Thread Chris Chen
Hi, all, I am embedding v8 into a c++ program, and when trying to initialize an Isolate again, the program crashes. The way I was doing is made an v8::Isolate as a member field of an JsEngine instance, then call ~JsEngine() and renew a JsEngine instance. In ~JsEngine(), I do stuff like dispose