Qt application work on Ubuntu 20.04, but doesn't work on Windows 10
-
Hello everyone!
I'm new in Qt development.
I have had the problem that I can't solve on my own.
I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW. -
Hello everyone!
I'm new in Qt development.
I have had the problem that I can't solve on my own.
I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW.@Jan_29
It is going to be very hard for anybody to say anything useful with no code and no idea what you do. Are you able to produce some minimal example illustrating the behaviour (not just the whole of your code as-is, unlikely anyone is going to look through come whole project). -
Hi,
I can say that I had similar issue in past. My app was working well in linux, but it was freezing, crashing in windows 10. Afterwards I noticed that I wrongly used one function from qt serial port library. In my case, my app was using QSerialPort::waitForBytesWritten function after write() function call.Somehow this wrong usage of this function didn't cause any issue in linux side, but it complained in Windows. I hope, my experience can be helpful for you. Also, I will suggest you using Debugging, it can give you some helpful informations.
-
Hello everyone!
I'm new in Qt development.
I have had the problem that I can't solve on my own.
I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW.@Jan_29 said in Qt application work on Ubuntu 20.04, but doesn't work on Windows 10:
but later application is freezed and memory usage is increased 1-2 gigabytes every second
Sounds like a memory leak. As mentioned already: show your code. You can also use tools to search for memory leaks in your app.
-
Hello everyone!
I'm new in Qt development.
I have had the problem that I can't solve on my own.
I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW.Thank you all for your activity!
I found out why my app freezes from time to time.Reading from the serial buffer has an unlimited size. When I parse messages, an error occurs in the business logic and an infinite loop appears (because there is a bad conditional for while loop) in read signal from Serial. That's why my memory in the application was increasing. I don't know why this error not occurred on Ubuntu, but I've started to fix this problem.