Google Play Console displays std::exception message

My Android game crashed on a user’s device at the highlighted line:

GameMovement::GameMovement(GameField& field, CellCoord from, CellCoord to) :
    m_field(field),
    pBall(m_field.GetCell(from))
{
    GameGraph graph(&m_field, from, to);

    m_path.reserve(m_field.GetColumnCount() + m_field.GetRowCount());

    if (!graph.FindPath(m_path))
    {
        throw std::runtime_error("Path not found.");
    }

    if (m_path.size() < 2)
    {
        throw std::runtime_error("Wrong path.");
    }
}

And Google Play Console displayed the following:

Thread:
terminating with uncaught exception of type std::runtime_error: Path not found.
  #00  pc 0x00000000000537d4  /apex/com.android.runtime/lib64/bionic/libc.so (abort+168)
  #01  pc 0x00000000000d1cc0  /lib/arm64/libc++_shared.so (abort_message+76)
  #02  pc 0x00000000000d1e74  /lib/arm64/libc++_shared.so (demangling_terminate_handler()+62)
  #03  pc 0x00000000000e6b74  /lib/arm64/libc++_shared.so (std::__terminate(void (*)())+59)
  #04  pc 0x00000000000e6208  /lib/arm64/libc++_shared.so (__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*)+152)
  #05  pc 0x00000000000e6160  /lib/arm64/libc++_shared.so (__cxa_throw+283)
  #06  pc 0x00000000008f8d80  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::GameMovement::GameMovement(LinesGame::GameField&, LinesGame::CellCoord, LinesGame::CellCoord)+18)
  #07  pc 0x00000000008f2c84  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::GameField::Click(LinesGame::CellCoord)+3092)
  #08  pc 0x000000000090f184  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::SceneRenderer::HandleMouseEvents(LinesGame::IPixelCoord*)+164)
  #09  pc 0x000000000090b758  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::ColorCodingRenderer::Draw(LinesGame::SceneContext const&, LinesGame::DrawingContext const&)+17)
  #10  pc 0x0000000000911b20  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::StackRenderer::Draw(LinesGame::SceneContext const&, LinesGame::DrawingContext const&)+51)
  #11  pc 0x000000000090d290  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::ProjectionRenderer::Draw(LinesGame::SceneContext const&, LinesGame::DrawingContext const&)+35)
  #12  pc 0x000000000090f2b8  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::SceneRenderer::Draw()+97)
  #13  pc 0x0000000000916f0c  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::GameFacade::DrawScene()+180)
  #14  pc 0x000000000092be24  /lib/arm64/libLinesGameQt_arm64-v8a.so (LinesGame::Squircle::beforeRendering()+354)
  #15  pc 0x0000000000364254  /lib/arm64/libQt6Core_arm64-v8a.so (void doActivate<false>(QObject*, int, void**)+363)
  #16  pc 0x00000000003f1ea0  /lib/arm64/libQt6Quick_arm64-v8a.so (QSGBatchRenderer::Renderer::render()+3492)
  #17  pc 0x0000000000406dfc  /lib/arm64/libQt6Quick_arm64-v8a.so (QSGRenderer::renderScene()+136)
  #18  pc 0x00000000003c9dc4  /lib/arm64/libQt6Quick_arm64-v8a.so (QQuickWindowPrivate::renderSceneGraph(QSize const&, QSize const&)+662)
  #19  pc 0x000000000050c038  /lib/arm64/libQt6Quick_arm64-v8a.so (QSGRenderThread::syncAndRender()+732)
  #20  pc 0x000000000050caa8  /lib/arm64/libQt6Quick_arm64-v8a.so (QSGRenderThread::run()+935)
  #21  pc 0x0000000000428968  /lib/arm64/libQt6Core_arm64-v8a.so (QThreadPrivate::start(void*)+321)
  #22  pc 0x00000000000bb728  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
  #23  pc 0x000000000005501c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68)

another question is why does not it display line numbers while I have the following in my build.gradle:

    defaultConfig {
        minSdkVersion qtMinSdkVersion
        targetSdkVersion qtTargetSdkVersion
        ndk.abiFilters = qtTargetAbiList.split(",")
        //For debug builds native-debug-symbols.zip size is 432MB.
        //Use SYMBOL_TABLE to upload debug builds.
        ndk.debugSymbolLevel "FULL"
    }

1 Response to Google Play Console displays std::exception message

  1. dmitriano says:

    The first I idea is to check if we update game graph after Undo() and SkipTurn()

Leave a Reply

Your email address will not be published. Required fields are marked *