Debug eclipse thread of native function in Visual Studio.

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

Debug eclipse thread of native function in Visual Studio.

Postby Arekkusu » Tue Aug 29, 2017 4:09 am

Hi all,
I want to know if you know of some debugging tools that I can use in order to debug a native function in Visual Studio while creating a thread from java to call that native function.

I'm trying to implement the CEF to SWT project in eclipse from https://github.com/inaauto/javacef, I've built the project that holds the creation of cef in debug/64(so that I can access the code when I run a thread from java).

I have this problem when I start creating a thread to call a function from chromium_loader_win.cc called "browser_1init". I get the error seen in the image.
That's not the main problem but If you know how to solve it please tell me :D :D.

My real problem is how can I debug the native code to see if the thread does call that method and to see where in the native code the problem happens.

I've tried putting breakpoints in Visual Studio and attaching the process that opened to Visual Studio, but nothing would happen.
Attachments
error.png
error.png (23.05 KiB) Viewed 12061 times
Arekkusu
Techie
 
Posts: 20
Joined: Fri Aug 25, 2017 2:35 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Phylanx » Tue Aug 29, 2017 10:26 am

You can try placing the debugging binaries to your native directory (besides the productive binaries of the jcef.dll (jcef.dll.pdb) and libcef.dll (libcef.pdb)).
You will get a more detailed stack if native problems happen then.

I think you can download the PDB files from the same source as the productive binaries.
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Arekkusu » Fri Sep 01, 2017 3:23 am

Can someone tell me where can I find jcef.dll.pdb ? :D Please
Arekkusu
Techie
 
Posts: 20
Joined: Fri Aug 25, 2017 2:35 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Phylanx » Fri Sep 01, 2017 3:46 am

If you setup the build on your machine, you can build it yourself.
That's the way I did it.

Don't know if there is a place to download it.
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Arekkusu » Fri Sep 01, 2017 4:00 am

Well, the libcef.dll.pdb I found it from here http://opensource.spotify.com/cefbuilds/index.html
Arekkusu
Techie
 
Posts: 20
Joined: Fri Aug 25, 2017 2:35 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Arekkusu » Fri Sep 01, 2017 4:03 am

And about the build, the build was done on my machine by building javacef.sln, and then I've loaded the java project and tried to load (chrome_elf,libcef,chromium_lib) libraries which were a success.
But now I have the same problem with the window that sais that "the java virtual machine can't be opened"
Arekkusu
Techie
 
Posts: 20
Joined: Fri Aug 25, 2017 2:35 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Arekkusu » Fri Sep 01, 2017 4:08 am

This is the exact location where the error message with the jvm starts.... it's the "cef_initialize" function.
Attachments
Untitled.png
Untitled.png (25.55 KiB) Viewed 12035 times
Arekkusu
Techie
 
Posts: 20
Joined: Fri Aug 25, 2017 2:35 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Phylanx » Fri Sep 01, 2017 7:24 am

In my local build environment, the jcef.pdb is created on the same location like the jcef.dll.
Could your problem have anything to do with the x32/x64 build thread you posted?
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Arekkusu » Mon Sep 04, 2017 1:20 am

Can you post your jcef.pdb here or can you tell me the path where your jcef.pdb is located i don't have mine,I only have libcef.dll.pdb and chromium_loader.dll.pdb
.
Arekkusu
Techie
 
Posts: 20
Joined: Fri Aug 25, 2017 2:35 am

Re: Debug eclipse thread of native function in Visual Studio

Postby Phylanx » Mon Sep 04, 2017 1:27 am

The jcef.pdb file is about 15MB big, with ZIP it is still 3MB (which is too big for this forum).
But I could attach it in 7z format...

I'm just not sure if it helps you:
I build java-cef on a windows machine, 32 bit.
Also, I build the JCEF code for my company with version 3.2704 which is rather old, I guess, you have a newer one?
I guess, wrong debugging information just makes it worse.
Attachments
jcef.7z
(1.87 MiB) Downloaded 736 times
Phylanx
Expert
 
Posts: 201
Joined: Thu Aug 11, 2016 8:17 am

Next

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 28 guests