Page 1 of 1

Sporadic JCEF Crashes with fatal "small_bitmap != nullptr"

PostPosted: Wed Jul 31, 2019 3:29 am
by Phylanx
One of our clients has a problem on one of his client machines that our product crashes sporadically (about once a day) when viewing a PDF with JCEF.

The use case is the following:
It's some kind of document browser, on the left side, there's a table with the documents available (AWT).
If the selected document is a PDF (or HTML) a browser (cefbrowser+cefclient) is initialized and the PDF is loaded. The browsers UI will be shown on the right side.
When another document is selected (non PDF or HTML) the browser is closed.

The crash seems to happen while rendering the PDF into the native Windows GDI bitmap objects.
Restarting the program and retrying the use case again works, so it might be a leak or something.

The environment:
JCEF version 3325 (32 bit), Windows 10 64 bit, Java version: oracleJDK 8u172.

Crash details:
Code: Select all
[2912:10092:0730/] Check failed: small_bitmap != nullptr.
Error initializing symbols (8).  Dumping unresolved backtrace:

A logfile with verbose logging is attached.

Current analysis status:
The crash itself seems to happen because of following check in
CHECK(small_bitmap != nullptr);
The method executing this is called "CollectGDIUsageAndDie", so I guess the caller already had a similar problem and wanted to write some debug info somewhere and expects the CHECK to fail.
I don't think the problem is an exhaustion of GDI Objects in the java process because the same method checks if the allocated GDI Objects are less than 9990 and the process limit of objects is 10000.

My next steps are:
- check the GDI Objects count used by our Java process to ensure that the GDI Object Count is not the problem.
- check the value of the max GDI Objects available for the process in the registry.
- Getting more detailed informations: I'll try to convince our customer to accept the 1,65 GB libcef.dll.pdb file to get a more detailed crash info

I suspect that the problem happens because of something on the specific clients environment because no other client machine on any customer has this behavior.
Does anybody of you know of this problem or what might cause or fix it?