Crashing on 105.3.39

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Crashing on 105.3.39

Postby hunterlaux » Fri Sep 23, 2022 4:15 pm

I haven't dug into this yet, but I just upgraded to 105.3.39. My last version I used was on the 100 branch.

I'm getting an access violation in the render process.

Using Windows 64

Here's the relevant stack trace.

Code: Select all
>   libcef.dll!`anonymous namespace'::InterceptorGetterCallbackImpl<v8::Local<v8::Name>>(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value> & info) Line 644   C++
    [Inline Frame] libcef.dll!v8::internal::PropertyCallbackArguments::BasicCallNamedGetterCallback(void(*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &) f, v8::internal::Handle<v8::internal::Name> name, v8::internal::Handle<v8::internal::Object> info, v8::internal::Handle<v8::internal::Object> receiver) Line 201   C++
    [Inline Frame] libcef.dll!v8::internal::PropertyCallbackArguments::CallNamedGetter(v8::internal::Handle<v8::internal::InterceptorInfo> interceptor, v8::internal::Handle<v8::internal::Name> name) Line 181   C++
    libcef.dll!v8::internal::`anonymous namespace'::GetPropertyWithInterceptorInternal(v8::internal::LookupIterator * it, v8::internal::Handle<v8::internal::InterceptorInfo> interceptor, bool * done) Line 1216   C++
    libcef.dll!v8::internal::JSObject::GetPropertyWithInterceptor(v8::internal::LookupIterator * it, bool * done) Line 5368   C++
    libcef.dll!v8::internal::Object::GetProperty(v8::internal::LookupIterator * it, bool is_global_reference) Line 1170   C++
    [Inline Frame] libcef.dll!v8::internal::__RT_impl_Runtime_GetPropertyWithReceiver(v8::internal::Arguments<0> args, v8::internal::Isolate * isolate) Line 59   C++
    libcef.dll!v8::internal::Runtime_GetPropertyWithReceiver(int args_length, unsigned __int64 * args_object, v8::internal::Isolate * isolate) Line 35   C++


If I figure out what's going on I'll post it here.
hunterlaux
Techie
 
Posts: 22
Joined: Fri Nov 17, 2017 5:50 pm

Re: Crashing on 105.3.39

Postby magreenblatt » Fri Sep 23, 2022 4:53 pm

What is the full stack trace? What are the reproduction steps? Does it reproduce in the CEF sample apps? Are you using a 32-bit or 64-bit build?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Crashing on 105.3.39

Postby hunterlaux » Fri Sep 23, 2022 5:39 pm

