horga83 / h19term

H19 terminal emulator package in python
GNU Lesser General Public License v3.0
5 stars 3 forks source link

blew up when trying to run wordstar in ansi screen mode #4

Open riwide opened 3 years ago

riwide commented 3 years ago

Running romwbw cpm3 in my sc131; latest version (03 July 2021) of H19term.py crashed when attempting to run wordstar. H19term set to ansi mode; SC131 and Wordstar configured for ANSI - work fine with Tera Term.

I think it is to do with things like [H which WS sends, without positional values between [ and H, probably means to go home, top left.

pi@pi4b8:~/h19term $ ./h19term.py

Traceback (most recent call last): File "./h19term.py", line 2535, in curses.wrapper(term.main, term, sio) File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper return func(stdscr, *args, **kwds) File "./h19term.py", line 2514, in main term.process_escape_seq(sio) File "./h19term.py", line 937, in process_escape_seq self.ansi_escape_seq(sio) File "./h19term.py", line 1084, in ansi_escape_seq line = int(seq[idx1+1:idx2]) ValueError: invalid literal for int() with base 10: 'H'

It is a while since I ran your program, and thought I'd give it another run. Surely the program should not crash with any data received? Hope you can find and fix

Richard

Also had this error pi@pi4b8:~/h19term $ ./h19term.py Traceback (most recent call last): File "./h19term.py", line 2535, in curses.wrapper(term.main, term, sio) File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper return func(stdscr, *args, **kwds) File "./h19term.py", line 2514, in main term.process_escape_seq(sio) File "./h19term.py", line 937, in process_escape_seq self.ansi_escape_seq(sio) File "./h19term.py", line 1112, in ansi_escape_seq idx1 = string.find(seq, '[') AttributeError: module 'string' has no attribute 'find'

horga83 commented 3 years ago

You never said which version of the software you were running, surely you don't expect all versions to be bug free:-) You also never mentioned the environment you were running it in, which terminal emulator?  Have you changed the settings of the terminal emulator as described in the user guide?

I'm thinking specifically backspace key generates control-H and delete generates ascii delete.

Cheers George

On Sat, 2021-07-03 at 10:40 -0700, riwide wrote:

Running romwbw cpm3 in my sc131; latest version (03 July 20210 of H19term.py crashed when attempting to run wordstar. H19term set to ansi mode @.:~/h19term $ ./h19term.py Traceback (most recent call last): File "./h19term.py", line 2535, in curses.wrapper(term.main, term, sio) File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper return func(stdscr, args, kwds) File "./h19term.py", line 2514, in main term.process_escape_seq(sio) File "./h19term.py", line 937, in process_escape_seq self.ansi_escape_seq(sio) File "./h19term.py", line 1084, in ansi_escape_seq line = int(seq[idx1+1:idx2]) ValueError: invalid literal for int() with base 10: 'H' It is a while since I ran your program, and thought I'd give it another run. Surely the program should not crash with any data received? Hope you can find and fix Richard — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

riwide commented 3 years ago

Chose first terminal option, ran up h19term.py, enable log, set baud to 57600, set term to ansi, boot into cpm3 and type ws; h19term crashes;log shows esc [ H as last item. Looking at code it doesn't appear to handle lack of parameters between the [ and H; looks simple to fix. Then I can hunt for more. Cheers Richard

On Sun, 4 Jul 2021, 04:15 horga83, @.***> wrote:

You never said which version of the software you were running, surely you don't expect all versions to be bug free:-) You also never mentioned the environment you were running it in, which terminal emulator? Have you changed the settings of the terminal emulator as described in the user guide?

I'm thinking specifically backspace key generates control-H and delete generates ascii delete.

Cheers George

On Sat, 2021-07-03 at 10:40 -0700, riwide wrote:

Running romwbw cpm3 in my sc131; latest version (03 July 20210 of H19term.py crashed when attempting to run wordstar. H19term set to ansi mode @.:~/h19term $ ./h19term.py Traceback (most recent call last): File "./h19term.py", line 2535, in curses.wrapper(term.main, term, sio) File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper return func(stdscr, args, kwds) File "./h19term.py", line 2514, in main term.process_escape_seq(sio) File "./h19term.py", line 937, in process_escape_seq self.ansi_escape_seq(sio) File "./h19term.py", line 1084, in ansi_escape_seq line = int(seq[idx1+1:idx2]) ValueError: invalid literal for int() with base 10: 'H' It is a while since I ran your program, and thought I'd give it another run. Surely the program should not crash with any data received? Hope you can find and fix Richard — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/horga83/h19term/issues/4#issuecomment-873506349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFCH2RGOWHNJHTGRBLTER3TV7G53ANCNFSM47YKVRBA .

riwide commented 3 years ago

Using h19term.py downloaded from github yesterday.

On Sun, 4 Jul 2021, 07:27 Richard Deane, @.***> wrote:

Chose first terminal option, ran up h19term.py, enable log, set baud to 57600, set term to ansi, boot into cpm3 and type ws; h19term crashes;log shows esc [ H as last item. Looking at code it doesn't appear to handle lack of parameters between the [ and H; looks simple to fix. Then I can hunt for more. Cheers Richard

On Sun, 4 Jul 2021, 04:15 horga83, @.***> wrote:

You never said which version of the software you were running, surely you don't expect all versions to be bug free:-) You also never mentioned the environment you were running it in, which terminal emulator? Have you changed the settings of the terminal emulator as described in the user guide?

I'm thinking specifically backspace key generates control-H and delete generates ascii delete.

Cheers George

On Sat, 2021-07-03 at 10:40 -0700, riwide wrote:

Running romwbw cpm3 in my sc131; latest version (03 July 20210 of H19term.py crashed when attempting to run wordstar. H19term set to ansi mode @.:~/h19term $ ./h19term.py Traceback (most recent call last): File "./h19term.py", line 2535, in curses.wrapper(term.main, term, sio) File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper return func(stdscr, args, kwds) File "./h19term.py", line 2514, in main term.process_escape_seq(sio) File "./h19term.py", line 937, in process_escape_seq self.ansi_escape_seq(sio) File "./h19term.py", line 1084, in ansi_escape_seq line = int(seq[idx1+1:idx2]) ValueError: invalid literal for int() with base 10: 'H' It is a while since I ran your program, and thought I'd give it another run. Surely the program should not crash with any data received? Hope you can find and fix Richard — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/horga83/h19term/issues/4#issuecomment-873506349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFCH2RGOWHNJHTGRBLTER3TV7G53ANCNFSM47YKVRBA .

riwide commented 3 years ago

The special case of len 2 should be len 3 on esc [ H. If I patch line 1078 to 3 then it gets past that.IT will then crash on wordstar exit.

There seems tobe code confusion in the code for handling the escape sequences - some are like seq.find and some are string.find where I think string should be seq.

I suspect other offsets in seq are not correct on some of the other esc sequences.

In wordstar, if you do N to open non document file then the screen handling is not correct, the old text is not removed and the new text is written over the top. I've not had time to determine which sequences are not working.

To have your hterm19 working fully in ANSI would be fantastic as linux is not awash with good terminal packages with xmodem. It is nice to have a package with a legacy type like H19 and also with the more modern ANSI, so I hope you are motivated to debug and fix.

I will assist with testing where possible, and am learning m,ore about python, debuggers etc. Do you have a good IDE debug environment?

I have been hunting for a vt100 test suite for under cpm - perhaps you can get vttest under linux working faster than I can - I am still learning linux and terminals etc.

Cheers

Richard

With that fixed, it crashed on ws exit. It seems that you have used

On Sun, 4 Jul 2021, 04:15 horga83, @.***> wrote:

You never said which version of the software you were running, surely you don't expect all versions to be bug free:-) You also never mentioned the environment you were running it in, which terminal emulator? Have you changed the settings of the terminal emulator as described in the user guide?

I'm thinking specifically backspace key generates control-H and delete generates ascii delete.

Cheers George

On Sat, 2021-07-03 at 10:40 -0700, riwide wrote:

Running romwbw cpm3 in my sc131; latest version (03 July 20210 of H19term.py crashed when attempting to run wordstar. H19term set to ansi mode @.:~/h19term $ ./h19term.py Traceback (most recent call last): File "./h19term.py", line 2535, in curses.wrapper(term.main, term, sio) File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper return func(stdscr, args, kwds) File "./h19term.py", line 2514, in main term.process_escape_seq(sio) File "./h19term.py", line 937, in process_escape_seq self.ansi_escape_seq(sio) File "./h19term.py", line 1084, in ansi_escape_seq line = int(seq[idx1+1:idx2]) ValueError: invalid literal for int() with base 10: 'H' It is a while since I ran your program, and thought I'd give it another run. Surely the program should not crash with any data received? Hope you can find and fix Richard — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/horga83/h19term/issues/4#issuecomment-873506349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFCH2RGOWHNJHTGRBLTER3TV7G53ANCNFSM47YKVRBA .

horga83 commented 3 years ago

Did you correctly set your backspace key in you terminal? Also I can't help unless you tell me which terminal emulator you are running.

On July 4, 2021 2:55:15 a.m. PDT, riwide @.***> wrote:

The special case of len 2 should be len 3 on esc [ H. If I patch line 1078> to 3 then it gets past that.IT will then crash on wordstar exit.>

There seems tobe code confusion in the code for handling the escape> sequences - some are like seq.find and some are string.find where I think> string should be seq.>

I suspect other offsets in seq are not correct on some of the other esc> sequences.>

In wordstar, if you do N to open non document file then the screen handling> is not correct, the old text is not removed and the new text is written> over the top. I've not had time to determine which sequences are not> working.>

To have your hterm19 working fully in ANSI would be fantastic as linux is> not awash with good terminal packages with xmodem. It is nice to have a> package with a legacy type like H19 and also with the more modern ANSI, so> I hope you are motivated to debug and fix.>

I will assist with testing where possible, and am learning m,ore about> python, debuggers etc. Do you have a good IDE debug environment?>

I have been hunting for a vt100 test suite for under cpm - perhaps you can> get vttest under linux working faster than I can - I am still learning> linux and terminals etc.>

Cheers>

Richard>

With that fixed, it crashed on ws exit. It seems that you have used>

On Sun, 4 Jul 2021, 04:15 horga83, @.***> wrote:>

You never said which version of the software you were running, surely> you don't expect all versions to be bug free:-)> You also never mentioned the environment you were running it in, which> terminal emulator? Have you changed the settings of the terminal> emulator as described in the user guide?>

I'm thinking specifically backspace key generates control-H and delete> generates ascii delete.>

Cheers> George>

On Sat, 2021-07-03 at 10:40 -0700, riwide wrote:> Running romwbw cpm3 in my sc131; latest version (03 July 20210 of> H19term.py crashed when attempting to run wordstar.> H19term set to ansi mode> @.:~/h19term $ ./h19term.py> Traceback (most recent call last):> File "./h19term.py", line 2535, in> curses.wrapper(term.main, term, sio)> File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper> return func(stdscr, args, kwds)> File "./h19term.py", line 2514, in main> term.process_escape_seq(sio)> File "./h19term.py", line 937, in process_escape_seq> self.ansi_escape_seq(sio)> File "./h19term.py", line 1084, in ansi_escape_seq> line = int(seq[idx1+1:idx2])> ValueError: invalid literal for int() with base 10: 'H'> It is a while since I ran your program, and thought I'd give it> another run.> Surely the program should not crash with any data received?> Hope you can find and fix> Richard> —> You are receiving this because you are subscribed to this thread.> Reply to this email directly, view it on GitHub, or unsubscribe.>

—> You are receiving this because you authored the thread.> Reply to this email directly, view it on GitHub> https://github.com/horga83/h19term/issues/4#issuecomment-873506349, or> unsubscribe>

https://github.com/notifications/unsubscribe-auth/AHFCH2RGOWHNJHTGRBLTER3TV7G53ANCNFSM47YKVRBA> .>

-- > You are receiving this because you commented.> Reply to this email directly or view it on GitHub:> https://github.com/horga83/h19term/issues/4#issuecomment-873557101

riwide commented 3 years ago

I will check my setup later this evening to confirm the Linux shell used. The terminal emulator is from your github yesterday.

I have not configured backspace beyond default. The problems are occurring on escape sequences for ansi display handling, not related to typing. You should see the problems with an ansi wordstar.

Can you loop h19term.py to a Linux shell so you can run vttest? Easily found on Google?

Thanks for quick response Richard

On Sun, 4 Jul 2021, 17:39 horga83, @.***> wrote:

Did you correctly set your backspace key in you terminal? Also I can't help unless you tell me which terminal emulator you are running.

On July 4, 2021 2:55:15 a.m. PDT, riwide @.***> wrote:

The special case of len 2 should be len 3 on esc [ H. If I patch line 1078> to 3 then it gets past that.IT will then crash on wordstar exit.>

There seems tobe code confusion in the code for handling the escape> sequences - some are like seq.find and some are string.find where I think> string should be seq.>

I suspect other offsets in seq are not correct on some of the other esc> sequences.>

In wordstar, if you do N to open non document file then the screen handling> is not correct, the old text is not removed and the new text is written> over the top. I've not had time to determine which sequences are not> working.>

To have your hterm19 working fully in ANSI would be fantastic as linux is> not awash with good terminal packages with xmodem. It is nice to have a> package with a legacy type like H19 and also with the more modern ANSI, so> I hope you are motivated to debug and fix.>

I will assist with testing where possible, and am learning m,ore about> python, debuggers etc. Do you have a good IDE debug environment?>

I have been hunting for a vt100 test suite for under cpm - perhaps you can> get vttest under linux working faster than I can - I am still learning> linux and terminals etc.>

Cheers>

Richard>

With that fixed, it crashed on ws exit. It seems that you have used>

On Sun, 4 Jul 2021, 04:15 horga83, @.***> wrote:>

You never said which version of the software you were running, surely> you don't expect all versions to be bug free:-)> You also never mentioned the environment you were running it in, which> terminal emulator? Have you changed the settings of the terminal> emulator as described in the user guide?>

I'm thinking specifically backspace key generates control-H and delete> generates ascii delete.>

Cheers> George>

On Sat, 2021-07-03 at 10:40 -0700, riwide wrote:> Running romwbw cpm3 in my sc131; latest version (03 July 20210 of> H19term.py crashed when attempting to run wordstar.> H19term set to ansi mode> @.:~/h19term $ ./h19term.py> Traceback (most recent call last):> File "./h19term.py", line 2535, in> curses.wrapper(term.main, term, sio)> File "/usr/lib/python3.7/curses/init.py", line 94, in wrapper> return func(stdscr, args, kwds)> File "./h19term.py", line 2514, in main> term.process_escape_seq(sio)> File "./h19term.py", line 937, in process_escape_seq> self.ansi_escape_seq(sio)> File "./h19term.py", line 1084, in ansi_escape_seq> line = int(seq[idx1+1:idx2])> ValueError: invalid literal for int() with base 10: 'H'> It is a while since I ran your program, and thought I'd give it> another run.> Surely the program should not crash with any data received?> Hope you can find and fix> Richard> —> You are receiving this because you are subscribed to this thread.> Reply to this email directly, view it on GitHub, or unsubscribe.>

—> You are receiving this because you authored the thread.> Reply to this email directly, view it on GitHub> https://github.com/horga83/h19term/issues/4#issuecomment-873506349, or> unsubscribe>

< https://github.com/notifications/unsubscribe-auth/AHFCH2RGOWHNJHTGRBLTER3TV7G53ANCNFSM47YKVRBA

.>

-- > You are receiving this because you commented.> Reply to this email directly or view it on GitHub:> https://github.com/horga83/h19term/issues/4#issuecomment-873557101

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/horga83/h19term/issues/4#issuecomment-873622944, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFCH2XAICLK2KXB24POV7TTWCFDDANCNFSM47YKVRBA .