Mysterious bugs related to scripted custom columns in combination with tagitems

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
fishgod
Posts: 231
Joined: 03 Feb 2008 00:40
Location: Sankt Augustin (near Bonn), Germany

Mysterious bugs related to scripted custom columns in combination with tagitems

Post by fishgod »

1. Mysterious crash (close without any error-message) when using tagitems+wait in custom-column-script
Occoured to a quite complex and lengthy script, but I could nail it down to just a few lines of code with a clean config:

Custom-Column-Setup:
Create a Custom Column as shown in the screenshot and attach it to the current view.
xy-column-crash.png
Code as Text:

Code: Select all

"Test Crash"
  $item = "<cc_item>";
  $tag = 'do a lot of stuff';
  tagitems("ex16", $tag, $item); //write tag
  wait; //if this is removed everthing works fine ?!?
  return "OK";
When the script in the column is executed, XYplorer just closes immediately without any error messages and without saving the config, so I consider this as a crash.
Important thing here is that Trigger is set to List. If it is set to Browse, the crash does not occour, but other things happen (see 2 and 3 below).
If wait is removed, it also works fine.
If tagitems is removed, it also works fine.
(In this demonstration the wait-statement is rather useless, but as far as I understand the documentation I can keep XY responsive by periodically calling it, while running a long script. I couldn't test this because of the bug I'm reporting right now...)


2. Items on other pane duplicate after using tagitems in custom-column-script
3. Following Items after the first item with the script are not shown in the list

Custom-Column-Setup:
Basically same setup as above, but this time we set Trigger to Browse and remove the wait statement (as the wait makes no difference here):
xy-item-dupe.png
Code as Text:

Code: Select all

"Test Duplicate"
  $item = "<cc_item>";
  $tag = 'do a lot of stuff';
  tagitems("ex16", $tag, $item); //write tag
  return "OK";
The behaviour does not occour when Trigger is set to List.
The behaviour does not occour when tagitems is not used.

Every time the script gets executed (first time when entering the folder with custom column (saved as folder-view), and also every time you hit F5), the items on the other pane duplicate.
This duplication is only a visual thing, if you switch panes and hit F5 everything is back to normal.
The upper pane also contains a second txt-file and the XYplorer.exe, which are not shown in the list.
xy-item-dupe-shown.png
To see the attached files, you need to log into the forum.
Operating System: Win10 x64 / Win11 x64 / almost allways newest XY-beta
totally XYscripting-addicted

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Mysterious bugs related to scripted custom columns in combination with tagitems

Post by bdeshi »

fishgod wrote: ↑20 Aug 2019 15:45 but as far as I understand the documentation I can keep XY responsive by periodically calling it, while running a long script.
for what it's worth, wait 1; seems to work okay.

Don can explain the crash.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Mysterious bugs related to scripted custom columns in combination with tagitems

Post by admin »

Interesting bug. Comes down to an undesired recursion. Too complex to explain. But easy to fix. Next beta...

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Mysterious bugs related to scripted custom columns in combination with tagitems

Post by admin »

Fixed bug 2) and 3) as well. They were similar in nature but independent of the first.

Thanks for spotting these! :tup: :beer:

Post Reply