Hi!
MQTT gives me errors upon closing the application. Not always, but lets say every 4-th closing.
The executed code is this
procedure TfrmMain.Closeform(Sender: TComponent);
begin
...
Logger.Log(llInfo, 'Shuttng down MQTT client...');
while mqttEasyClient.IsConnected do begin
Application.ProcessMessages;
end;
Ptr(false);
Logger.Log(llInfo, 'MQTT client closed');
...
end;
The waiting loop if my try to solve the exception
MadExcept stack, if helps
> date/time : 2020-11-25, 14:02:06, 317ms
> computer name :
> wts client name :
> user name :
> registered owner :
> operating system : Windows 10 x64 build 17763
> system language : Slovenian
> system up time :
> program up time :
> processors : 8x Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
> physical memory : 10440/16376 MB (free/total)
> free disk space : (C:) 2,53 GB
> display mode : 3440x1440, 32 bit
> process id : $4e8
> allocated memory : 124,41 MB
> largest free block : 847,60 MB
> command line : "Easy.exe"
> executable : Easy.exe
> exec. date/time : 2020-11-25 12:30
> version : 2020.11.25.4
> compiled with : Delphi 10.3 Rio
> madExcept version : 5.1.0
> callstack crc : $00000000, $00000000, $1fdf6966
> exception number : 1
> exception class : EInvalidPointer
> exception message : Invalid pointer operation.
>
> thread $354:
> >> stack not accessible, exception location:
> 0040a2dd +11 Easy.exe System 4773 +0 TObject.FreeInstance
>
> thread $21c0 (TTMSMQTTKeepAliveThread):
> 778939d5 +45 KERNELBASE.dll SleepEx
> 7789397a +0a KERNELBASE.dll Sleep
> 0055a215 +01 Easy.exe System.Classes TThread.Sleep
> 0156753d +29 Easy.exe TMS.MQTT.Client.Threading 636 +11 TTMSMQTTWorkerThread.Execute
> 004bb8bf +2b Easy.exe madExcept HookedTThreadExecute
> 00559489 +49 Easy.exe System.Classes ThreadProc
> 0040c220 +28 Easy.exe System 4773 +0 ThreadWrapper
> 004bb7a5 +0d Easy.exe madExcept CallThreadProcSafe
> 004bb80a +32 Easy.exe madExcept ThreadExceptFrame
> 76750417 +17 KERNEL32.DLL BaseThreadInitThunk
> >> created by thread $354 at:
> 0055954c +18 Easy.exe System.Classes TThread.Create
>
> thread $c3c (TTMSMQTTWriterThread):
> 778939d5 +45 KERNELBASE.dll SleepEx
> 7789397a +0a KERNELBASE.dll Sleep
> 0055a215 +01 Easy.exe System.Classes TThread.Sleep
> 0156753d +29 Easy.exe TMS.MQTT.Client.Threading 636 +11 TTMSMQTTWorkerThread.Execute
> 004bb8bf +2b Easy.exe madExcept HookedTThreadExecute
> 00559489 +49 Easy.exe System.Classes ThreadProc
> 0040c220 +28 Easy.exe System 4773 +0 ThreadWrapper
> 004bb7a5 +0d Easy.exe madExcept CallThreadProcSafe
> 004bb80a +32 Easy.exe madExcept ThreadExceptFrame
> 76750417 +17 KERNEL32.DLL BaseThreadInitThunk
> >> created by thread $354 at:
> 0055954c +18 Easy.exe System.Classes TThread.Create
>
> thread $1374 (TTMSMQTTReaderThread):
> 778939d5 +45 KERNELBASE.dll SleepEx
> 7789397a +0a KERNELBASE.dll Sleep
> 0055a215 +01 Easy.exe System.Classes TThread.Sleep
> 0156753d +29 Easy.exe TMS.MQTT.Client.Threading 636 +11 TTMSMQTTWorkerThread.Execute
> 004bb8bf +2b Easy.exe madExcept HookedTThreadExecute
> 00559489 +49 Easy.exe System.Classes ThreadProc
> 0040c220 +28 Easy.exe System 4773 +0 ThreadWrapper
> 004bb7a5 +0d Easy.exe madExcept CallThreadProcSafe
> 004bb80a +32 Easy.exe madExcept ThreadExceptFrame
> 76750417 +17 KERNEL32.DLL BaseThreadInitThunk
> >> created by thread $354 at:
> 0055954c +18 Easy.exe System.Classes TThread.Create
>
> thread $2698:
> 76750417 +17 KERNEL32.DLL BaseThreadInitThunk
>
> thread $323c:
> 76750417 +17 KERNEL32.DLL BaseThreadInitThunk
>
> thread $1c5c:
> 76750417 +17 KERNEL32.DLL BaseThreadInitThunk
>
> stack dump:
> >> internal error in GetStackDump:
> 004b5fd0 +114 Easy.exe madExcept +0 GetStackDump
Im'm stuck any suggestion would be appreciated