Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error with gawk 5.2.0 #463

Closed
mark2185 opened this issue Sep 30, 2022 · 8 comments
Closed

Internal error with gawk 5.2.0 #463

mark2185 opened this issue Sep 30, 2022 · 8 comments
Labels

Comments

@mark2185
Copy link

I get an error on my linux desktop, it happens on the second translation, which causes the program to crash.

$> gawk --version
GNU Awk 5.2.0, API 3.2, PMA Avon 7, (GNU MPFR 4.1.0-p13, GNU MP 6.2.1)
Copyright (C) 1989, 1991-2022 Free Software Foundation.

This is how it crashes (I input 1, and then 2):

$> trans         
1
1

See also
    1,2-naphthoquinone, 1,4-naphthoquinone
2
gawk: /dev/fd/63:93: fatal: internal error: file interpret.h, line 254: unexpected parameter type Node_val

Additional info:

$> trans -V
Translate Shell       0.9.7-git:3dcc122

platform              Linux
terminal type         xterm-256color
bi-di emulator        [N/A]
gawk (GNU Awk)        5.2.0
fribidi (GNU FriBidi) 1.0.12
audio player          mpv --no-config
terminal pager        less
web browser           xdg-open
user locale           en_US.UTF-8 (English)
host language         en
source language       auto
target language       en
translation engine    auto
proxy                 [NONE]
user-agent            Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 Edg/104.0.1293.54
ip version            [DEFAULT]
theme                 default
init file             [NONE]

Report bugs to:       https://github.com/soimort/translate-shell/issues
@soimort soimort added the gawk label Sep 30, 2022
@0fflineuser
Copy link

Same problem on a fresh arch install

@mjkloeckner
Copy link

mjkloeckner commented Oct 3, 2022

Same error here, though I can't even run trans -V.

@0fflineuser
Copy link

0fflineuser commented Oct 3, 2022

If on arch you can downgrade gawk with :
sudo pacman -U https://archive.archlinux.org/packages/g/gawk/gawk-5.1.1-1-x86_64.pkg.tar.zst
This is the latest version that I found still works for me.
Then if you want you can uncomment and add gawk to the IgnorePkg line in /etc/pacman.conf as to not update gawk it until it is resolved :
IgnorePkg = gawk

@soimort
Copy link
Owner

soimort commented Oct 4, 2022

Despite multiple reports here, I'm also on Arch Linux upgraded with gawk 5.2.0-3, and I have not been able to reproduce this error yet. Pretty strange.

More information is welcome if anyone else encountered this issue.

@mjkloeckner
Copy link

Downgrading gawk worked for me, thanks @0fflineuser.

The weird thing is that I have two computers running arch linux with the same version of gawk 5.2.0-3, and in one computer works but not in the other.

@kririae
Copy link

kririae commented Oct 9, 2022

I encountered the same problem with gawk 5.2.0-3 on ArchLinux, and downgrading the gawk also works for me. When I clone the repo and execute the code as follows,

$ ./translate -e bing :zh test
gawk: ./include/Commons.awk:290: fatal: internal error: file interpret.h, line 254: unexpected parameter type Node_val

It seems that the error is raised when executing the function unparameterize(), and the behavior is weird.
You could directly add print typeof(string) at the beginning of the function, and the problem is just gone, though it is not a solution.
Anyway, this is the behavior. Hopefully, the problem can be figured out and fixed!

Translate Shell       0.9.7-git:a3bba39

platform              Linux
terminal type         xterm-256color
bi-di emulator        [N/A]
gawk (GNU Awk)        5.2.0
fribidi (GNU FriBidi) 1.0.12
audio player          mpv --no-config
terminal pager        less
web browser           xdg-open
user locale           en_US.UTF-8 (English)
host language         en
source language       auto
target language       en
translation engine    auto
proxy                 [NONE]
user-agent            Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 Edg/104.0.1293.54
ip version            [DEFAULT]
theme                 default
init file             [NONE]

Report bugs to:       https://github.com/soimort/translate-shell/issues

@mogando668
Copy link

i don't think it's a linux or translate shell problem. i'm on macOS, and the gawk 5.2.0 would sometimes randomly give a similar error message, for random stuff i run. but run the exact same code again with no changes then it magically goes through. it's definitely something the gnu team need to take a look

@soimort
Copy link
Owner

soimort commented Oct 18, 2022

Hi all,

It is now confirmed that this was due to a bug in gawk 5.2.0: (not on the translate-shell side)
https://lists.gnu.org/archive/html/bug-gawk/2022-09/msg00055.html
which has already been fixed by
http://git.savannah.gnu.org/cgit/gawk.git/commit/?id=2848045aed5ccfd7b582808288f7fcc18d319952

If you wish, just build gawk from the current master branch (on Arch Linux you can simply use gawk-git from AUR).

I'll keep this issue open for informational purposes until the next stable release of gawk happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants