Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
5.1.0 Beta 1
-
None
-
build on Arch Linux 64-bit with latest sdk and ndk, gcc 4.7; tried on Samsung Galaxy Note
Description
To reproduce, just build qmlscene as an Android application, install it and run it. Because a qml file is not given on the command line, it will open a QFileDialog first to prompt for one. Select a qml file and hit OK; then it crashes like this:
D/Qt ( 7884): main.cpp:454 (int main(int, char**)): opening QUrl( "file:///mnt/sdcard/qtquick/dialogs/ColorDialogs.qml" )
E/libEGL ( 7884): eglMakeCurrent:633 error 3009 (EGL_BAD_MATCH)
W/Qt ( 7884): eglconvenience/qeglplatformcontext.cpp:111 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x88e8f0
W/Qt ( 7884):
E/libEGL ( 7884): eglMakeCurrent:633 error 3009 (EGL_BAD_MATCH)
W/Qt ( 7884): eglconvenience/qeglplatformcontext.cpp:111 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x88e8f0
W/Qt ( 7884):
F/Qt ( 7884): global/qglobal.cpp:1992 (void qt_assert(const char*, const char*, int)): ASSERT: "context" in file opengl/qopenglfunctions.cpp, line 194
F/libc ( 7884): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
I/DEBUG ( 6599): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 6599): Build fingerprint: 'samsung/GT-N7000/GT-N7000:4.0.3/IML74K/ZCLP6:user/release-keys'
I/DEBUG ( 6599): pid: 7884, tid: 7918 >>> org.qtproject.example.qmlscene <<<
I/DEBUG ( 6599): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I made the following changes to qmlscene:
In qmlscene.pro, comment out
#load(qt_tool)
and in main.cpp, it's convenient to have a default starting directory where you keep your qml files:
@@ -296,7 +296,7 @@ static bool checkVersion(const QUrl &url) static void displayFileDialog(Options *options) { #if defined(QT_WIDGETS_LIB) && !defined(QT_NO_FILEDIALOG) - QString fileName = QFileDialog::getOpenFileName(0, "Open QML file", QString(), "QML Files (*.qml)"); + QString fileName = QFileDialog::getOpenFileName(0, "Open QML file", "/sdcard/qtquick", "QML Files (*.qml)"); if (!fileName.isEmpty()) { QFileInfo fi(fileName); options->file = QUrl::fromLocalFile(fi.canonicalFilePath());
Also in main.cpp, you can work around this bug by hard-coding a path to a qml file, so the file dialog will not be shown:
@@ -444,11 +444,14 @@ int main(int argc, char ** argv) QUnifiedTimer::instance()->setSlowModeEnabled(options.slowAnimations); if (options.file.isEmpty()) + options.file = "file:///mnt/sdcard/qtquick/dialogs/ColorDialogs.qml"; + if (options.file.isEmpty()) #if defined(QMLSCENE_BUNDLE) displayOptionsDialog(&options); #else displayFileDialog(&options); #endif
Attachments
Issue Links
- is replaced by
-
QTBUG-31277 Android: Top-level modal dialog hangs on EGL when no event loop is running
- Closed