Page 1 of 1

FIXED: crash with macros, V15.01

Posted: 23 Jul 2021 18:23
by DerellLicht1
I've just started using RJTextEd 15.01, on Windows 10 Build 19042.1083
I opened an existing .cpp file; I changed options to allow text past end of line...
I then created a macro to insert line comments at cursor location. Macro contains:

Code: Select all

slash slash space back_arrow back_arrow back_arrow down_arrow
This macro crashed when I first used it; crash report was sent via program dialog.
I then closed/re-opened the editor, and used the macro again... it ran successfully, three times, and then I tried to un-do the macro operation, and it crashed again; I again sent in the crash report, but will include it here as well...

Is there a way to resolve this?? If not, I would obviously like a bug-fix for this...
This line-comment macro is the most common macro that I use in coding...

Code: Select all

Exception
-----------------------------------------------------------------------------------------------------
EAccessViolation
Access violation at address 0000000002D77B35 in module 'rtl270.bpl'. Read of address FFFFFFFFFFFFFFFF


System
----------------------------------------------------------
Date/Time          : 07/23/21 10:07:51
Registered Owner   : dan7miller@comcast.net
Windows            : Microsoft Windows 10 Professional
Type               : WorkStation
Build              : 19042
System Up Time     : 6 days 18 hours 56 minutes 43 seconds
System Language    : English (United States)


Application
------------------------------------------------
Program Name       : C:\RJTextEd\texted.exe
Program Version    : Version 15.01 (64-bit)
Program Up Time    : 2 minutes, 608 milliseconds


Application options
------------------------------
Delay tab loading      : False
Blank file at startup  : False
Open with wordwrap     : False


Hardware
--------------------------------------------------------------------
CPU                : AMD Ryzen 7 3700X 8-Core Processor             
Physical memory    : 32681.62890625 MB
Available memory   : 22823.9296875 MB
Used memory        : 81608 KB
Current Screen     : 2560x1600, DPI: 96
System Screen      : 2560x1600, DPI: 96


Security
-------------------------------------
Administrator                  : Yes
User                           : Yes
Guest                          : No
Power User                     : No
Account Operator               : No
System Operator                : No
Print Operator                 : No
Backup Operator                : No
Replicator                     : No
RAS Server                     : No
Remote Desktop User            : No
Network Configuration Operator : No
Incoming Forest Trust Builder  : No
Monitoring User                : No
Logging User                   : No
Authorization Access           : No
TS License Server              : No


Contact
-----------------------------------------
Contact name       : Rickard Johansson
Contact email      : support@rj-texted.se


