Skip to content

Segmentation fault while using matplotlib under Linux #389

Open
@d-sacre

Description

For a data evaluation software, I need among others the matplotlib module. The necessary installation was done according to the information in the READ.ME.
After successful installation, running the project in Godot lead to numerous indescriptive error messages. Running a test Python script containing a matplotlib example in a terminal with the following command

PATH/TO/PROJECT/addons/pythonscript/x11-64/bin/python3.8 /PATH/TO/FILE.py

led to the error message

Xlib: request 55 length 16 would exceed buffer size. Segmentation fault (core dumped)

Changing plt.show() to plt.savefig(FILENAME) did not change the result.

The error seems to be related to an issue with different xlib being present on the system (system specific and the ones shipped with the PythonScript addon).

Information for Reproduction

Prerequisites

Commands used for Python Module Installation (Step-by-Step)

  1. Navigate to correct folder
    cd PATH/TO/PROJECT/addons/pythonscript/x11-64/bin/
  2. Make Python executable runnable
    chmod u+x ./python3.8
  3. Make sure pip is installed
    ./python3.8 -m ensurepip
  4. Install the required modules
    ./python3.8 -m pip install numpy scipy matplotlib

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions