Closed ghost closed 6 years ago
Please give me some testing url.
I think it is reproducible on any video page, i used this one: https://www.quirksmode.org/html5/tests/video.html
@nowrep I can't reproduce it with latest Appimage, so perhaps it is specific for „my Qt“ again!?
Probably not.
So it crashes with Qt 5.9.3 but not with Qt 5.10 (AppImage)? I can't reproduce it myself with Qt 5.10 either, and from the backtrace it really looks like bug in QtWebEngine rather than QupZilla.
So you may consider closing the issue. I will try again right i switch to Qt 5.10 (that probably will not be so soon :-))
I tried this on ArchLinux (qupzilla 2.2.5, qt 5.10...) and there is no crash. I opened video on youtube, it stared playing, i unloaded tab, no crash. I did not try latest git version.
@nowrep, just to confirm: i'm still reproducing that with 5.10.1 I did it 5 times of 5 here, but if you still can't reproduce it, you may just close the issue. The back trace looks similar: gdb.log
@cranes-bill What about this:
diff --git a/src/lib/tabwidget/tabbar.cpp b/src/lib/tabwidget/tabbar.cpp
index 4c8c8056..97a78c73 100644
--- a/src/lib/tabwidget/tabbar.cpp
+++ b/src/lib/tabwidget/tabbar.cpp
@@ -348,14 +348,13 @@ void TabBar::contextMenuEvent(QContextMenuEvent* event)
int index = tabAt(event->pos());
- TabContextMenu menu(index, m_window);
+ TabContextMenu *menu = new TabContextMenu(index, m_window);
+ menu->setAttribute(Qt::WA_DeleteOnClose);
// Prevent choosing first option with double rightclick
const QPoint pos = event->globalPos();
QPoint p(pos.x(), pos.y() + 1);
- menu.exec(p);
-
- m_window->action(QSL("Other/RestoreClosedTab"))->setEnabled(true);
+ menu->popup(p);
}
void TabBar::hideCloseButton(int index)
it's not so big problem for me, so you can just leave it.
diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp
index 2f55d1b0..a1c6db91 100644
--- a/src/lib/webengine/webview.cpp
+++ b/src/lib/webengine/webview.cpp
@@ -155,6 +155,7 @@ void WebView::setPage(WebPage *page)
emit m_page->loadFinished(true);
}
m_page->setView(nullptr);
+ m_page->setParent(nullptr);
m_page->deleteLater();
}
Oh, why reopened it!!!? Tried the latest patch (over the previous one) in still crash.
Because closed it by mistake, eh :D
diff --git a/src/lib/webengine/webpage.cpp b/src/lib/webengine/webpage.cpp
index 8d66bf27..607de065 100644
--- a/src/lib/webengine/webpage.cpp
+++ b/src/lib/webengine/webpage.cpp
@@ -119,8 +119,6 @@ WebPage::WebPage(QObject* parent)
WebPage::~WebPage()
{
- mApp->plugins()->emitWebPageDeleted(this);
-
if (m_runningLoop) {
m_runningLoop->exit(1);
m_runningLoop = 0;
diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp
index 2f55d1b0..ff0e354a 100644
--- a/src/lib/webengine/webview.cpp
+++ b/src/lib/webengine/webview.cpp
@@ -92,6 +92,8 @@ WebView::WebView(QWidget* parent)
WebView::~WebView()
{
+ mApp->plugins()->emitWebPageDeleted(m_page);
+
WebInspector::unregisterView(this);
WebScrollBarManager::instance()->removeWebView(this);
}
@@ -154,6 +156,7 @@ void WebView::setPage(WebPage *page)
emit m_page->loadProgress(100);
emit m_page->loadFinished(true);
}
+ mApp->plugins()->emitWebPageDeleted(m_page);
m_page->setView(nullptr);
m_page->deleteLater();
}
Should i keep the previous patches? The mistake probably is sign that really should be closed. ;D
No, only apply this last patch.
That's it, works like a charm! :+1:
I must leave for a while, so i'll be unresponsive in next about an hour.
Trying to unload tab when an html5 video plays on it, make QupZilla crashes. Crash-2018-01-31T10:25:16.txt gdb.log