Page 1 of 1

Application error on the second time

PostPosted: Wed Sep 09, 2020 6:14 am
by DoaaKamel
Error cef_ref_counted.h(325)] Assert failed: ptr_ != __null.

Hello I am new to CEF IPC communication I am trying to send a message from backend to javescript.

The program works well on first time run after make but the window appears blank on the second time.

Is there something I need to do in the function onContextReleased.

Here is the message sent from cefclient:
messageSent.PNG
The message sent from cefClient
messageSent.PNG (31.96 KiB) Viewed 1832 times


then the code in context Created
OnContextCreated.PNG
OnContextCreated
OnContextCreated.PNG (21.38 KiB) Viewed 1832 times
.

then the code in Excute function
Execute.PNG
Execute
Execute.PNG (53.28 KiB) Viewed 1832 times
.

the callback to the javascript:

const CefString& request = message->GetArgumentList()->GetString(5);
CefV8ValueList args;
args.push_back(CefV8Value::CreateString(request));

//excute javascript function
print_callback->ExecuteFunctionWithContext(print_callback_context_ ,NULL, args);