Stack trace
-----------------------------------------------------------------------------------------------------------------
Address          | Module        | Unit and class                   | Method                   | Line   | Offset
-----------------------------------------------------------------------------------------------------------------
0000000002D77B35 | rtl270.bpl    | System.TObject                   | Free                     |        | 
00000000019C3FB8 | texted.exe    | JclDebug                         | JclCreateStackList       |        | 
00000000019C3EC6 | texted.exe    | JclDebug                         | DoExceptionStackTrace    |        | 
00000000019C59E2 | texted.exe    | JclDebug                         | DoExceptNotify           |        | 
00000000019B70E5 | texted.exe    | JclHookExcept.TNotifierItem      | DoNotify                 |        | 
00000000019B732B | texted.exe    | JclHookExcept                    | DoExceptNotify           |        | 
00000000019B74E7 | texted.exe    | JclHookExcept                    | HookedExceptObjProc      |        | 
0000000002D798CE | rtl270.bpl    | System                           | _DelphiExceptionHandler  |        | 
00007FFF04EF217F | ntdll.dll     | System                           | _DelphiExceptionHandler  |        | 
00007FFF04EA1454 | ntdll.dll     | System                           | _DelphiExceptionHandler  |        | 
00007FFF04EF0CAE | ntdll.dll     | System                           | _DelphiExceptionHandler  |        | 
0000000002D77B35 | rtl270.bpl    | System.TObject                   | Free                     |        | 
0000000002DD8266 | rtl270.bpl    | System.Sysutils                  | FreeAndNil               |        | 
0000000000BCD773 | texted.exe    | RJMemoUndo.TUndo                 | Destroy                  | 955    | 2
0000000002D77B38 | rtl270.bpl    | System.TObject                   | Free                     | 955    | 2
0000000003283EB4 | rtl270.bpl    | System.Contnrs.TObjectList       | Notify                   | 955    | 2
0000000002EEF583 | rtl270.bpl    | System.Classes.TList             | SetCount                 | 955    | 2
0000000002EEED92 | rtl270.bpl    | System.Classes.TList             | Clear                    | 955    | 2
0000000000BD66DA | texted.exe    | RJMemoUndo.TRJUndoList           | Clear                    | 3688   | 2
0000000000BD7232 | texted.exe    | RJMemoUndo.TRJUndoList           | Undo                     | 3893   | 52
0000000001D3F648 | texted.exe    | RJMemo.TRJCustomMemo             | Undo                     | 46191  | 2
0000000001BAC32D | texted.exe    | Main.TMainForm                   | EditUndoClick            | 8275   | 9
0000000002F17BF2 | rtl270.bpl    | System.Classes.TBasicAction      | Execute                  | 8275   | 9
0000000000435DCA | texted.exe    | Vcl.ActnList.TCustomAction       | Execute                  | 8275   | 9
0000000002F7D069 | rtl270.bpl    | System.Actions.TContainedAction  | HandleShortCut           | 8275   | 9
0000000000435A80 | texted.exe    | Vcl.ActnList.TCustomActionList   | IsShortCut               | 8275   | 9
0000000000604388 | texted.exe    | Vcl.Forms                        | DispatchShortCut         | 7967   | 8
0000000000604444 | texted.exe    | Vcl.Forms.TCustomForm            | IsShortCut               | 7985   | 3
0000000001BC20A2 | texted.exe    | Main.TMainForm                   | IsShortCut               | 13061  | 2
000000000045CC03 | texted.exe    | Vcl.Controls.TWinControl         | IsMenuKey                | 13061  | 2
000000000045CC6D | texted.exe    | Vcl.Controls.TWinControl         | CNKeyDown                | 13061  | 2
0000000002D78365 | rtl270.bpl    | System.TObject                   | Dispatch                 | 13061  | 2
0000000000451C10 | texted.exe    | Vcl.Controls.TControl            | WndProc                  | 13061  | 2
0000000000458E70 | texted.exe    | Vcl.Controls.TWinControl         | WndProc                  | 13061  | 2
0000000000457FEC | texted.exe    | Vcl.Controls.TWinControl         | MainWndProc              | 13061  | 2
0000000002F19056 | rtl270.bpl    | System.Classes                   | Unknown                  | 13061  | 2
00007FFF03E3E858 | USER32.dll    | System.Classes                   | Unknown                  | 13061  | 2
00007FFF03E3E3DC | USER32.dll    | System.Classes                   | Unknown                  | 13061  | 2
00007FFF03E50BC3 | USER32.dll    | System.Classes                   | Unknown                  | 13061  | 2
00007FFF04EF0C54 | ntdll.dll     | System.Classes                   | Unknown                  | 13061  | 2
00007FFF02C91124 | win32u.dll    | System.Classes                   | Unknown                  | 13061  | 2
00007FFF03E3DF02 | USER32.dll    | System.Classes                   | Unknown                  | 13061  | 2
00007FFF03E3D68A | USER32.dll    | System.Classes                   | Unknown                  | 13061  | 2
000000000060A330 | texted.exe    | Vcl.Forms.TApplication           | IsKeyMsg                 | 10939  | 25
000000000060A6AB | texted.exe    | Vcl.Forms.TApplication           | ProcessMessage           | 11025  | 17
000000000060A748 | texted.exe    | Vcl.Forms.TApplication           | HandleMessage            | 11061  | 1
000000000060AB76 | texted.exe    | Vcl.Forms.TApplication           | Run                      | 11199  | 26
0000000001D87D59 | texted.exe    | TextEd                           | TextEd                   | 398    | 47
00007FFF03917034 | KERNEL32.DLL  | TextEd                           | TextEd                   | 398    | 47
00007FFF04EA2651 | ntdll.dll     | TextEd                           | TextEd                   | 398    | 47


