an invisible exception in

I am using the Tadvsmartmessage and sometimes I get random exception reports from TeurekaLog without any visible error in the application for user. I believe it happens with mouse use with other Windows' apps and windows.
Access violation at address 01CC288E in module 'app.exe'. Read of address DEADBFC7.
It happens in line 1887 of AdvSmartMessageBox and the assebly report is the following:

; Base Address: $1CC2000, Allocation Base: $400000, Region Size: 20160512
; AdvSmartMessageBox.TAdvSmartMessageForm.Animate (Line=1882 - Offset=476)
; ------------------------------------------------------------------------
01CC2858  8BD3          MOV  EDX, EBX
01CC285A  8B45FC        MOV  EAX, [EBP-4]
01CC285D  E83251A7FE    CALL -$0158AECE                 ; ($00737994) Vcl.TControl.SetHeight
; Line=1883 - Offset=486
; ----------------------
01CC2862  E815D4FFFF    CALL -$2BEB                     ; ($01CBFC7C) AdvSmartMessageBox.IsVista
01CC2867  84C0          TEST AL, AL
01CC2869  740B          JZ   +$0B                       ; ($01CC2876) AdvSmartMessageBox.TAdvSmartMessageForm.Animate (Line=1885)
; Line=1884 - Offset=495
; ----------------------
01CC286B  8B45FC        MOV  EAX, [EBP-4]
01CC286E  8B10          MOV  EDX, [EAX]
01CC2870  FF92CC000000  CALL DWORD PTR [EDX+$000000CC]
; Line=1885 - Offset=506
; ----------------------
01CC2876  A1F0191103    MOV  EAX, [$031119F0]           ; Delphi Object "TApplication"
01CC287B  8B00          MOV  EAX, [EAX]
01CC287D  E8A2BABAFE    CALL -$0145455E                 ; ($0086E324) Vcl.TApplication.ProcessMessages
; Line=1886 - Offset=518
; ----------------------
01CC2882  6A14          PUSH $14
01CC2884  E807937FFE    CALL -$01806CF9                 ; ($004BBB90->75B63CA0) KERNELBASE.Sleep
; Line=1887 - Offset=525
; ----------------------
01CC2889  8B45FC        MOV  EAX, [EBP-4]
01CC288C  8B10          MOV  EDX, [EAX]
; Line=1887 - Offset=530
; ----------------------
01CC288E  FF92D8000000  CALL DWORD PTR [EDX+$000000D8]  ; <-- EXCEPTION
; Line=1888 - Offset=536
; ----------------------
01CC2894  83C305        ADD  EBX, 5
01CC2897  7105          JNO  +5                         ; ($01CC289E) AdvSmartMessageBox.TAdvSmartMessageForm.Animate (Line=1880)
01CC2899  E8428174FE    CALL -$018B7EBE                 ; ($0040A9E0->0065E4D0) EInject._IntOverHook
; Line=1880 - Offset=546
; ----------------------
01CC289E  B805000000    MOV  EAX, 5
01CC28A3  03C6          ADD  EAX, ESI
01CC28A5  7105          JNO  +5                         ; ($01CC28AC) AdvSmartMessageBox.TAdvSmartMessageForm.Animate (Line=1880)
01CC28A7  E8348174FE    CALL -$018B7ECC                 ; ($0040A9E0->0065E4D0) EInject._IntOverHook
01CC28AC  3BD8          CMP  EBX, EAX
01CC28AE  7EA8          JLE  -$58                       ; ($01CC2858) AdvSmartMessageBox.TAdvSmartMessageForm.Animate (Line=1882)

I checked this here with the TAdvSmartMessageBox demo with Eurekalog enabled but could so far not see an issue.
Can you reproduce this with our demo and if so, what steps to follow?

Most of the time it does not happen. It happens if Windows GUI is seems a bit less responsive while working outside of the application to open an other program or doing something with the windows taskbar.
It seems that when arriving to 'Update' the existing object does not exist anymore.
It happens to both windows 10 & windows 7. The slowest the computer, the most it happens.

The same problem as reported by Fastmm5 when testing in debug mode. After checking code in a breakpoint, I pressed F9 to continue and got this. Probably the time to be disappeared was passed while investigating the code inside IDE.

From Demo project: (603.5 KB)

Put a breakpoint in line 314 in the for-do loop and run it from IDE in debug mode.
Click 4-5 times the button to show the message 4-5 times and before being stopped by the breakpoint
wait 10 seconds. Hit F9 in the IDE to continue.
Exception is shown every time

@brunofierens was it possible to reproduce it with the above demo project?

I'm sorry but these instructions are not clear.

  1. Line 314 in your unit has no code
  2. The for loop around line 314 is called when a key is pressed, you instruct to click the button to show the messages. So, a key needs to be pressed in the memo after clicking the button 4-5 times? Even trying that, I cannot see an exception here.

I apologize, the line is 341.
I just click 4-5 times the button "Show selected text" before breakpoint stops execution
You can see it in the following video (1.5 MB)

@brunofierens was the video helpful on how to reproduce it?
Thank you in advance

We could reproduce this and implemented a fix that will be included in the next release.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.