visidata icon indicating copy to clipboard operation
visidata copied to clipboard

[cursorDisplay col] Hard crash when cursor on cell of SheetsSheet cursorDisplay

Open frosencrantz opened this issue 3 years ago • 3 comments

Small description Hard crash when the cursor goes to the cell of SheetsSheet cursorDisplay for the current SheetsSheet.

Expected result No crash.

Actual result with screenshot

Goes into infinite recursion:

```
Current thread (most recent call first):
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 470 in <lambda>
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 244 in calcValue
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 282 in getValue
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/wrappers.py", line 108 in wrapply
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 301 in getCell
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 362 in getDisplayValue
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/sheets.py", line 445 in cursorDisplay
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 425 in getattrdeep
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 470 in <lambda>


...  many duplicated lines removed.

  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/column.py", line 282 in getValue
  File "/data/data/com.termux/files/home/git/visidata/env/lib/python3.9/site-packages/visidata/wrappers.py", line 108 in wrapply
  ...
Aborted (core dumped)
```

Steps to reproduce with sample data and a .vd

vd 
S                  - Go to SheetsSheet
c cursorDisplay    - Go to CursorDisplay column for the current SheetsSheet

Additional context Please include the version of VisiData. Latest develop version.

frosencrantz avatar Jun 27 '21 16:06 frosencrantz

Thanks @frosencrantz! Nice catch. Amusingly this was related to the fix for this: https://github.com/saulpw/visidata/issues/991

I just checked, and now both issues are handled. Will be in the next VisiData release.

anjakefala avatar Jun 28 '21 03:06 anjakefala

I'm still able to reproduce this bug as of dd54728dddb861a2e1b0a6fc7b1c549672d31089.

cwarden avatar Jul 07 '21 14:07 cwarden

I'll add it works for me from the latest develop branch

frosencrantz avatar Jul 11 '21 16:07 frosencrantz

This bug has not come up again for over a year, and I have not been able to reproduce what @cwarden saw, so I think I am going to close this. If anyone runs into it again, please re-open!

anjakefala avatar Nov 11 '22 04:11 anjakefala