Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. New challenge: A blank mainwindow app gives error when openning in debug mode
Forum Updated to NodeBB v4.3 + New Features

New challenge: A blank mainwindow app gives error when openning in debug mode

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 200 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.
  • H Offline
    H Offline
    hkzz
    wrote on last edited by
    #1

    It is a HP Victus 16 sxxxx series notebook
    (AMD Ryzen 7 7840HS w/ Radeon 780M Graphics 3.80 GHz, 32 RAM)
    Win11 Home edt. with having all OS updates
    Fresh installed Qt having 6.2 and 6.7, with C++17
    Created new C++ desktop gui app with qmainwindow
    No any classes added or any modification applied, just blank app created by using qt's New Project -> blah blah.
    C++: v17
    Project configuration tried: Desktop Qt6.2.4 MSVC2019 x64 and Desktop Qt6.7.1 MSVC2019 x64
    When runs it using release it is ok, a blank form appears.
    When runs it using debug it errors at the step in the screenshot :
    (tested with qmaike and cmake as well)
    Should be system compatibability problem.. Anyone came accross and solved?

    access violation always at "m_direct3D9 = direct3DCreate9(D3D_SDK_VERSION);" in debug mode.

    with Desktop Qt6.2.4 MSVC2019 x64:

    QDirect3D9Handle::QDirect3D9Handle() :
        m_d3d9lib(QStringLiteral("d3d9"))
    {
        using PtrDirect3DCreate9 = IDirect3D9 *(WINAPI *)(UINT);
    
        if (m_d3d9lib.load()) {
            if (auto direct3DCreate9 = (PtrDirect3DCreate9)m_d3d9lib.resolve("Direct3DCreate9"))
                m_direct3D9 = direct3DCreate9(D3D_SDK_VERSION);
        }
    }
    

    c77b772d-7f76-4d1c-9bb0-ac8176a969ce-image.png

    with Desktop Qt6.7.1 MSVC2019 x64

    QDirect3D9Handle::QDirect3D9Handle()
    {
        m_direct3D9 = Direct3DCreate9(D3D_SDK_VERSION);
    }
    

    d7a4e4a0-cbb8-4aff-bc12-da841d035fce-image.png

    jsulmJ C 2 Replies Last reply
    0
    • H hkzz

      It is a HP Victus 16 sxxxx series notebook
      (AMD Ryzen 7 7840HS w/ Radeon 780M Graphics 3.80 GHz, 32 RAM)
      Win11 Home edt. with having all OS updates
      Fresh installed Qt having 6.2 and 6.7, with C++17
      Created new C++ desktop gui app with qmainwindow
      No any classes added or any modification applied, just blank app created by using qt's New Project -> blah blah.
      C++: v17
      Project configuration tried: Desktop Qt6.2.4 MSVC2019 x64 and Desktop Qt6.7.1 MSVC2019 x64
      When runs it using release it is ok, a blank form appears.
      When runs it using debug it errors at the step in the screenshot :
      (tested with qmaike and cmake as well)
      Should be system compatibability problem.. Anyone came accross and solved?

      access violation always at "m_direct3D9 = direct3DCreate9(D3D_SDK_VERSION);" in debug mode.

      with Desktop Qt6.2.4 MSVC2019 x64:

      QDirect3D9Handle::QDirect3D9Handle() :
          m_d3d9lib(QStringLiteral("d3d9"))
      {
          using PtrDirect3DCreate9 = IDirect3D9 *(WINAPI *)(UINT);
      
          if (m_d3d9lib.load()) {
              if (auto direct3DCreate9 = (PtrDirect3DCreate9)m_d3d9lib.resolve("Direct3DCreate9"))
                  m_direct3D9 = direct3DCreate9(D3D_SDK_VERSION);
          }
      }
      

      c77b772d-7f76-4d1c-9bb0-ac8176a969ce-image.png

      with Desktop Qt6.7.1 MSVC2019 x64

      QDirect3D9Handle::QDirect3D9Handle()
      {
          m_direct3D9 = Direct3DCreate9(D3D_SDK_VERSION);
      }
      

      d7a4e4a0-cbb8-4aff-bc12-da841d035fce-image.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @hkzz Such issues can be caused by a mix of debug and release libraries, you should check that.

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

      1 Reply Last reply
      0
      • H hkzz

        It is a HP Victus 16 sxxxx series notebook
        (AMD Ryzen 7 7840HS w/ Radeon 780M Graphics 3.80 GHz, 32 RAM)
        Win11 Home edt. with having all OS updates
        Fresh installed Qt having 6.2 and 6.7, with C++17
        Created new C++ desktop gui app with qmainwindow
        No any classes added or any modification applied, just blank app created by using qt's New Project -> blah blah.
        C++: v17
        Project configuration tried: Desktop Qt6.2.4 MSVC2019 x64 and Desktop Qt6.7.1 MSVC2019 x64
        When runs it using release it is ok, a blank form appears.
        When runs it using debug it errors at the step in the screenshot :
        (tested with qmaike and cmake as well)
        Should be system compatibability problem.. Anyone came accross and solved?

        access violation always at "m_direct3D9 = direct3DCreate9(D3D_SDK_VERSION);" in debug mode.

        with Desktop Qt6.2.4 MSVC2019 x64:

        QDirect3D9Handle::QDirect3D9Handle() :
            m_d3d9lib(QStringLiteral("d3d9"))
        {
            using PtrDirect3DCreate9 = IDirect3D9 *(WINAPI *)(UINT);
        
            if (m_d3d9lib.load()) {
                if (auto direct3DCreate9 = (PtrDirect3DCreate9)m_d3d9lib.resolve("Direct3DCreate9"))
                    m_direct3D9 = direct3DCreate9(D3D_SDK_VERSION);
            }
        }
        

        c77b772d-7f76-4d1c-9bb0-ac8176a969ce-image.png

        with Desktop Qt6.7.1 MSVC2019 x64

        QDirect3D9Handle::QDirect3D9Handle()
        {
            m_direct3D9 = Direct3DCreate9(D3D_SDK_VERSION);
        }
        

        d7a4e4a0-cbb8-4aff-bc12-da841d035fce-image.png

        C Offline
        C Offline
        ChrisW67
        wrote on last edited by ChrisW67
        #3

        Presumably m_d3d9lib is a QLibrary.

        Have you checked m_d3d9lib.isLoaded() before trying to use it?
        Have you checked m_d3d9lib.errorString() after the attempt to resolve your entry point?

        1 Reply Last reply
        0

        • Login

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