abc file wont load in Debug mode

31 views
Skip to first unread message

luiz elias

unread,
Jun 2, 2023, 6:53:33 PM6/2/23
to alembic-discussion
Hello, 

I'm trying to build a simple project and everything works fine in release mode but when I switch to debug mode the abc file wond load, the archive.valid() always outputs false.

I have Installed alembic:x64-windows   1.8.3#1 using vcpkg

I'm working on windows x64.

that's my CMakeLists.txt:

cmake_minimum_required(VERSION 3.12)
project(HelloAbc)

set(CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
    CACHE STRING "Vcpkg toolchain file")

find_package(Alembic CONFIG REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE Alembic::Alembic)

and that's how I'm loading the archive:
  Alembic::AbcCoreFactory::IFactory factory;
  Alembic::AbcCoreFactory::IFactory::CoreType oType;
  Alembic::AbcGeom::IArchive archive = factory.getArchive(filePath, oType);

  std::cout << archive.valid()
            << std::endl;  // invalid in debug mode but valid in release mode


Any ideas why? 

Any help is much appreciated!

thanks !

Luiz


Lucas Miller

unread,
Jun 2, 2023, 7:10:23 PM6/2/23
to alembic-d...@googlegroups.com
If the Alembic file is small, can you share it with me?

Also what is filePath set to?

I can't think of a good reason why it would work in release mode but not in debug mode, unless it's something like the file happens to be IN the release directory but not the debug one.

Lucas

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alembic-discussion/d3e60a18-b6b1-4e07-988f-2809e886db66n%40googlegroups.com.

luiz elias

unread,
Jun 2, 2023, 7:18:15 PM6/2/23
to alembic-discussion
Hi Lucas, 
sure!
it's set to const std::string filePath = "C:/Users/luize/Desktop/bola.abc";

it's exported from maya, I'm attaching the file, it's just a sphere, I've tried different files.

I've done this minimal project to try isloating the problem but I can't figure it out, even after spend hours asking chat gpt lol.

thanks for the help,

Luiz
bola.abc

Lucas Miller

unread,
Jun 2, 2023, 7:29:08 PM6/2/23
to alembic-d...@googlegroups.com
Hmmm, that all passes the sanity check, and I took a quick look at that file and that was okay.

I'll try to stand up a Debug windows build with Alembic 1.8.5 to see if I can recreate your issue..

Lucas

luiz elias

unread,
Jun 2, 2023, 7:37:15 PM6/2/23
to alembic-d...@googlegroups.com
Thanks Lucas, 
I think the latest version from vcpkg is 1.8.3#1

those are the settings I have on my CMakeSettings.json

{
  "configurations": [
    {
      "name": "x64-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "buildRoot": "${projectDir}\\out\\build\\${name}",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "",
      "ctestCommandArgs": ""
    },
    {
      "name": "x64-Release",
      "generator": "Ninja",
      "configurationType": "RelWithDebInfo",
      "buildRoot": "${projectDir}\\out\\build\\${name}",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "",
      "ctestCommandArgs": "",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "variables": [
        {
          "name": "CMAKE_VERBOSE_MAKEFILE",
          "value": "True",
          "type": "BOOL"
        }
      ]
    }
  ]
}

I can't think of anything else I could set 

Thanks!




You received this message because you are subscribed to a topic in the Google Groups "alembic-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alembic-discussion/TgOmMwuq_MY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alembic-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alembic-discussion/CAMoRnt4QNDMG-zQEV7z5OTu6xGSDZ42UR6SZFEVZsdEfR0H-cQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages