coin3d / pivy

python bindings to coin3d
ISC License
53 stars 37 forks source link

Possible to SegFault SoPerspectiveCamera.getMatrix #104

Open morganrallen opened 1 year ago

morganrallen commented 1 year ago

Firstly, I don't really understand the functionality here, I just discovered this segfault while trying to figure it out.

Calling SoPerspectiveCamera.getMatrix(action=None) will cause a SegFault, from what appears to be an invalid pointer.

Minimal example....

import sys

from pivy.coin import *
from pivy.sogui import *

myWindow = SoGui.init(sys.argv[0])

root = SoSeparator()
myCamera = SoPerspectiveCamera()
myCamera.getMatrix(action=None)

This was tested against a local build of 0.6.8. Hopefully this is helpful to implement some checking to prevent similar issues going forward.