Exception thrown: read access violation.
`anonymous namespace'::V8TrackObject::Unwrap(...) returned 0x241D00002399.

What is the full stack trace?
Code: Select all
>   libcef.dll!`anonymous namespace'::InterceptorGetterCallbackImpl<v8::Local<v8::Name>>(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value> & info) Line 644   C++
    [Inline Frame] libcef.dll!v8::internal::PropertyCallbackArguments::BasicCallNamedGetterCallback(void(*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &) f, v8::internal::Handle<v8::internal::Name> name, v8::internal::Handle<v8::internal::Object> info, v8::internal::Handle<v8::internal::Object> receiver) Line 201   C++
    [Inline Frame] libcef.dll!v8::internal::PropertyCallbackArguments::CallNamedGetter(v8::internal::Handle<v8::internal::InterceptorInfo> interceptor, v8::internal::Handle<v8::internal::Name> name) Line 181   C++
    libcef.dll!v8::internal::`anonymous namespace'::GetPropertyWithInterceptorInternal(v8::internal::LookupIterator * it, v8::internal::Handle<v8::internal::InterceptorInfo> interceptor, bool * done) Line 1216   C++
    libcef.dll!v8::internal::JSObject::GetPropertyWithInterceptor(v8::internal::LookupIterator * it, bool * done) Line 5368   C++
    libcef.dll!v8::internal::Object::GetProperty(v8::internal::LookupIterator * it, bool is_global_reference) Line 1170   C++
    [Inline Frame] libcef.dll!v8::internal::__RT_impl_Runtime_GetPropertyWithReceiver(v8::internal::Arguments<0> args, v8::internal::Isolate * isolate) Line 59   C++
    libcef.dll!v8::internal::Runtime_GetPropertyWithReceiver(int args_length, unsigned __int64 * args_object, v8::internal::Isolate * isolate) Line 35   C++
    [External Code]   
    [Inline Frame] libcef.dll!v8::internal::GeneratedCode<unsigned long long,unsigned long long,unsigned long long,unsigned long long,unsigned long long,long long,unsigned long long **>::Call(unsigned __int64 args, unsigned __int64 args, unsigned __int64 args, unsigned __int64 args, __int64 args, unsigned __int64 * * args) Line 156   C++
    libcef.dll!v8::internal::`anonymous namespace'::Invoke(v8::internal::Isolate * isolate, const v8::internal::`anonymous namespace'::InvokeParams & params) Line 447   C++
    libcef.dll!v8::internal::Execution::Call(v8::internal::Isolate * isolate, v8::internal::Handle<v8::internal::Object> callable, v8::internal::Handle<v8::internal::Object> receiver, int argc, v8::internal::Handle<v8::internal::Object> * argv) Line 526   C++
    libcef.dll!v8::internal::JSProxy::GetProperty(v8::internal::Isolate * isolate, v8::internal::Handle<v8::internal::JSProxy> proxy, v8::internal::Handle<v8::internal::Name> name, v8::internal::Handle<v8::internal::Object> receiver, bool * was_found) Line 1231   C++
    libcef.dll!v8::internal::Object::GetProperty(v8::internal::LookupIterator * it, bool is_global_reference) Line 1164   C++
    libcef.dll!v8::internal::LoadIC::Load(v8::internal::Handle<v8::internal::Object> object, v8::internal::Handle<v8::internal::Name> name, bool update_feedback, v8::internal::Handle<v8::internal::Object> receiver) Line 512   C++
    [Inline Frame] libcef.dll!v8::internal::__RT_impl_Runtime_LoadIC_Miss(v8::internal::Arguments<0> args, v8::internal::Isolate * isolate) Line 2695   C++
    libcef.dll!v8::internal::Runtime_LoadIC_Miss(int args_length, unsigned __int64 * args_object, v8::internal::Isolate * isolate) Line 2678   C++
    [External Code]   
    [Inline Frame] libcef.dll!v8::internal::GeneratedCode<unsigned long long,unsigned long long,unsigned long long,unsigned long long,unsigned long long,long long,unsigned long long **>::Call(unsigned __int64 args, unsigned __int64 args, unsigned __int64 args, unsigned __int64 args, __int64 args, unsigned __int64 * * args) Line 156   C++
    libcef.dll!v8::internal::`anonymous namespace'::Invoke(v8::internal::Isolate * isolate, const v8::internal::`anonymous namespace'::InvokeParams & params) Line 447   C++
    libcef.dll!v8::internal::Execution::Call(v8::internal::Isolate * isolate, v8::internal::Handle<v8::internal::Object> callable, v8::internal::Handle<v8::internal::Object> receiver, int argc, v8::internal::Handle<v8::internal::Object> * argv) Line 526   C++
    libcef.dll!v8::internal::JSProxy::SetProperty(v8::internal::Handle<v8::internal::JSProxy> proxy, v8::internal::Handle<v8::internal::Name> name, v8::internal::Handle<v8::internal::Object> value, v8::internal::Handle<v8::internal::Object> receiver, v8::Maybe<v8::internal::ShouldThrow> should_throw) Line 3157   C++
    libcef.dll!v8::internal::Object::SetPropertyInternal(v8::internal::LookupIterator * it, v8::internal::Handle<v8::internal::Object> value, v8::Maybe<v8::internal::ShouldThrow> should_throw, v8::internal::StoreOrigin store_origin, bool * found) Line 2607   C++
    libcef.dll!v8::internal::Object::SetProperty(v8::internal::LookupIterator * it, v8::internal::Handle<v8::internal::Object> value, v8::internal::StoreOrigin store_origin, v8::Maybe<v8::internal::ShouldThrow> should_throw) Line 2636   C++
    libcef.dll!v8::internal::StoreIC::Store(v8::internal::Handle<v8::internal::Object> object, v8::internal::Handle<v8::internal::Name> name, v8::internal::Handle<v8::internal::Object> value, v8::internal::StoreOrigin store_origin) Line 1913   C++
    [Inline Frame] libcef.dll!v8::internal::__RT_impl_Runtime_StoreIC_Miss(v8::internal::Arguments<0> args, v8::internal::Isolate * isolate) Line 2854   C++
    libcef.dll!v8::internal::Runtime_StoreIC_Miss(int args_length, unsigned __int64 * args_object, v8::internal::Isolate * isolate) Line 2827   C++
    [External Code]   
    [Inline Frame] libcef.dll!v8::internal::GeneratedCode<unsigned long long,unsigned long long,v8::internal::MicrotaskQueue *>::Call(unsigned __int64 args, v8::internal::MicrotaskQueue * args) Line 156   C++
    libcef.dll!v8::internal::`anonymous namespace'::Invoke(v8::internal::Isolate * isolate, const v8::internal::`anonymous namespace'::InvokeParams & params) Line 444   C++
    libcef.dll!v8::internal::`anonymous namespace'::InvokeWithTryCatch(v8::internal::Isolate * isolate, const v8::internal::`anonymous namespace'::InvokeParams & params) Line 489   C++
    libcef.dll!v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate * isolate, v8::internal::MicrotaskQueue * microtask_queue, v8::internal::MaybeHandle<v8::internal::Object> * exception_out) Line 599   C++
    libcef.dll!v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate * isolate) Line 173   C++
    libcef.dll!v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate * v8_isolate) Line 127   C++
    libcef.dll!blink::scheduler::MainThreadSchedulerImpl::OnTaskCompleted(base::WeakPtr<blink::scheduler::MainThreadTaskQueue> queue, const base::sequence_manager::Task & task, base::sequence_manager::TaskQueue::TaskTiming * task_timing, base::sequence_manager::LazyNow * lazy_now) Line 2341   C++
    libcef.dll!blink::scheduler::MainThreadTaskQueue::OnTaskCompleted(const base::sequence_manager::Task & task, base::sequence_manager::TaskQueue::TaskTiming * task_timing, base::sequence_manager::LazyNow * lazy_now) Line 163   C++
    libcef.dll!base::sequence_manager::internal::SequenceManagerImpl::NotifyDidProcessTask(base::sequence_manager::internal::SequenceManagerImpl::ExecutingTask * executing_task, base::sequence_manager::LazyNow * time_after_task) Line 936   C++
    libcef.dll!base::sequence_manager::internal::SequenceManagerImpl::DidRunTask(base::sequence_manager::LazyNow & lazy_now) Line 736   C++
    libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow * continuation_lazy_now) Line 440   C++
    libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() Line 307   C++
    libcef.dll!base::MessagePumpDefault::Run(base::MessagePump::Delegate * delegate) Line 41   C++
    libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool application_tasks_allowed, base::TimeDelta timeout) Line 584   C++
    libcef.dll!base::RunLoop::Run(const base::Location & location) Line 143   C++
    libcef.dll!content::RendererMain(content::MainFunctionParams parameters) Line 298   C++
    libcef.dll!content::RunOtherNamedProcessTypeMain(const std::Cr::basic_string<char,std::Cr::char_traits<char>,std::Cr::allocator<char>> & process_type, content::MainFunctionParams main_function_params, content::ContentMainDelegate * delegate) Line 721   C++
    libcef.dll!content::ContentMainRunnerImpl::Run() Line 1065   C++
    libcef.dll!content::ContentMainRun(content::ContentMainRunner * content_main_runner) Line 402   C++
    libcef.dll!content::RunContentProcess(content::ContentMainParams params, content::ContentMainRunner * content_main_runner) Line 444   C++
    libcef.dll!content::ContentMain(content::ContentMainParams params) Line 459   C++
    libcef.dll!CefMainRunner::RunAsHelperProcess(const CefMainArgs & args, scoped_refptr<CefApp> application, void * windows_sandbox_info) Line 346   C++
    libcef.dll!CefExecuteProcess(const CefMainArgs & args, scoped_refptr<CefApp> application, void * windows_sandbox_info) Line 186   C++
    libcef.dll!cef_execute_process(const _cef_main_args_t * args, _cef_app_t * application, void * windows_sandbox_info) Line 74   C++
    RobotCefProxy.dll!CefExecuteProcess(const CefMainArgs & args, scoped_refptr<CefApp> application, void * windows_sandbox_info) Line 78   C++
    RobotCefProxy.dll!RobotCefProxy::InitializeCef(IWindowInterface && windowInterface, ITextOutputInterface && debugInterface) Line 1087   C++
    RobotCefProxy.dll!RobotCefProxy::InitInstance(HWND__ * hwnd, IWindowInterface && windowInterface, ITextOutputInterface && debugInterface) Line 331   C++
    [External Code]   



