Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android access filesystem crash
Forum Update on Monday, May 27th 2025

Android access filesystem crash

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 281 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.
  • G Offline
    G Offline
    Gibbz
    wrote on 17 Jul 2020, 11:24 last edited by
    #1

    I have a crash with my app on android.
    I have a custom model based on QFileSystemModel. This is causing the crash.
    I have the android permissions setup fine.
    The problem seems to be that no matter what I use for the rootPath, it always uses "/" which causes a segmentation fault. I assume this needs root access obviously...

    Any idea how I can debug the QFileSystemModel to see why its no accepting my path?

        mFileSystemModel = new QFileSystemModel();
        mFileSystemModel->setFilter(QDir::AllDirs | QDir::NoDot);
        mFileSystemModel->setRootPath(Util::getHomeLocation()); // crash using QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString(), QStandardPaths::LocateDirectory)
    
    J 1 Reply Last reply 17 Jul 2020, 11:29
    0
    • G Gibbz
      17 Jul 2020, 11:24

      I have a crash with my app on android.
      I have a custom model based on QFileSystemModel. This is causing the crash.
      I have the android permissions setup fine.
      The problem seems to be that no matter what I use for the rootPath, it always uses "/" which causes a segmentation fault. I assume this needs root access obviously...

      Any idea how I can debug the QFileSystemModel to see why its no accepting my path?

          mFileSystemModel = new QFileSystemModel();
          mFileSystemModel->setFilter(QDir::AllDirs | QDir::NoDot);
          mFileSystemModel->setRootPath(Util::getHomeLocation()); // crash using QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString(), QStandardPaths::LocateDirectory)
      
      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 17 Jul 2020, 11:29 last edited by
      #2

      @Gibbz said in Android access filesystem crash:

      Util::getHomeLocation()

      What does it return?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      2/2

      17 Jul 2020, 11:29

      • Login

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