QTimer doesn't work the expected way
-
Run your program with a debugger, stop the debugger when your program stops and take a look at the backtrace where it comes from.
-
Run your program with a debugger, stop the debugger when your program stops and take a look at the backtrace where it comes from.
@Christian-Ehrlicher said in QTimer doesn't work the expected way:
Run your program with a debugger, stop the debugger when your program stops and take a look at the backtrace where it comes from.
I am currently running the program with QTCreator in debug mode. May I ask how to stop the debugger?
-
Run your program with a debugger, stop the debugger when your program stops and take a look at the backtrace where it comes from.
@Christian-Ehrlicher said in QTimer doesn't work the expected way:
Run your program with a debugger, stop the debugger when your program stops and take a look at the backtrace where it comes from.
Hi I have set the single shot duration to 10 secs and rerun the program. It pauses for 2 secs and the text disappeared at 10 sec.
Does this mean there is a long latency when writing INI? I need to write 40 items to the INI file. -
@Christian-Ehrlicher said in QTimer doesn't work the expected way:
Run your program with a debugger, stop the debugger when your program stops and take a look at the backtrace where it comes from.
I am currently running the program with QTCreator in debug mode. May I ask how to stop the debugger?
@MasterBlade said in QTimer doesn't work the expected way:
May I ask how to stop the debugger?
Simply press the same button you used to start debugging...
-
@MasterBlade said in QTimer doesn't work the expected way:
May I ask how to stop the debugger?
Simply press the same button you used to start debugging...
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade said in QTimer doesn't work the expected way:
May I ask how to stop the debugger?
Simply press the same button you used to start debugging...
I paused the debugger, but didn't find many differences. Application output only has a single line. Where else should I check?
15:16:35: Debugging starts
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade said in QTimer doesn't work the expected way:
May I ask how to stop the debugger?
Simply press the same button you used to start debugging...
I paused the debugger, but didn't find many differences. Application output only has a single line. Where else should I check?
15:16:35: Debugging starts
@MasterBlade said in QTimer doesn't work the expected way:
Where else should I check?
In the debugger. In debugger view there is "Debugger" section with the stack trace (select thread #1). You should really get familiar with the debugger.
-
@MasterBlade said in QTimer doesn't work the expected way:
Where else should I check?
In the debugger. In debugger view there is "Debugger" section with the stack trace (select thread #1). You should really get familiar with the debugger.
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade said in QTimer doesn't work the expected way:
Where else should I check?
In the debugger. In debugger view there is "Debugger" section with the stack trace (select thread #1). You should really get familiar with the debugger.
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade said in QTimer doesn't work the expected way:
Where else should I check?
In the debugger. In debugger view there is "Debugger" section with the stack trace (select thread #1). You should really get familiar with the debugger.
@MasterBlade When exactly did you take this screen-shot? When your app was blocked? You also can check other threads.
-
@MasterBlade When exactly did you take this screen-shot? When your app was blocked? You also can check other threads.
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade When exactly did you take this screen-shot? When your app was blocked? You also can check other threads.
Yeah it was taken when the program was blocked.
Thread #1-5 looks the same to me.Thread #6 and #7
#8 and #9 are same as #1-5
#10-13
#14
#15
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade When exactly did you take this screen-shot? When your app was blocked? You also can check other threads.
Yeah it was taken when the program was blocked.
Thread #1-5 looks the same to me.Thread #6 and #7
#8 and #9 are same as #1-5
#10-13
#14
#15
@MasterBlade Do you actually use threads in your app?
-
@MasterBlade Do you actually use threads in your app?
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade Do you actually use threads in your app?
I don't think I did. I don't know why there are so many threads.
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade Do you actually use threads in your app?
I don't think I did. I don't know why there are so many threads.
@MasterBlade That's normal. I just wanted to know whether you create threads also by yourself. From the stack trace I can't see anything helpful.
-
@MasterBlade That's normal. I just wanted to know whether you create threads also by yourself. From the stack trace I can't see anything helpful.
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade That's normal. I just wanted to know whether you create threads also by yourself. From the stack trace I can't see anything helpful.
There is one problem I found curious. I am also using QSettings to write INI files, and I found it quite slow. Usually takes like 2 secs to write. I didn't use QTimer in that code. So I guess if it's QSettings that caused the block.
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade That's normal. I just wanted to know whether you create threads also by yourself. From the stack trace I can't see anything helpful.
There is one problem I found curious. I am also using QSettings to write INI files, and I found it quite slow. Usually takes like 2 secs to write. I didn't use QTimer in that code. So I guess if it's QSettings that caused the block.
@MasterBlade Where are the settings stored? Is it network drive, local drive, Windows registry?
-
@MasterBlade Where are the settings stored? Is it network drive, local drive, Windows registry?
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade Where are the settings stored? Is it network drive, local drive, Windows registry?
local hard disk in INI format
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade Where are the settings stored? Is it network drive, local drive, Windows registry?
local hard disk in INI format
@MasterBlade It is really strange if it takes so long.
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade Where are the settings stored? Is it network drive, local drive, Windows registry?
local hard disk in INI format
@MasterBlade QSettings is usually super quick,
how big is the resulting ini file ending up ?
Mb's ? -
@MasterBlade It is really strange if it takes so long.
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade It is really strange if it takes so long.
Well actually I was storing it in OneDrive folder. Will that take longer?
-
@MasterBlade QSettings is usually super quick,
how big is the resulting ini file ending up ?
Mb's ?@J-Hilk said in QTimer doesn't work the expected way:
@MasterBlade QSettings is usually super quick,
how big is the resulting ini file ending up ?
Mb's ?Only 94 KiB
-
@jsulm said in QTimer doesn't work the expected way:
@MasterBlade It is really strange if it takes so long.
Well actually I was storing it in OneDrive folder. Will that take longer?
@MasterBlade said in QTimer doesn't work the expected way:
Well actually I was storing it in OneDrive folder. Will that take longer?
It can. Try to store it locally and see whether this makes a difference...