question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mesh.show() causes segmentation fault on OSX

See original GitHub issue

I’d really love to use this library as it is perfect for my usecase, but I’m having a lot of trouble getting it to display my meshes. I’m calling mesh.show() and I’ll receive an empty window. Touching this window results in a segmentation fault crash, like so:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 755, in __call__
    result = f(objc_id, self.selector, *args)
ctypes.ArgumentError: argument 1: <class 'RecursionError'>: maximum recursion depth exceeded in __instancecheck__

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 232, in 'calling callback function'
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1121, in objc_method
    result = f(py_self, *args)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyglet/window/cocoa/pyglet_window.py", line 25, in nextEventMatchingMask_untilDate_inMode_dequeue_
    if self.inLiveResize():
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 785, in __call__
    return self.method(self.objc_id, *args)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 764, in __call__
    error.args += ('selector = ' + self.name,
TypeError: can only concatenate str (not "bytes") to str
[1]    21219 segmentation fault

Here’s how my window looks like: image

Python Version: 3.7.2 (Installed via brew install python) Virtualenv setup using venv (python3 -m venv .) Max OSX: 10.14 Mojave

I’ve installed trimesh via pip install trimesh[easy] with no errors.

Is this an issue I have to file in pyglet or cocoapy? I’ve found solutions online that point to using a fix-osx-virtualenv package to generate a pythonw executeable but seems to be no longer maintained and deprecated.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mikedhcommented, Jun 11, 2019

Whoa nice! At least until the 10.15 hammer falls haha. They don’t make it easy 😁

1reaction
mikedhcommented, Jun 9, 2019

Closer! FWIW (very little) I run an Ubuntu 16.04 VM in Parallels on my Mac and have been very happy with the performance/dev experience in full screen mode (just three finger swipe back to Mac-land).

Read more comments on GitHub >

github_iconTop Results From Across the Web

segmentation fault when plt.show() in Mac command line
Very recently I upgrade my Mac system to "Big Sur" and when I re-run my code in terminal, it crushed with "zsh: segmentation...
Read more >
Matplotlib segmentation fault Mac OS 11(Big Sur)
The script fails with a segmentation fault. Any ideas or solutions, why this might be ? The backend TKAgg works though but since...
Read more >
Segmentation fault 11 on mac causing crash on opening file
I'm not a programmer and cannot find any information online about fixing the problem, but if it is Blender wanting to access memory...
Read more >
Segmentation Fault when calling bpy.ops.render.render (script ...
I am using Blender as Python Module on Mac and now attempting to create a scene programmatically and take a screenshot of what...
Read more >
Segmentation fault for large meshes? - User Help - Mmg forum
I have been using MMG3D to remesh accurately 3D geometries generated with NetGen. The tool appeared to work just fine on my MacBook...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found