Hello
I try to load the JCEF browser into an eclispe RCP SWT application (Display/shell/TabFolder/Canvas ....)/ Java 7.
I would like to have the minimum modifications to do to the jcef functional code
I saw that I can use JOGL in SWT using the SWT-AWT bridge.
I use the SefBrowserOSr class
My code like :
CefInitialize is executed in a separate thread.
Display display=new Dispaly();
Shell shell=new Shell(display);
shell.setLayout(new FillLayout();
shell.setSize(1024, 768);
I call a class constructor which inherits from swt.Canvas (the constructor calls super(shell,SWT.EMBEDDED);
I then usr Frame (java.awt.Frame)
Frame frame= SWT_AWT.new_Frame(compoiste) (composite is my swt Canvas).
fram.add(glCanvas)
here is the code
private void createGLCanvas(Composite composite) {
GLProfile glprofile = GLProfile.getMaxFixedFunc(true);
GLCapabilities glcapabilities = new GLCapabilities(glprofile);
canvas_ = new GLCanvas(glcapabilities) {
@Override
public void paint(Graphics g) {
if (parent_ != null) {
createDevTools(parent_, clientHandler_, getWindowHandle(), isTransparent_, null);
} else {
createBrowser(clientHandler_, getWindowHandle(), url_, isTransparent_, null, context_);
}
super.paint(g);
}
};
Frame frame = SWT_AWT.new_Frame(composite);
frame.add(canvas_); // c ici que ca merde
canvas_.addGLEventListener(new GLEventListener() {
..............
I get an error on frame.add(canvas)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6e0a9829, pid=3232, tid=10088
#
# JRE version: 7.0_21-b11
# Java VM: Java HotSpot(TM) Client VM (23.21-b01 mixed mode windows-x86 )
# Problematic frame:
# V [jvm.dll+0xa9829]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\jcef_1916_1804\src\out\win32\Debug\hs_err_pid3232.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
[1210/161927:ERROR:stack_trace_win.cc(142)] SymInitialize failed: 87
[1210/161927:FATAL:context.cc(309)] Check failed: OnInitThread().
Error initializing symbols (87). Dumping unresolved backtrace:
2A424061
2A37383F
2A1B43A3
2A1B20AF
....
[error occurred during error reporting , id 0x80000003]
Did someone try this ?
thank's for your help