Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: binary STL files are not being recognized in s390x/Ubuntu Noble (big endian) #5509

Open
j-rivero opened this issue Mar 19, 2024 · 0 comments
Labels
Bug Global flag to mark a deviation from expected behaviour STL Bugs related to the STL format.

Comments

@j-rivero
Copy link

Describe the bug
Using the s390x architecture (big endian) on Ubuntu Noble, when using the function aiImportFileExWithProperties(..) to open an STL binary file, assimp returns the message: Failed to determine STL storage representation for ... which appears when assimp can not determine if the STL file is a binary file or an ascii file in the code:

    if (IsBinarySTL(mBuffer, mFileSize)) {
        bMatClr = LoadBinaryFile();
    } else if (IsAsciiSTL(mBuffer, mFileSize)) {
        LoadASCIIFile(mScene->mRootNode);
    } else {
        throw DeadlyImportError("Failed to determine STL storage representation for ", pFile, ".");
    }

which is stored in the STLLoader.cpp. Note that this same test does not fail in the other supported architectures: amd64 or arm64 to name some of them.

If I tried to printout the values used by the STLLoader.cpp file code linked before, I get in the relevant Dart test:

p25: Running main() from /usr/src/googletest/googletest/src/gtest_main.cc
25: [==========] Running 1 test from 1 test suite.
25: [----------] Global test environment set-up.
25: [----------] 1 test from MjcfParserTest
25: [ RUN      ] MjcfParserTest.RoboticsFetch
25: Warning [Body.cpp:443] [MjcfParser] Unsupported number of <geom> in inferring <inertial>. We use only the first <geom> for now.
25: 1. File is: dart://sample/mjcf/openai/robotics/stls/fetch/base_link_collision.stl
25:  -------------- fileSize: 
25: 236084
25:  ---- faceCount: 
25: 1880227840
25:  --- expectedBinaryFileSize: 
25: 3817078868
25:  -------------- fileSize: 
25: 236084
25:  ---- faceCount: 
25: 1880227840
25:  --- expectedBinaryFileSize: 
25: 3817078868

Values are not the expected.

To Reproduce

  1. I've been debugging a problem on the Dart library and using the following Dockerfile.
FROM --platform=s390x ubuntu:noble AS s390_dart_base
ENV LANG C
ENV LC_ALL C
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
    apt-get install -y vim ubuntu-dev-tools cmake build-essential git software-properties-common 

WORKDIR /root
RUN sed -i -e 's/Types: deb/Types: deb deb-src/g' /etc/apt/sources.list.d/*.sources \
    && cat /etc/apt/sources.list.d/ubuntu.sources \
    && apt-get update
RUN ls *.deb && dpkg -i libfcl*.deb
RUN apt-get build-dep dart -y
RUN apt-get update \
    && apt-get source dart
RUN cd dart-6.1* \
    && dpkg-buildpackage -j6 || true
  1. run test with make -j1 test ARGS\+=--verbose ARGS\+="-R test_MjcfParser"

An easier approach could be just take the STL files from the Dart project and create a minimal test program. The base_link_collision.stl was the one that first failed on my test.

Expected behavior
The file is detected as a binary STL file.
xplain your problem.

Platform (please complete the following information):

  • OS: Ubuntu Noble / s390 architecture

Additional context
Note that this is not the only problem related to assimp on s390, see #4788

@j-rivero j-rivero added the Bug Global flag to mark a deviation from expected behaviour label Mar 19, 2024
@kimkulling kimkulling added the STL Bugs related to the STL format. label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour STL Bugs related to the STL format.
Projects
Status: No status
Development

No branches or pull requests

2 participants