cmang / durdraw

Versatile ASCII and ANSI Art text editor for drawing in the Linux/Unix/macOS terminal, with animation, 256 and 16 colors, Unicode and CP437, and customizable themes
http://durdraw.org
BSD 3-Clause "New" or "Revised" License
709 stars 20 forks source link

First few characters of top line sometimes does not refresh correctly. #68

Open AdrianGroty opened 4 months ago

AdrianGroty commented 4 months ago

Just happened upon this. Pretty sure it's just a typo, and no idea how significant it is, but I thought you might want to know about it. Durdraw crashed (I think while I was changing colors. Not 100%; it was abrupt.) and printed an error message to the console notifying me that 'selt' is not defined in durdraw_ui_curses.py. :

https://github.com/cmang/durdraw/blob/9063bc5d34b8d71735b1a9c6c4b61f494b06dca9/durdraw/durdraw_ui_curses.py#L446

cmang commented 4 months ago

Crap... well, that typo is fixed in the dev build. So now it should error instead of crashing. 🙂 I am sorry that you experienced a crash. I hope no valuable work was lost.

It means that it tried to set an FG color that isn't available. Probably a bug... please let me know if it comes up again, and if you can reproduce it.

Thank you for the report!

AdrianGroty commented 4 months ago

Sure thing. Crashes have not been frequent, but I have had a few. Nothing of value was lost, lol. I have accidentally nuked a few things getting fast and loose with alt and the F keys, but there's not much of a way around that.

Is there a log or a command argument to make one? I was going to copy the error from my console for this report, but the terminal window was being wonky after the crash.

cmang commented 4 months ago

Is there a log or a command argument to make one?

No, but that is a great idea. There is a --debug option that turns on a bunch of on-screen verbosity.

I should probably re-open this in case someone else comes across this. Meanwhile I will look for possible paths that could lead there.

The one thing I can thin of that might have caused it, is if you tried to eyedrop a color from the canvas that has the wrong BG color. It's supposed to fix that when it loads the image, but maybe I missed something.

cmang commented 4 months ago

Sure thing. Crashes have not been frequent, but I have had a few.

When they do happen, a screenshot of the Python call stack trace (aka the crash message) is often helpful.

AdrianGroty commented 4 months ago

The one thing I can thin of that might have caused it, is if you tried to eyedrop a color from the canvas that has the wrong BG color. It's supposed to fix that when it loads the image, but maybe I missed something.

Entirely possible. I do use the eyedropper pretty often. But RAM cleared in the wetware the instant it happened.

When they do happen, a screenshot of the Python call stack trace (aka the crash message) is often helpful.

Duly noted!

I have also noticed a weird issue lately that I haven't reported because I haven't been able to reproduce it on command, I have a difficult time describing it clearly, and even a screen recording wouldn't necessarily communicate it very well. May or may not be relevant:

The upper-left corner of the image will sometimes get "stuck." It's maybe the first two or three lines and ten or so columns. Typing and changing colors will appear to have no effect on the image, but if I copy/paste those tiles somewhere else, the pasted version will reflect my changes, or inserting rows to shift the image downward will reveal any changes, once they have come out from under the "stuck" bit in the upper left corner.

cmang commented 4 months ago

The upper-left corner of the image will sometimes get "stuck." It's maybe the first two or three lines and ten or so columns. Typing and changing colors will appear to have no effect on the image, but if I copy/paste those tiles somewhere else, the pasted version will reflect my changes, or inserting rows to shift the image downward will reveal any changes, once they have come out from under the "stuck" bit in the upper left corner.

That's definitely a bug. Does hitting ctrl-l (redraw the screen) make the invisible characters reappear?

It would be great if we can figure out how to reproduce that. I'll look for it, thanks.

AdrianGroty commented 4 months ago

Does hitting ctrl-l (redraw the screen) make the invisible characters reappear?

Alt+l seems to have no effect. It is consistently happening with this file on my end; maybe it will for you, too. durdrawcrt.zip

cmang commented 4 months ago

Alt+l seems to have no effect. I

Thanks for the file. I meant CTRL-L, not alt-l. Alt-l colors the character under the cursor. Ctrl-L redraws the screen.

I'm seeing the issue, where changes in that corner aren't showing. Weird. I'll let you know what I find.

cmang commented 4 months ago

It only seems to happen with Esc-1 through esc-10 in non-playback mode. F1-F10 doesn't seem to have the issue.

And only, it seems, on the top line. Once you draw on another line it refreshes and the missing top line characters appear.

AdrianGroty commented 4 months ago

Wow, I'm retarded. In my defense, very little text fits on my phone screen, and I couldn't look at the thing I was replying to while replying to it. And I must have just thought alt because that's usually the modifier. Promise I didn't just assume you misspoke on your own software!

Ctrl+L did refresh the tiles. I found another file that does it, in case it helps. moltris2.zip