OV2311 segmentation fault / nullpointer access in python

1.Which seller did you purchase the product(s) from?
2.The Model number of the product(s) you have purchased?
3.Which Platform are you using the product(s) on?
raspberry 4B 8GB 32 bit
4.Which instruction are you following?
instruction on github
5.Has your product ever worked properly?
Yes and it is currently working.
6.What problems are you experiencing?
I can detect the ov2311 via i2cdetect -y 0 and make a picture using capture but cannot make a picture using Python this leads to NULLPOINTER access.
I researched this bug and made a simple example here https://github.com/hstarmans/Arducampython/tree/master/test .

The CPP file is identical to the C file. The C file works. The CPP file only works if I use
CXXFLAGS?= -I. -g -std=gnu++11
If I use
CXXFLAGS?= -I. -g -std=gnu++11 ${OPENCV_LIB}

I get a segmentation fault and can’t capture the picture.
I am quite sure this is the same problem that is causing problems in Python.


7.What attempts at troubleshooting have you already made?
made a simple example in cpp
8.How would you like us to help you?
create a working python example / fix library

I updated the library with a library committed 5 days later and not it seems to work…


Have you tested the python example arducam released? https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI/python