build JCEF with DCHECK_IS_ON=false

Having problems with building or using the JCEF Java binding? Ask your questions here.

build JCEF with DCHECK_IS_ON=false

Postby sokolovAS » Mon Dec 12, 2016 10:39 am

Problem: i use JCEF and my code crashes on some DCHECK in c++ code of chromium. i saw this part surrounded with directive #if DCHECK_IS_ON()
StringView.cpp:
#if DCHECK_IS_ON()
StringView::~StringView() {
DCHECK(m_impl);
DCHECK(!m_impl->hasOneRef()) << "StringView does not own the StringImpl, it "
"must not have the last ref.";
}
#endif

, so i wanna turn DCHECK_IS_ON to false
can i do it by rebuilding only JCEF with some addditional command line arg?
sokolovAS
Newbie
 
Posts: 4
Joined: Thu Nov 24, 2016 8:10 am

Re: build JCEF with DCHECK_IS_ON=false

Postby magreenblatt » Tue Dec 13, 2016 4:42 am

Just use the Release build of libcef instead of the Debug build.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: build JCEF with DCHECK_IS_ON=false

Postby Easy1 » Mon Feb 20, 2017 8:48 am

Hi!

I also have the same problem with some failing DEBUG checks.
But in my case I have to use DEBUG DLLs and the DEBUG pdb file, otherweise I don't get any useful native stack to analyze my JVM crash.
My problem is, that I get some sporadic JVM crashes when I cancel the print dialog.

Details:
Windows 7 32 bit
JCEF Version = 3.2883.0
CEF Version = 3.2883.1539
Chromium Version = 55.0.2883.59
Used JVM arguments: -Xmx512m
Used Application arguments: --ppapi-flash-path=\\pepflashplayer32.dll --allow-outdated-plugins --noerrdialogs --log-file=D:\Temp\head_ci\CEF_DUMMY.log --log-severity=verbose

Reproduction:
Clicking the print button, print dialog is opened. Cancel the print dialog with "Cancel" button or with "X". It does not occur everytime, sometimes I have to click the print button and click de cancel button several times,
before the JVM crashes. I only can reproduce it with Windows 7, (not reproducible with Windows 8 and 10). I can reproduce this problem with Release DLLs and Release pdb file and with Debug DLLs and Debug pdb file,
but if I use Release DLLs and the Release pdb file, I don't get a useful native stack. Only if I use Debug DLLs and the Debug pdb file.

Stack with Release DLLs and Release pdb file:
[0120/121222:ERROR:ipc_channel_win.cc(217)] pipe error: 109
[0120/121242:ERROR:ipc_channel_win.cc(217)] pipe error: 109

Stack with Debug DLLs and the Debug pdb file (the whole logging can be found in the attached logfile "CEF_log.log"):
[0216/143927:WARNING:resource_message_handler.cc(49)] 'Post' message handler failed to complete successfully.
[0216/143928:ERROR:singleton_hwnd.cc(34)] Cannot create windows on non-UI thread!
[0216/143958:ERROR:stack_trace_win.cc(65)] SymInitialize failed: 87
[0216/143958:FATAL:context.cc(322)] Check failed: OnInitThread().

Do you know which problem could cause this JVM Crash?
My second question is, if there is any possibility to disable the DEBUG checks in Debug mode?
Is there a flag or something to build the DEBUG DLLs without those DEBUG checks?
I have already tried to set #define DCHECK_IS_ON() from 1 to 0 in the chromium\src\base\logging.h file.

instead of this block:
Code: Select all
#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
#define DCHECK_IS_ON() 0
#else
#define DCHECK_IS_ON() 1
#endif


I tried this:
Code: Select all
#define DCHECK_IS_ON() 0


But this didn't work, I still get failing DEBUG checks.
Thanks for your help!!
Attachments
CEF_log.log
Logfile with Debug DLLs and Debug pdb File
(20.36 KiB) Downloaded 517 times
Easy1
Newbie
 
Posts: 8
Joined: Mon Feb 20, 2017 8:23 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 20 guests