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

nextpnr-gowin GUI crash when opening JSON file in the GUI (debug test included) #1255

Open
BellssGit opened this issue Dec 7, 2023 · 0 comments

Comments

@BellssGit
Copy link

OS: X86, Fedora39
Version: Latest Git
Test File: Blinky example
Launch args: "--gui --device GW1NR-LV9QN88PC6/I5"

As described in the title, when I tried to open the JSON file using GUI, The software crashed. shows "signal SIGSEGV (Address boundary error)"

So I built a Debug version and traceback using GDB, turns out it got a seg fault at "pyinterpreter.cc" line 134

    PyRun_SimpleString("import sys\n"
                       "import redirector\n"
                       "import tempfile\n"
                       "sys.path.insert(0, \".\")\n" // add current path
                       "sys.stdout = redirector.redirector()\n"
                       "sys.stdin = tempfile.TemporaryFile(mode='r')\n"
                       "sys.stderr = sys.stdout\n"
                       "import rlcompleter\n"
                       "sys.completer = rlcompleter.Completer()\n");

This part of the code was executed when the program launched.

Then opening a JSON file in GUI will make it run again and cause the crash.

I don't know if this is the right way to fix it, but I added a flag to make it only run once. Now I can open JSON file in GUi without any problem.

If someone can check and fix this bug, much appreciated!

@BellssGit BellssGit changed the title nextpnr-gowin GUI crash when opening JSON file (debug test included) nextpnr-gowin GUI crash when opening JSON file in the GUI (debug test included) Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant