You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Segmentation fault while import stl file pyassimp 4.1.4 #2343
BugGlobal flag to mark a deviation from expected behaviourRegressionBugs related to any kind of regression testsSTLBugs related to the STL format.pyassimpThe Python Assimp port
Hi, I did the following code to import stl file using pyassimp. Got the following error.
import pyassimp
pyassimp.load("STL FILE PATH")
version 4.1.4
result:
Segmentation fault (core dumped)
I fixed it by reinstall version 3.3: pip install pyassimp==3.3
Hope you can confirm this bug and fix it in the newest version.
All the above are tested in a python2.7 conda environment and Ubuntu 16.04
Best regards
Reacted by Sidd Srivatsa, Gu Wang and Kevin Rivera
I can confirm having seen this issue also with Python3 on several Ubuntu 18.04 machines.
pip3 install pyassimp==4.1.3 also seems to circumvent the problem.
This implies something is different about what pyassimp passes in/ how it calls things (maybe it's a function arguments issue or something like that). I couldn't find anything that stood out to me though. And there are a number of C++ files in that time frame that involve FBX, both various feature requests and bug fixes. Perhaps someone with more experience with it could use the automated regression test suite to figure out where it snuck in (if that's still updated)
The ugly:
CI didn't catch this. Are there python test (e.g. the regression tests) that we should be running on commit? And am I doing something stupid or do the regression tests really eat all of your ram?
The bindings were once upon a time at least to some degree automatically generated by a script. Said script may or may not support python 3. The script also fails horribly on the current source tree. Hence, for some amount of time, all updates to keep it in line with the ABI (and thus functioning) may have been manual?
I have no clue, I've never done much work on wrapper development, but it might be worth trying to use a framework like cppyy to reduce the toil required to keep the port working. I'm not personally interested in becoming the maintainer for pyassimp though, sorry.
This also happens for me too, downgrading to pyassimp==4.1.3 fixed it, i've tried some debugging and the issue is coming from _init function that is called inside load
I can confirm that the issue exists on Windows, with python ver. 3.7.2 and assimap ver. 4.1.4.
The problem seems to occur in _init, as I've figured out through some simple debugging.
Importantly, the issue seems to occur randomly- it occurs around 1 in 3 or 4 times. Not sure if it has anything to do with random initialization for stack.
BugGlobal flag to mark a deviation from expected behaviourRegressionBugs related to any kind of regression testsSTLBugs related to the STL format.pyassimpThe Python Assimp port
Activity
jsfrancal commentedon Feb 20, 2019
I can confirm having seen this issue also with Python3 on several Ubuntu 18.04 machines.
pip3 install pyassimp==4.1.3 also seems to circumvent the problem.
lianghongzhuo commentedon Feb 20, 2019
@jsfrancal pyassimp==4.1.3 also works for me at python2.7
devnoname120 commentedon Mar 18, 2019
I can confirm that I have the same issue on both Linux and Windows Python 3.7 and that
pyassimp==4.1.3fixed it.fetorres commentedon Mar 20, 2019
same here, rolling back to pyassimp==4.1.3 on python 3.6 and MacOS works for me.
Cgettys commentedon Mar 29, 2019
Can we get an example file to reproduce the issue with?
lianghongzhuo commentedon Mar 29, 2019
@Cgettys you can try this file:
https://github.com/TAMS-Group/mtc_pour/blob/master/meshes/glass.stl
Cgettys commentedon Mar 29, 2019
The good:
The bad:
The ugly:
I have no clue, I've never done much work on wrapper development, but it might be worth trying to use a framework like cppyy to reduce the toil required to keep the port working. I'm not personally interested in becoming the maintainer for pyassimp though, sorry.
ravener commentedon Jul 22, 2019
This also happens for me too, downgrading to pyassimp==4.1.3 fixed it, i've tried some debugging and the issue is coming from _init function that is called inside load
IcyChlorine commentedon Apr 20, 2021
I can confirm that the issue exists on Windows, with python ver. 3.7.2 and assimap ver. 4.1.4.
The problem seems to occur in _init, as I've figured out through some simple debugging.
Importantly, the issue seems to occur randomly- it occurs around 1 in 3 or 4 times. Not sure if it has anything to do with random initialization for stack.
tellypresence commentedon Apr 15, 2025
@lianghongzhuo Is this still a problem?
lianghongzhuo commentedon Apr 15, 2025
not a problem anymore :)