Segmentation fault on simplest program on mac

I just installed panda3d on mac (Catalina) and I’m getting a seg fault when I run the simplest program suggested in the manual.

Does anyone have any suggestions on how to troubleshoot this?

python3 tutorial.py
:display: loading display module: libpandagl.dylib
Known pipe types:
  CocoaGraphicsPipe
(all display modules loaded.)
:display: Created output of type CocoaGraphicsWindow
[1]    42688 segmentation fault  python3 tutorial.py

where tutorial.py is just

from direct.showbase.ShowBase import ShowBase

class MyApp(ShowBase):
 
    def __init__(self):
        ShowBase.__init__(self)
 
app = MyApp()
app.run()

This is the end of the debug output, if helpful (full output won’t fit)

...
child update PandaNode camera2dp:
child_control_mask =  0000 0000 0000 0000 0000 0000 0000 0000
child_show_mask =  0000 0000 0000 0000 0000 0000 0000 0000
net_draw_control_mask =  0000 0000 0000 0000 0000 0000 0000 0000
net_draw_show_mask =  1111 1111 1111 1111 1111 1111 1111 1111
renderable, set mask  1111 1111 1111 1111 1111 1111 1111 1111
} PandaNode render2dp::update_cached();
:linmath(debug): decomposing [ 2.79904 0 0 ] [ 0 3.73205 0 ] [ 0 0 -1.00002 ] via cs zup_right
:linmath(debug): after unwind, mat is [ 2.79904 0 0 ] [ 0 3.73205 0 ] [ 0 0 -1.00002 ]
:linmath(debug): decomposing [ 1 0 0 ] [ 0 1 0 ] [ 0 0 -0.001 ] via cs zup_right
:linmath(debug): after unwind, mat is [ 1 0 0 ] [ 0 1 0 ] [ 0 0 -0.001 ]
:display:cocoadisplay(debug): Setting size to 800, 600
:display:cocoadisplay(debug): Setting window content origin to 320, 150
[1]    47346 segmentation fault  python3 tutorial.py

You are most probably experimenting this crash https://github.com/panda3d/panda3d/issues/795 Until the fix is merged and included in a new release, the workaround is to manually grant the “Input Monitoring” permission for your application (Usually it means Terminal.app or Python.app)

Okay, thank you. I will try that.

I’m a little unclear on how to grant this permission. I see no option in the attached screenshot. If you let me know, I’m happy to make the screenshots/guide that @rdb mentions in the issue you linked.

I made a step by step instructions on Github, please tell me if it works for you and if it is complete

1 Like

Yes, this worked.

I was using iTerm2, and for some reason, it was not requesting input monitoring. When I tried running with the usual Terminal app, it requested input monitoring, and now it’s working.

I guess I’ll use Terminal for my work with Panda3D for now.

Thanks again.

Here is a link to the instructions on GitHub, if anyone else is trying to find them:

Thanks for your feedback, I tried with iTerm2 but I also got the popup when I started a panda app. But I believe that sometimes the app crashes before the popup is generated, maybe you should try a few time.

A post was split to a new topic: Crash when running yorg on Catalina