Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class <DMainWindow> causes crash when executing close() on pgw devices #88

Closed
uniontechzhangsong opened this issue May 30, 2023 · 1 comment
Labels
invalid This doesn't seem right

Comments

@uniontechzhangsong
Copy link

SUMMARY | 问题概要

Here is my method to reproduce the problem:
create 3 windows inherited from DMainWindow, each window contains a webengineview and open the web page, crash after closing any window; keep the code unchanged, just change the inherited DMainWindow to inherit QMainWindow, and close the windows in turn without the related crash phenomenon.

DTK and OS VERSIONS | DTK&系统版本信息

Device: HUAWEI QingYun W525 PGUW-WBX0 Desktop Computer
OS: UnionTech OS Desktop 20 Professional Linux version 4.19.90-arm64-desktop #1.1.9-uos SMP PREEMPT Mon May 15 20:48:14 CST 2023
Processor: PANGU M900 (octa-core / octa-logic processor)
Motherboard: SP1PGUWM
Memory: 8GB (DDR4 3195 MT/s)
Display Adapter: PANGU M900 Intergrated Graphics
Audio Adapter: OnBoard Audio
Storage Device: KXG60ZNV256G TOSHIBA (256 GB)
Network adapter: Ethernet interface
Mouse: Optical Mouse (Pixart Imaging Optical Mouse)
Keyboard: USB Keyboard (China Resource Semico USB Keyboard)
Display device: Monitor VSC (23.8 inches (53cm X 29cm))
CD-ROM drive: DVD A DU8AENH
Qt-version: 5.11.3
Libdtkwidget: 5.5.62

Minimal Reproducible Case Code | 最小复现案例代码

class MainWindow : public DMainWindow
{
Q_OBJECT

public:
explicit MainWindow(QWidget *parent = nullptr);
};

MainWindow::MainWindow(QWidget *parent)
: DMainWindow(parent)
{
setMinimumSize(QSize(960, 620));

QWebEngineView *webView = new QWebEngineView(this);
webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

webView->load(QUrl(DEFAULT_URL));
setCentralWidget(webView);

}

int main(int argc, char *argv[])
{
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu");

QApplication a(argc, argv);

QSurfaceFormat format;
format.setRenderableType(QSurfaceFormat::OpenGLES);
format.setDefaultFormat(format);

MainWindow w;
w.show();

MainWindow w2;
w2.show();

MainWindow w3;
w3.show();

return a.exec();

}

OBSERVED RESULT | 观察到的结果

 each window contains a webengineview and open the web page, crash after closing any window; keep the code untouched, just change the inherited DMainWindow to inherit QMainWindow, and close the windows in turn without the related crash phenomenon. 

EXPECTED RESULT | 期望的结果

I hope it will be as stable as QMainwindow on pgw

ADDITIONAL INFORMATION | 额外补充

pms link contains the demo I uploaded:
https://pms.uniontech.com/bug-view-202401.html

@kegechen kegechen added the invalid This doesn't seem right label Dec 4, 2023
@kegechen
Copy link
Contributor

kegechen commented Dec 4, 2023

客户端缓存,避免缓存重复释放导致的闪退。和 DMainWIndow 无关

@kegechen kegechen closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants