NVIDIA / NVIDIA/nvImageCodec

Segmentation fault when you release the encoder if your pip environment has scipy==1.15.2

Open
#29 2 comments 0 reactions 1 assignee View on GitHub

@jantonguirao is already working on this.

Since Sep 3, 2026.

bug
Dominant language
Jupyter Notebook
Stars
159
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Version

0.4.1.21

Describe the bug.

My cuda version is 12.4. Here is a simple test example:


import cupy as cp
from nvidia import nvimgcodec


def test_encode():

    encoder = nvimgcodec.Encoder()

    
    test_image = cp.random.randint(0, 256, (1024, 1024, 1), dtype=cp.uint8)

    
    nv_image = nvimgcodec.as_image(test_image)
                
             
    encoder.write("test.jpg",
                    nv_image,
                    codec='jpeg')
                    
if __name__ == "__main__":
    test_encode()
    print("Process exiting...")  

My conda command:

conda create -n test3 python=3.12
pip install nvidia-nvimgcodec-cu12 cupy-cuda12x 

everything is ok, but when you install scipy==1.15.2, there is a Segmentation fault when the test program is exiting.

Minimum reproducible example

Environment details
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

Relevant log output
python test.py
Process exiting...
Segmentation fault (core dumped)
Other/Misc.

No response

Check for duplicates
  • I have searched the open bugs/issues and have found no duplicates for this bug report

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.