sigsegv instead of NullReferenceException on linux
Hello! At first, thank you for you big work, Dmitry.
I use cefglue offscreen on ubuntu 16.04 with .net core 2.2 (I simply convert project and it works perfectly).
My settings:
var cefSettings = new CefSettings
{
WindowlessRenderingEnabled = true,
MultiThreadedMessageLoop = true,
ExternalMessagePump = false,
NoSandbox = true,
};
Switches:
commandLine.AppendSwitch("disable-gpu");
commandLine.AppendSwitch("disable-gpu-compositing");
commandLine.AppendSwitch("enable-begin-frame-scheduling");
commandLine.AppendSwitch("disable-smooth-scrolling");
commandLine.AppendSwitch("disable-surfaces");
commandLine.AppendSwitch("mute-audio");
commandLine.AppendSwitch("no-zygote");
Only one issue. .Net very well handle NullReferenceException
. For example:
try
{
string t = null;
var c = false;
if (c)
{
t = "";
}
/// t is null here and we get exception
var l = t.Length;
}
catch (Exception e)
{
Console.WriteLine($"TTest: 1 {e}");
}
In console we see "NullReferenceException".
But after call CefRuntime.Initialize
this code cause sigsegv. But should be NullReferenceException
.
Example of sigsegv:
segfault at 0 ip 00007f9ba4bf1304 sp 00007f9b2e796320 error 4 in System.Net.Http.dll[7f9ba4b58000+118000]
It happen with cef_3.3538.1852.gcb937fc and with cef_76.1.13+gf19c584+chromium-76.0.3809.132.
I assume, that I need to write about it in cef repository, but at first I leave it here. May be anyone has workaround.
p.s. On windows 10 it works correctly.