What are the reproduction steps?
This is part of a much larger app. It will take some work to create an example and narrow down what is going on.

Does it reproduce in the CEF sample apps?
Not yet.

Are you using a 32-bit or 64-bit build?
64-bit
hunterlaux
Techie
 
Posts: 22
Joined: Fri Nov 17, 2017 5:50 pm

Re: Crashing on 105.3.39

Postby hunterlaux » Fri Sep 23, 2022 9:51 pm

I have been using 100.0.14 and it worked.
I tried 101.0.18 and I saw the same crash.

Still trying to narrow it down.
hunterlaux
Techie
 
Posts: 22
Joined: Fri Nov 17, 2017 5:50 pm

Re: Crashing on 105.3.39

Postby hunterlaux » Fri Sep 23, 2022 11:59 pm

The app registers a bunch of interceptors.

It's like this example:
https://bitbucket.org/chromiumembedded/ ... -callbacks

But instead of registering the callback directly with window.register, it returns a v8 object that registers the callback and manages it. That way I can clear the callback if necessary.

Think of it like a Cef version of an EventSource.
https://developer.mozilla.org/en-US/doc ... ventSource

Seems to start out ok, but I register a ton of these. Eventually it crashes. It's never done that before and it's been working for years.

Maybe I used too many interceptors? :-) I'll keep looking.
hunterlaux
Techie
 
Posts: 22
Joined: Fri Nov 17, 2017 5:50 pm

Re: Crashing on 105.3.39

Postby hunterlaux » Sat Sep 24, 2022 12:52 pm

Looks like I was overwriting one of my objects that was using the interceptor with a new object using the same interceptor class. I've never had a problem with this before.

Basically the variable is inadvertently getting set twice in JavaScript. I can avoid that. I'm not sure if the original object is getting garbage collected. The crash goes away when I avoid the overwriting the original object. Still I'd like to understand this better because something changed in the between 100 and 101.

There is still something going on I don't quite understand, so I haven't boiled it down to a toy example yet.
hunterlaux
Techie
 
Posts: 22
Joined: Fri Nov 17, 2017 5:50 pm

Re: Crashing on 105.3.39

Postby hunterlaux » Sat Sep 24, 2022 7:34 pm

I think I'm going to abandon the interceptor. I realized I didn't need it.

If I stop using the interceptor and just build a proper v8 object the crash goes away.
hunterlaux
Techie
 
Posts: 22
Joined: Fri Nov 17, 2017 5:50 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 38 guests