Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Crash on EGLFS Platform After Qt 6.5 Migration During Instant Resume(App Background/Foreground Transition)
Forum Update on Monday, May 27th 2025

Crash on EGLFS Platform After Qt 6.5 Migration During Instant Resume(App Background/Foreground Transition)

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 1 Posters 199 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    __K2403__
    wrote 14 days ago last edited by
    #1

    Hi all,

    We're encountering a crash after migrating our Qt-based application from Qt 5.15.1 to Qt 6.5, specifically when using the EGLFS platform on an ARM device.

    Background:
    We have implemented a feature called "instant resume". The idea is to simulate a seamless background-to-foreground transition by hiding the application and bringing it back later—providing a smooth resume experience.

    Due to the EGLFS platform limitation of supporting only a single surface, we cannot keep the surface alive when the app goes to the background. As a result, we are required to release the surface and related resources, which means we must call QWindow::close() instead of QWindow::hide() when putting the app in the background, and QWindow::show() (or re-create the window) when bringing it back to the foreground.

    To support this, we implemented a custom EGLFS hook that overrides the default destroyNativeWindow() behavior:

    #include "private/qeglfshooks_p.h"
    #include <stdio.h>

    QT_BEGIN_NAMESPACE

    class QEglFSCustomHooks : public QEglFSHooks
    {
    public:
    void destroyNativeWindow(EGLNativeWindowType window) override;
    };

    void QEglFSCustomHooks::destroyNativeWindow(EGLNativeWindowType window)
    {
    Q_UNUSED(window);
    eglTerminate(EGL_NO_DISPLAY);
    }

    QEglFSCustomHooks eglFSCustomHooks;
    QEglFSHooks *platformHooks = &eglFSCustomHooks;

    QT_END_NAMESPACE
    With this setup, everything worked fine on Qt 5.15.1.

    Issue After Migration to Qt 6.5:
    After upgrading to Qt 6.5, the app crashes when trying to resume (bring the app back to the foreground). Here's the backtrace:

    Searching frame 0 (FP=b55afd7c, PC=4201ff60)
    Failed to find prior stack frame; terminating backtrace.
    /usr/lib/libmali.so41db0000[4201ff60]

    And this message appears in the GPU logs:

    [rtk][gpu] eglp_window_surface_specific_initialization: use the same native window descriptor to create egl surface!

    Questions:
    Is overriding destroyNativeWindow() still supported in Qt 6.5, or is there a better/recommended way to release surface resources for EGLFS?

    How should we safely implement "instant resume" behavior under EGLFS in Qt 6.5?

    Any help, insights, or directions would be greatly appreciated!

    1 Reply Last reply
    0
    • _ Offline
      _ Offline
      __K2403__
      wrote 2 days ago last edited by
      #2

      @SGaist can you please suggest something ?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved