Bug 2271072 - Eclipse crashes when rendering tooltips with formatted javadoc.
Summary: Eclipse crashes when rendering tooltips with formatted javadoc.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: webkitgtk
Version: 39
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michael Catanzaro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2271558 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-22 15:03 UTC by Robert Marcano
Modified: 2024-03-29 07:47 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-03-22 18:54:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Java crash log (396.55 KB, text/plain)
2024-03-22 15:04 UTC, Robert Marcano
no flags Details
Stack frames obtained with gdb (2.57 KB, text/plain)
2024-03-22 15:30 UTC, Robert Marcano
no flags Details
stack with debuginfo (6.95 KB, text/plain)
2024-03-22 16:33 UTC, Robert Marcano
no flags Details


Links
System ID Private Priority Status Summary Last Updated
WebKit Project 271477 0 None None None 2024-03-22 18:04:22 UTC

Description Robert Marcano 2024-03-22 15:03:17 UTC
After the javascriptcoregtk4.1 2.44.0-2.fc39 update, Eclipse keeps crashing every time it will try to render HTML.

Reproducible: Always

Steps to Reproduce:
1. Open Eclipse in a Wayland session.
2. Open any Java source file.
3. Hover over a Java class or method from the base class library like String to shot its javadoc
4. The UI hangs and a few second later it crashes.
Actual Results:  
Eclipse crashed completely

Expected Results:  
A Javadoc tooltip is shown.

Running Eclipse with the X11 backed instead of Wayland with GDK_BACKEND=x11 is a workaround.

Comment 1 Robert Marcano 2024-03-22 15:04:39 UTC
Created attachment 2023056 [details]
Java crash log

Comment 2 Michael Catanzaro 2024-03-22 15:20:37 UTC
The Java crash report is missing function names and line numbers, so not very useful.

Try to take the stack trace manually using gdb: https://handbook.gnome.org/issues/stack-traces.html. Don't worry about all the confusing Java frames in the backtrace; we just care about the C and C++ stuff on top.

Comment 3 Robert Marcano 2024-03-22 15:30:49 UTC
Created attachment 2023091 [details]
Stack frames obtained with gdb

Comment 4 Michael Catanzaro 2024-03-22 16:00:22 UTC
Well you didn't follow the instructions properly, but in this case it was good enough. There's only two places it can be crashing:

void AcceleratedBackingStoreDMABuf::ensureGLContext()
{
    if (m_gdkGLContext)
        return;

    GUniqueOutPtr<GError> error;
#if USE(GTK4)
    m_gdkGLContext = adoptGRef(gdk_surface_create_gl_context(gtk_native_get_surface(gtk_widget_get_native(m_webPage.viewWidget())), &error.outPtr()));
#else
    m_gdkGLContext = adoptGRef(gdk_window_create_gl_context(gtk_widget_get_window(m_webPage.viewWidget()), &error.outPtr()));
#endif
    if (!m_gdkGLContext)
        g_error("GDK is not able to create a GL context: %s.", error->message);

    if (!gdk_gl_context_realize(m_gdkGLContext.get(), &error.outPtr()))
        g_error("GDK failed to realize the GL context: %s.", error->message);
}

You'll see an error message in your journal (or in your terminal if you run Eclipse from a terminal). Please post the error message. Then we can move this to an upstream issue tracker (likely WebKit Bugzilla, or maybe the GTK issue tracker).

Comment 5 Robert Marcano 2024-03-22 16:33:54 UTC
Created attachment 2023132 [details]
stack with debuginfo

Sorry I missed the message:

  Missing separate debuginfos, use: dnf debuginfo-install webkit2gtk4.1-2.44.0-2.fc39.x86_64

And the only stack trace it generated was the one at the start of the gdb session. Retried before installing the debuginfo and this time it generated fine

The message before the crash is:

(Eclipse:26511): Gdk-CRITICAL **: 12:06:11.663: gdk_window_create_gl_context: assertion 'GDK_IS_WINDOW (window)' failed

Comment 6 Robert Marcano 2024-03-22 16:48:51 UTC
Let me add that it crashes only on tooltips with HTML, not on the Javadoc view that is displayed on a portion of the main window.

Comment 7 Michael Catanzaro 2024-03-22 17:42:33 UTC
(In reply to Robert Marcano from comment #5) 
> The message before the crash is:
> 
> (Eclipse:26511): Gdk-CRITICAL **: 12:06:11.663:
> gdk_window_create_gl_context: assertion 'GDK_IS_WINDOW (window)' failed

Huh, wow, OK. Next step is to report this on WebKit Bugzilla. Select the WebKitGTK component.

Comment 8 Michael Catanzaro 2024-03-22 18:54:58 UTC
Great, thanks.

Comment 9 Michael Catanzaro 2024-03-26 13:09:21 UTC
*** Bug 2271558 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.