Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt5.7 msvc2015 debugger don't work
Forum Update on Monday, May 27th 2025

Qt5.7 msvc2015 debugger don't work

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qt5.7debug errormsvc2015
17 Posts 3 Posters 6.8k 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 30 Jun 2016, 22:14 last edited by
    #2

    Hi,

    Do you have any external dependency in your application ?

    Did you install the latest updates of Visual Studio ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • K Offline
      K Offline
      km2442
      wrote on 30 Jun 2016, 22:27 last edited by
      #3

      Hi, I have checked and tried to debug another project, and suprisely I can debug another apps.
      In my application I don't use anything special.
      Please help me with this stupid issue :(

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 30 Jun 2016, 22:41 last edited by
        #4

        It can debug other Qt app ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sneubert
          wrote on 1 Jul 2016, 07:46 last edited by
          #5

          Hi km2442,

          if you can debug other applications, the error The program has unexpectedly finished
          my be caused by your application. This could be anything, from access to nullpointer over stack corruption to uncaught exceptions. Try to set a breakpoint as early as possible and narrow the error.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            km2442
            wrote on 1 Jul 2016, 09:55 last edited by km2442 7 Jan 2016, 10:03
            #6

            @SGaist Yes, I can debug any other app.
            @sneubert Hi, I have setted brakpoint at 1st line of my app main.cpp before int main(). It is

            #include "mainwindow.h"
            

            And still the same error: The program has unexpectedly finished

            Edit: no matter where I place breakpoint, evrywhere the same effect

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sneubert
              wrote on 1 Jul 2016, 10:57 last edited by
              #7

              Are there any global objects, where the constructor get´s called?

              1 Reply Last reply
              0
              • K Offline
                K Offline
                km2442
                wrote on 1 Jul 2016, 12:20 last edited by
                #8

                Do you mean 'extern' objects? If yes, My program contains some extern functions, and extern variables, but no classes.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sneubert
                  wrote on 4 Jul 2016, 07:30 last edited by
                  #9

                  Ok, this is getting difficult. Maybe you can share some code.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    km2442
                    wrote on 6 Jul 2016, 17:26 last edited by km2442 7 Jun 2016, 17:31
                    #10

                    As you asked, I'm sending my includes and fragment of main
                    My includes:
                    This file (funkcje.h) contains most of includes.

                    #include <string>
                    #include <sstream>
                    #include <windows.h>
                    #include <time.h>
                    #include <thread>
                    #include <shlobj.h>
                    #include <winnls.h>
                    #include <shobjidl.h>
                    #include <objbase.h>
                    #include <objidl.h>
                    #include <shlguid.h>
                    #include <atlbase.h>
                    
                    #include <QFileDialog>
                    #include <QFile>
                    #include <QStyleFactory>
                    #include <QTimer>
                    #include <QDebug>
                    #include <QCloseEvent>
                    #include <QDesktopServices>
                    #include <QMenu>
                    #include <QTableWidgetItem>
                    #include <QSystemTrayIcon>
                    #include <QSettings>
                    #include <QTranslator>
                    #include <QProcess>
                    #include <QFileDialog>
                    #include <QInputDialog>
                    #include <QCryptographicHash>
                    

                    And fragment of main.cpp (I don't know if something could be wrong here, I'm sending at least 30% of all coe from this file):

                    #include "mainwindow.h"
                    #include "funkcje.h"
                    
                    int main(int argc, char *argv[])
                    {
                        if (argc == 2)
                    	{
                    		(...)
                        }
                    }
                    
                    	QtSingleApplication a(argc, argv);
                    
                    (...)
                    
                        QSettings myapp(QSettings::IniFormat, QSettings::UserScope, "AutoSwitch", "application");
                        appData = QFileInfo(myapp.fileName()).absolutePath();
                        QSettings setting(appData + "/config/settings.ini", QSettings::IniFormat);
                    
                    
                    (...)
                    
                        QTranslator tra;
                        if (setting.value("/Language").toInt() == 2)
                        {
                            if (tra.load(":/translations/Resources/Languages/English.qm"))
                            {
                                a.installTranslator(&tra);
                            }
                        }
                    
                    (...)
                    
                    	MainWindow w;
                    	a.setActivationWindow(&w);
                        w.setWindowFlags(Qt::MSWindowsFixedSizeDialogHint);
                    	QObject::connect(&a, SIGNAL(messageReceived(QString))
                    	, &w, SLOT(onMessageReceived(QString)));
                    
                    	if (hide == true && argc > 2) w.hide();
                    	else w.show();
                    
                    	int ret = a.exec();
                    	QObject::disconnect(&a, 0, &w, 0);
                    	return ret;
                    }
                    
                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 6 Jul 2016, 19:58 last edited by
                      #11

                      Nothing obvious from the code you shared.

                      However, your settings handling is going to bite you when you release your application. Don't write data in the same folder as your application. If you install your application on Windows, your users won't have the rights to do so and even if they would, multiple users would access the same settings triggering security and privacy hazards. Use QStandardPaths to get a suitable path to store these files or simply let Qt handle it for you.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • S Offline
                        S Offline
                        sneubert
                        wrote on 7 Jul 2016, 08:06 last edited by
                        #12

                        As in funkcje.h there are only system/framework headers and the application crash is before the first line in int main the last chance is your mainwindow.h. Could you post it?

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          km2442
                          wrote on 7 Jul 2016, 09:19 last edited by km2442 7 Jul 2016, 09:20
                          #13

                          One more thing: My application is using one external library: Qtsingleapplication It is wrote for Qt4, so maybe there is a problem...?

                          @SGaist I store settings of my application in every user appdata folder, so settings are safe and separated :) One simple question about that, where should I store global settings of my app (where every user can access easly without administrator permissions)?

                          @sneubert Ok, I can share most of my mainwindow.h
                          One more info: I have placed breakpoint at first line of mainwindow.h before any code and again debugger crashed.

                          #ifndef MAINWINDOW_H
                          #define MAINWINDOW_H
                          
                          #include <QMainWindow>
                          #include "funkcje.h"
                          
                          namespace Ui {
                          class MainWindow;
                          }
                          
                          class MainWindow : public QMainWindow
                          {
                              Q_OBJECT
                          
                          public:
                              explicit MainWindow(QWidget *parent = 0);
                              QSystemTrayIcon *trayIcon;
                              void tray();
                              void showMainWindow();
                              ~MainWindow();
                          
                          private slots:
                          
                          **I have deleted simple functions() without arguments**
                          
                              void onMessageReceived(const QString &message);
                          
                              void on_ActiveTasks_Tab_cellClicked(int row, int column);
                          
                              void iconActivated(QSystemTrayIcon::ActivationReason reason);
                          
                              void on_tabWidget_currentChanged(int index);
                          
                          private:
                              Ui::MainWindow *ui;
                              void MainWindow::closeEvent(QCloseEvent * event);
                              void MainWindow::urywanie(bool u);
                              void timeUpd();
                              bool TaskState();
                          
                              Settings *settings;
                              QMessageBox message;
                          
                              QMenu *trayIconMenu;
                          
                              QAction *exampleQAction_Tray;
                          
                              QMenu *exampleQmenu_Tray;
                          
                          };
                          
                          #endif // MAINWINDOW_H
                          
                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 7 Jul 2016, 11:34 last edited by
                            #14

                            You should rather use the official QtSolution repo github is merely a mirror.

                            What do you mean by global settings ? Also what OS are you running ?

                            Are you sure that you have everything initialized before using anything ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            1
                            • K Offline
                              K Offline
                              km2442
                              wrote on 7 Jul 2016, 13:13 last edited by
                              #15

                              I have newest Windows 10 x64.
                              I need global settings for eg. when admin sets some tasks and turn on autorun on every account, so my app can run even without current user settings. But now I use stupid localisation of global settings files (C://myapp)

                              Release version of my app works very well, so I believe that I initialised everything good.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 7 Jul 2016, 20:41 last edited by
                                #16

                                AFAIK, that's rather the task of the registry.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • K Offline
                                  K Offline
                                  km2442
                                  wrote on 7 Jul 2016, 22:11 last edited by
                                  #17

                                  I didn't think about registry, thank you :)
                                  BTW, what about debugger?

                                  1 Reply Last reply
                                  0

                                  11/17

                                  6 Jul 2016, 19:58

                                  • Login

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