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. Debug Error , QT 6_2_1 MSVC20119 when i try to use OGR 3D in Qt
Forum Updated to NodeBB v4.3 + New Features

Debug Error , QT 6_2_1 MSVC20119 when i try to use OGR 3D in Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 4 Posters 741 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.
  • A Offline
    A Offline
    Alex42
    wrote on last edited by
    #3

    hi , and thank you for your answer,
    i run in debugger , and crashed here Capture2.PNG
    when i create an instance of this class

     QOgreBasicTest *testOgre = new QOgreBasicTest();
    
    JonBJ 1 Reply Last reply
    0
    • A Offline
      A Offline
      Alex42
      wrote on last edited by
      #4

      i have exactly the same problem when i try to use a console aplic

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alex42
        wrote on last edited by
        #5

        I have exactly the same problem when I try to use a console application, with another code approach ,
        here's my .main file

        class Application
        {
        public :
            Application();
            ~Application();
        
            void Start();
            void Run();
            void Exit();
        
        public :
            Ogre::Root* pRoot;
            Ogre::SceneManager* pSceneManager;
            Ogre::RenderWindow* pRenderWindow;
            Ogre::Viewport* pViewport;
            Ogre::Camera* pCamera;
        };
        
        Application::Application()
        {
            pRoot = 0;
            pSceneManager = 0;
            pRenderWindow = 0;
            pViewport = 0;
            pCamera = 0;
        }
        
        Application::~Application()
        {
            Exit();
        }
        
        void Application::Run()
        {
            pRoot->startRendering();
        }
        
        void Application::Start()
        {
              qInfo() << "tested";
            pRoot = new Ogre::Root();
          qInfo() << "tested";
            pRenderWindow = pRoot->initialise(true,"Ma premiere application Ogre");
        
            pSceneManager = pRoot->createSceneManager("MonGestionnaireDeScene");
        
            pCamera = pSceneManager->createCamera("MaCamera");
        
            pViewport = pRenderWindow->addViewport(pCamera);
        
        }
        
        void Application::Exit()
        {
            if (pRoot!=0) delete pRoot;
        }
        #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
        #define WIN32_LEAN_AND_MEAN
        #include "windows.h"
        
        INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
        #else
        int main(int argc, char **argv)
        #endif
        {
            try {
        
             Application MonApplication ;
                 MonApplication.Start ();
                 MonApplication.Run() ;
             qInfo() << "tested";
                 MonApplication.Exit();
        
            } catch( Ogre::Exception &e ) {
        #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
                //MessageBox( NULL, e.what(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
                qInfo() << "fucking";
        #else
                fprintf(stderr, "An exception has occurred: %s\n",
                        e.what());
        #endif
            }
        
            return 0;
        }
        
        1 Reply Last reply
        0
        • A Alex42

          hi , and thank you for your answer,
          i run in debugger , and crashed here Capture2.PNG
          when i create an instance of this class

           QOgreBasicTest *testOgre = new QOgreBasicTest();
          
          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #6

          @Alex42 said in Debug Error , QT 6_2_1 MSVC20119 when i try to use OGR 3D in Qt:

          i run in debugger , and crashed here

          What I see in your screenshot is the debugger stopped at a breakpoint on the start of on_pushButton_clicked(), not "crashed" in the screenshot like you claim?

          when i create an instance of this class

          QOgreBasicTest *testOgre = new QOgreBasicTest();

          If it crashes while executing that line then let it do so and show the stack trace after the crash has happened?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Alex42
            wrote on last edited by
            #7

            @JonB said in Debug Error , QT 6_2_1 MSVC20119 when i try to use OGR 3D in Qt:

            What I see in your screenshot is the debugger stopped at a breakpoint on the start of on_pushButton_clicked(), not "crashed" in the screenshot like you claim?
            hi @JonB thank you for your answer
            here the screenshot when i try to unfold the debug withe another exception
            Capture3.PNG

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Alex42
              wrote on last edited by
              #8

              @JonB said in Debug Error , QT 6_2_1 MSVC20119 when i try to use OGR 3D in Qt:

              If it crashes while executing that line then let it do so and show the stack trace after the crash has happened?
              for more details
              Capture4.PNG

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Alex42
                wrote on last edited by
                #9

                (other program )when i run in only main cpp , i have the same problem
                Capture5.PNG

                 Application MonApplication ;
                         MonApplication.Start ();
                         MonApplication.Run() ;
                
                jsulmJ 1 Reply Last reply
                0
                • A Alex42

                  (other program )when i run in only main cpp , i have the same problem
                  Capture5.PNG

                   Application MonApplication ;
                           MonApplication.Start ();
                           MonApplication.Run() ;
                  
                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @Alex42 It crashes inside Ogre::Root(), so step into it and see what happens.

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

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    Alex42
                    wrote on last edited by
                    #11

                    @jsulm said in Debug Error , QT 6_2_1 MSVC20119 when i try to use OGR 3D in Qt:

                    step into it

                    i don' know why i can't setup into it , i obtain this error every time i try to setup into it
                    Capture5.PNG

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      Alex42
                      wrote on last edited by
                      #12

                      i see many project use ogr in Qt , but under cMake not under qmake , for this i think the probleme is qmake

                      1 Reply Last reply
                      0
                      • Christian EhrlicherC Offline
                        Christian EhrlicherC Offline
                        Christian Ehrlicher
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        You're mixing debug and release dlls which is not allowed under windows. Compile ogre in debug mode and use these libraries. You must not mix VCRUNTIMExxx.dll and VCRUNTIMExxxD.dll

                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                        Visit the Qt Academy at https://academy.qt.io/catalog

                        1 Reply Last reply
                        2

                        • Login

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