I am keeping the scope alive while calling the method. Your point that some parts require the isolate::Scope seems right and this is the reason it works.
On Tue, 6 Jun 2023 at 00:48, Omer Katz (chromium.org) <omerk...@chromium.org> wrote: > Are you keeping the isolate_scope alive while calling your method? > V8 requires that you have a live Isolate::Scope while you're using it. > Some parts of V8 may work without it but others definitely won't, and you > can't/shouldn't disable the parts that won't. > I suspect that after ~100 calls is when you first encounter the parts of > V8 that need an Isolate::Scope. > > On Tue, Jun 6, 2023 at 3:14 AM Pankaj Chhabra <chhabra.pan...@gmail.com> > wrote: > >> I have a method in DLL that calls using V8 C++ myMethod of myClass >> instance. If I don't call isolate_scope, the is a crash after making around >> 100 calls to myMethod, I get an exception 0xC0000005: Access violation >> writing location 0x00000000. When I call isolate_scope, the exception does >> not happen even for 1 million calls. >> >> There is one isolate only. I have already called isolate_scope in >> initialization >> isolate = Isolate::New(create_params); >> Isolate::Scope isolate_scope(isolate); >> >> Could some one please tell why without isolate_scope I get exception >> after making 100 or so calls to myMethod? >> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/v8-users/078cd53f-f3da-40e5-a3ef-770e6cede758n%40googlegroups.com >> <https://groups.google.com/d/msgid/v8-users/078cd53f-f3da-40e5-a3ef-770e6cede758n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-users/CAJFGqfNwOEtzbO-yyTxGyGjg9DUm%3Dh9-GiHGhZvrHSXM4bAJbw%40mail.gmail.com > <https://groups.google.com/d/msgid/v8-users/CAJFGqfNwOEtzbO-yyTxGyGjg9DUm%3Dh9-GiHGhZvrHSXM4bAJbw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Best Regards, Pankaj Chhabra -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAJCvxcYZabZFQ2DNRwDXnaf0-A3YpsrWUGz-BXq336-Y%3D_DA2A%40mail.gmail.com.