Action trace
-----------------------------------------------
Time     | Action                    | Info
-----------------------------------------------
10:07:46 | WindowActivate()          | 
10:06:25 | WindowDeactivate()        | 
10:06:09 | ActionListExecute()       | UndoAction
10:06:08 | ActionListExecute()       | Act_Macro1620
10:06:07 | ActionListExecute()       | Act_Macro1620
10:06:07 | ActionListExecute()       | Act_Macro1620
10:05:57 | ActionListExecute()       | ScrollPageDownAction
10:05:55 | StartupTimer()            | 
10:05:55 | MainPageChanged           | ElTabEditor
10:05:55 | WindowActivate()          | 
10:05:54 | LoadFile()                | PageControl
10:05:54 | MainPageChanged           | ElTabEditor
10:05:54 | ProcessParam()            | 
10:05:54 | ActiveControl()           | ElMainPageControl (MainForm)
10:05:54 | LoadStoredParamStrings()  | 
10:05:54 | SpellMenuClick()          | 
10:05:54 | FormShow()                | 
10:05:54 | FormCreate()              | 

Re: crash with macros, V15.01

Posted: 23 Jul 2021 18:46
by pjj
Brushing aside the bug (I can't help you with that), what exactly did you try to achieve with this macro? Just insert three chars and move the caret to the next line (can't really see the reason for such a macro, but whatever)? Perhaps a little script could do the same?

Re: crash with macros, V15.01

Posted: 23 Jul 2021 23:03
by DerellLicht1
I use it for commenting out a block of code, which is something that I periodically do in my code...
It is quick and simple to insert, and quick to remove, if column-define is available...

Re: crash with macros, V15.01

Posted: 24 Jul 2021 08:29
by pjj
Why don't you use CommentAction (with custom shortcut key)? It is built-in "action" and it inserts // at the beginning of the line. There is also an icon in the Editor Toolbar, which does the same. You can select multiple line and comment them out in one go.

Simple script (can be assigned a shortcut) if a macro doesn't work right now, and you prefer not to comment out whole lines:

Code: Select all

// insert comment
// turn off screen updating
Document.BeginUpdate();
// turn word-wrap off
if (Document.Wordwrap) {
    Document.Wordwrap = false;
}

var y = Document.CursorY;
Document.InsertText("// ");
Document.CursorX() = 0;
Document.CursorY() = y + 1;

Document.EndUpdate();

Re: crash with macros, V15.01

Posted: 24 Jul 2021 12:02
by Rickard Johansson
I've tried to replicate the issue several time, on different systems, but without luck. I can't reproduce the undo issue either.

Maybe you could send your settings file (<AppData>\Roaming\RJ TextEd\TextEd.ini) and I'll give it another try?

Re: crash with macros, V15.01

Posted: 25 Jul 2021 02:27
by DerellLicht1
ummm... well, this is interesting... apparently I cannot attach either .ini files, nor .ini.txt files, in a message here... so I will just paste the file in; I hope it's not too long!!!
Nope, I cannot do that either...

Okay, let's try it this way:
https://www.derelllicht.com/files/TextEd.ini

heh... I think that works!!!

Re: crash with macros, V15.01

Posted: 25 Jul 2021 02:29
by DerellLicht1
pjj wrote: 24 Jul 2021 08:29 Why don't you use CommentAction (with custom shortcut key)? It is built-in "action" and it inserts // at the beginning of the line. There is also an icon in the Editor Toolbar, which does the same. You can select multiple line and comment them out in one go.
Hi pjj!! Thank ye for the suggestion... let me just note, though, that I'm looking for an editor where keystroke macros actually work, since I've used them in my other editors for over 30 years now!!

:P

Re: crash with macros, V15.01

Posted: 25 Jul 2021 08:14
by pjj
DerellLicht1 wrote: 25 Jul 2021 02:29 let me just note, though, that I'm looking for an editor where keystroke macros actually work
You're 100% right, working macros are so much better! :lol: However, as I mentioned, I can't help you with the bug, but I can try to suggest a workaround until the bug is fixed :wink:

Re: crash with macros, V15.01

Posted: 25 Jul 2021 12:51
by Rickard Johansson
Fixed in next release (v15.02). Thanks!

Re: crash with macros, V15.01

Posted: 25 Jul 2021 16:33
by DerellLicht1
Rickard Johansson wrote: 25 Jul 2021 12:51 Fixed in next release (v15.02). Thanks!
Very Cool!!! Thank you so much!!!

How does your release process work?? i.e., when will this version be released??

Re: FIXED: crash with macros, V15.01

Posted: 25 Jul 2021 19:00
by Rickard Johansson
If nothing else comes up - maybe tomorrow 8)

Re: FIXED: crash with macros, V15.01

Posted: 27 Jul 2021 03:36
by DerellLicht1
Excellent!!! Fixed perfectly !!! Thank you so much....