cnr-isti-vclab / PyMeshLab

The open source mesh processing python library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Texture Map Defragmentation brings to a core dump

pierfrancescomartinello opened this issue · comments

Hello. I'm having issues working with the Texture Map Defragmentation, as when called, it aborts the program yielding the following error Aborted (core dumped) .

The python script I'm executing is the following:

import pymeshlab

ms = pymeshlab.MeshSet()
ms.load_new_mesh("<name>.obj")

ms.apply_texmap_defragmentation(matchingthreshold=5, boundarytolerance=0.02, distortiontolerance=3, globaldistortiontolerance=0.5, offsetfactor=50)

I'm working on a laptop running Linux and with Python 3.10.12. I've tried different versions of the software, including the last stable and the last nightly versions. If more informations are needed feel free to ask and I will do my best to provide it.


EDIT 18/03/2024
After further inspection of the documentation, I've also tried running the command pytest --pyargs pymeshlab and that showed the following error (the initial part of the output has been trimmed since I don't think it's relevant):

...
tests/test_select_faces_with_edge_longer_than.py [ 92%]                                                                                                                
tests/test_texture_map_defragmentation.py Fatal Python error: Aborted

Current thread 0x000071595317e000 (most recent call first):
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pymeshlab/__init__.py", line 41 in filter_function
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pymeshlab/tests/test_texture_map_defragmentation.py", line 17 in test_texture_map_defragmentation
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/python.py", line 195 in pytest_pyfunc_call
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/python.py", line 1789 in runtest
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/runner.py", line 167 in pytest_runtest_call
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/runner.py", line 260 in <lambda>
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/runner.py", line 339 in from_call
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/runner.py", line 259 in call_runtest_hook
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/runner.py", line 220 in call_and_report
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/runner.py", line 131 in runtestprotocol
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/runner.py", line 112 in pytest_runtest_protocol
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/main.py", line 349 in pytest_runtestloop
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/main.py", line 324 in _main
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/main.py", line 270 in wrap_session
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/main.py", line 317 in pytest_cmdline_main
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/config/__init__.py", line 167 in main
  File "/home/pierfrancesco/.local/lib/python3.10/site-packages/_pytest/config/__init__.py", line 190 in console_main
  File "/home/pierfrancesco/.local/bin/pytest", line 8 in <module>


Extension modules: lazy_object_proxy.cext, numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator (total: 14)
Aborted (core dumped)

Best Regards
Pierfrancesco

The texture map defragmentation filter runs on GPU and requires an opengl context to be executed, therefore the problem could be caused by the system setup. Could you please check if the machine that you are using allows to run opengl?

OpenGL in my machine is set up and working. Through more digging, I've also found that while using MeshLab and trying to use "Texture Map Defragmentation" the app crashes

OpenGL in my machine is set up and working. Through more digging, I've also found that while using MeshLab and trying to use "Texture Map Defragmentation" the app crashes

I have the same problem with MeshLab. I use a MacBook Air with a M1 processor.