A
A
amberav2014-08-26 08:49:21
Qt
amberav, 2014-08-26 08:49:21

How to catch an error in a QT application?

Wrote an application in QT that reads and writes to the COM port. Put all the necessary libraries. The application starts, but when the read function is started (SetTimer is started, calling my read function) from the COM port, it crashes without any messages. It just appears "windows is looking for an error ..." Functions for sending messages (via writefile) to the port work correctly.
But the point is apparently not in the work with the port itself. Everything works on 2 computers (windows 7 and 8) with QT installed. When launched on computers without QT, the program crashes.
The question is how to catch this error. Get some kind of meaningful message in order to understand what the program stumbles on.
Or maybe someone knows what QT loads during installation, which may be missing.
Made the output of the received data to a file. Judging by the output, the read function works correctly once, the write of the received one also works. After the output of my code is no more. The program should wait for the next timer read call, but it crashes.

WER Report

Sig[3].Name=Имя модуля с ошибкой
Sig[3].Value=USER32.dll
Sig[4].Name=Версия модуля с ошибкой
Sig[4].Value=6.3.9600.17031
Sig[5].Name=Отметка времени модуля с ошибкой
Sig[5].Value=53086d13
Sig[6].Name=Смещение исключения
Sig[6].Value=00035eed
Sig[7].Name=Код исключения
Sig[7].Value=c0000409
Sig[8].Name=Данные исключения
Sig[8].Value=00000001

I doubt that the error is in user32. The file versions are the same on working computers and on those where it crashes. I remember another moment. When debugging, it was not possible to view more than one read call, after it a SegFault got out. But with "Start without debugging" everything worked, so I scored. Maybe this is related.
Data Execution Prevention has already been disabled for the executable.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene, 2014-08-26
@EvgenijDv

When debugging, it was not possible to view more than one read call, after it a SegFault got out. But with "Start without debugging" everything worked, so I scored.

facepalm.png

G
GavriKos, 2014-08-26
@GavriKos

Well, deal with SegFault. The only thing to say. Actually, it comes out without debugging, only in the form of a fall.

E
EXL, 2014-08-26
@EXL

Everything works on 2 computers (windows 7 and 8) with QT installed. When launched on computers without QT, the program crashes.

Read documentation. You are deploying your application incorrectly in Windows environments:
How to deploy a Qt application on windows?
https://qt-project.org/doc/qt-5/windows-deployment...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question