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. I always get the error code 255 but why?!
Forum Update on Monday, May 27th 2025

I always get the error code 255 but why?!

Scheduled Pinned Locked Moved General and Desktop
10 Posts 6 Posters 34.0k 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.
  • M Offline
    M Offline
    marachli
    wrote on last edited by
    #1

    What are the reasons that cause breaking your program during the compiling then it exit with code 255 ?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      marachli
      wrote on last edited by
      #2

      another time (I changed nothing) and the program exited with the code -1073741819 .
      Has this a realtionship with the memory ?

      A 1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        You really, really have to provide more information than this. Did you try a debugger to see what goes wrong where?

        1 Reply Last reply
        0
        • M marachli

          another time (I changed nothing) and the program exited with the code -1073741819 .
          Has this a realtionship with the memory ?

          A Offline
          A Offline
          asdisprjonar
          wrote on last edited by
          #4

          @marachli
          I'm having the same problem! Well in reverse order (first I got error -1073741819 and then after minor changes error 255), were you able to fix it?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Gus78
            wrote on last edited by
            #5

            After an upgrade to Qt_5_4_2_MinGW_32bit, (Qt5.5), on a updated win8 computer, I consistently get the error exited with code 255.

            I tried a clean qt widget application from the template with no changes at all:

            mainwindow.cpp:
            #include "mainwindow.h"
            #include "ui_mainwindow.h"

            MainWindow::MainWindow(QWidget *parent) :
            QMainWindow(parent),
            ui(new Ui::MainWindow)
            {
            ui->setupUi(this);
            }

            MainWindow::~MainWindow()
            {
            delete ui;
            }

            mainWindow.h:
            #ifndef MAINWINDOW_H
            #define MAINWINDOW_H

            #include <QMainWindow>

            namespace Ui {
            class MainWindow;
            }

            class MainWindow : public QMainWindow
            {
            Q_OBJECT

            public:
            explicit MainWindow(QWidget *parent = 0);
            ~MainWindow();

            private:
            Ui::MainWindow *ui;
            };

            #endif // MAINWINDOW_H

            main.cpp:
            #include "mainwindow.h"
            #include <QApplication>

            int main(int argc, char *argv[])
            {
            QApplication a(argc, argv);
            MainWindow w;
            w.show();

            return a.exec();
            

            }

            pro file:
            QT += core gui

            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

            TARGET = untitled2
            TEMPLATE = app

            SOURCES += main.cpp
            mainwindow.cpp

            HEADERS += mainwindow.h

            FORMS += mainwindow.ui

            Result:
            Starting C:\Users\Gustaf\build-untitled2-Desktop_Qt_5_4_2_MinGW_32bit2-Debug\debug\untitled2.exe...
            C:\Users\Gustaf\build-untitled2-Desktop_Qt_5_4_2_MinGW_32bit2-Debug\debug\untitled2.exe exited with code 255

            Thanks in advance,

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi and welcome
              make sure to try disable virus scanner and test. I had issues with Avast.
              Do the program run and when you exit it gives code?
              Or don't it run at all?

              P 1 Reply Last reply
              0
              • mrjjM mrjj

                Hi and welcome
                make sure to try disable virus scanner and test. I had issues with Avast.
                Do the program run and when you exit it gives code?
                Or don't it run at all?

                P Offline
                P Offline
                Pogi
                wrote on last edited by
                #7

                @mrjj

                i also get the problem, the program doesnt run at all, and when i tried to use the debugger of qt creator a window keep popping up that says
                An exception was triggered:
                Exception at 0x7718d4f2, code: 0x0000135: DLL not found, flags=0x0
                During startup program exited with code 0x0000135

                mrjjM 1 Reply Last reply
                0
                • P Pogi

                  @mrjj

                  i also get the problem, the program doesnt run at all, and when i tried to use the debugger of qt creator a window keep popping up that says
                  An exception was triggered:
                  Exception at 0x7718d4f2, code: 0x0000135: DLL not found, flags=0x0
                  During startup program exited with code 0x0000135

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Pogi said:

                  DLL not found,

                  you code try to load some DLL that is not around.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    Gus78
                    wrote on last edited by
                    #9

                    For me, the issue was that the app couldn't access the DLL (that existed). I rebuilt Qt statically and that solved the issue.

                    Maybe a dirty solution, but now I can compile and run the app.

                    mrjjM 1 Reply Last reply
                    1
                    • G Gus78

                      For me, the issue was that the app couldn't access the DLL (that existed). I rebuilt Qt statically and that solved the issue.

                      Maybe a dirty solution, but now I can compile and run the app.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Gus78
                      Hi
                      well static linking is not dirty in any ways :)
                      However the Qt licencing requires statically linked programs to be open source
                      or buy a licence for Qt so often its not a solution for most.
                      But building it static will make it shut up about any DLLS :)

                      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