- Code: Select all
CefDictionaryValue responseData;
...
creating responseData here
...
var message = CefProcessMessage.Create([MessageName]);
message.Arguments.SetSize(1);
message.Arguments.SetDictionary(0, responseData);
_browser.SendProcessMessage(CefProcessId.Renderer, message);
The responseData is then processed in the renderer process by first calling our methods logResponse(responseData) and then HandleResponse(responseData).
Occassionally, particularily when a high load is generated, an exception is thrown in CEF/CefGlue. Here is in excerpt from the call stack:
- Code: Select all
libcef.dll!`anonymous namespace'::PureCall() Line 29 C++
libcef.dll!_purecall() Line 58 C
libcef.dll!scoped_refptr<CefDictionaryValue>::AddRef(CefDictionaryValue * ptr) Line 378 C++
libcef.dll!scoped_refptr<CefDictionaryValue>::scoped_refptr<CefDictionaryValue>(CefDictionaryValue * p) Line 275 C++
libcef.dll!CefRefPtr<CefDictionaryValue>::CefRefPtr<CefDictionaryValue>(CefDictionaryValue * p) Line 153 C++
libcef.dll!CefCppToC<CefDictionaryValueCppToC,CefDictionaryValue,_cef_dictionary_value_t>::Get(_cef_dictionary_value_t * s) Line 37 C++
libcef.dll!dictionary_value_get_keys(_cef_dictionary_value_t * self, void * keys) Line 204 C++
[Managed to Native Transition]
Xilium.CefGlue.dll!Xilium.CefGlue.Interop.cef_dictionary_value_t.get_keys(Xilium.CefGlue.Interop.cef_dictionary_value_t* self, Xilium.CefGlue.Interop.cef_string_list* keys) Line 460 C#
Xilium.CefGlue.dll!Xilium.CefGlue.CefDictionaryValue.GetKeys() Line 117 C#
Program.exe!Program.Requests.RendererRequestHandler.CefDictionaryValueToV8Object(Xilium.CefGlue.CefDictionaryValue dictionary) Line 214 C#
Program.exe!Program.Requests.RendererRequestHandler.CefDictionaryValueToV8Object(Xilium.CefGlue.CefDictionaryValue dictionary) Line 244 C#
Program.exe!Program.Requests.RendererRequestHandler.CefListValueToV8Array(Xilium.CefGlue.CefListValue list) Line 174 C#
Program.exe!Program.Requests.RendererRequestHandler.CefDictionaryValueToV8Object(Xilium.CefGlue.CefDictionaryValue dictionary) Line 240 C#
Program.exe!Program.Requests.SimpleRendererRequestHandler.HandleResponse(Xilium.CefGlue.CefDictionaryValue responseData, Program.Requests.RequestContext requestContext, out bool keepContext) Line 65 C#
Program.exe!Program.Requests.RendererRequestHandler.HandleMessage(Xilium.CefGlue.CefDictionaryValue responseData, Program.Requests.RequestMapping requestMapping) Line 435 C#
Program.exe!Program.PGXRenderProcessHandler.OnProcessMessageReceived(Xilium.CefGlue.CefBrowser browser, Xilium.CefGlue.CefProcessId sourceProcess, Xilium.CefGlue.CefProcessMessage message) Line 73 C#
Xilium.CefGlue.dll!Xilium.CefGlue.CefRenderProcessHandler.on_process_message_received(Xilium.CefGlue.Interop.cef_render_process_handler_t* self, Xilium.CefGlue.Interop.cef_browser_t* browser, Xilium.CefGlue.CefProcessId source_process, Xilium.CefGlue.Interop.cef_process_message_t* message) Line 225 C#
[Native to Managed Transition]
The exception occurs in HandleResponse, but it doesn't happen if the call to LogResponse that precedes it is commented out. It can also by made much less likely if a deep copy of responseData is passed to LogResponse (as in LogResponse(responseData.Copy(false)). LogResponse does not change the responseData dictionary, the only methods that are called are GetKeys, GetValueType, and Get... (for Bool, Int etc.).
Does anyone know what could be causing this?