Git Product home page Git Product logo

Comments (7)

guillaumeblanc avatar guillaumeblanc commented on June 10, 2024

Hi,

thanks for reporting the issue.

I think that dangling reference warning is a false positive. The compiler might be confused by the span.

Could you try to remove the ref line 55, and check if everything else compiles ?

Something like :
const ozz::math::SoaTransform soa_transform = _skeleton.joint_rest_poses()[_joint / 4];

Cheers,
Guillaume

from ozz-animation.

 avatar commented on June 10, 2024

Hi,

thanks for reporting the issue.

I think that dangling reference warning is a false positive. The compiler might be confused by the span.

Could you try to remove the ref line 55, and check if everything else compiles ?

Something like : const ozz::math::SoaTransform soa_transform = _skeleton.joint_rest_poses()[_joint / 4];

Cheers, Guillaume

Still the same error.

from ozz-animation.

guillaumeblanc avatar guillaumeblanc commented on June 10, 2024

Can you try copying the span return by _skeleton.joint_rest_poses() then ?

Something like:
`
const auto rest_poses = _skeleton.joint_rest_poses();

const ozz::math::SoaTransform& soa_transform = rest_poses[_joint / 4];
`
or anything that can help understand the issue or confirm the warning is a false positive.

Additionally, adding mingw to the CI could be helpful. If you're used to it, don't hesitate to propose a PR.

Guillaume

from ozz-animation.

 avatar commented on June 10, 2024

Now stuck at:

[46/272] Building CXX object src/animation/offline/tools/CMakeFiles/ozz_animation_tools.dir/import2ozz_anim.cc.obj
FAILED: src/animation/offline/tools/CMakeFiles/ozz_animation_tools.dir/import2ozz_anim.cc.obj
C:\msys64\mingw64\bin\c++.exe -D_CRT_SECURE_NO_WARNINGS -IC:/msys64/home/Administrator/ozz-animation/src/. -IC:/msys64/home/Administrator/ozz-animation/include -IC:/msys64/home/Administrator/ozz-animation/extern/jsoncpp/dist -std=c++11 -Wall -Werror -Wno-ignored-attributes -MD -MT src/animation/offline/tools/CMakeFiles/ozz_animation_tools.dir/import2ozz_anim.cc.obj -MF src\animation\offline\tools\CMakeFiles\ozz_animation_tools.dir\import2ozz_anim.cc.obj.d -o src/animation/offline/tools/CMakeFiles/ozz_animation_tools.dir/import2ozz_anim.cc.obj -c C:/msys64/home/Administrator/ozz-animation/src/animation/offline/tools/import2ozz_anim.cc
C:/msys64/home/Administrator/ozz-animation/src/animation/offline/tools/import2ozz_anim.cc: In function 'ozz::vector<ozz::math::Transform> ozz::animation::offline::{anonymous}::SkeletonRestPoseSoAToAoS(const ozz::animation::Skeleton&)':
C:/msys64/home/Administrator/ozz-animation/src/animation/offline/tools/import2ozz_anim.cc:144:31: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
  144 |     const math::SoaTransform& soa_transform = _skeleton.joint_rest_poses()[i];
      |                               ^~~~~~~~~~~~~
C:/msys64/home/Administrator/ozz-animation/src/animation/offline/tools/import2ozz_anim.cc:144:77: note: the temporary was destroyed at the end of the full expression '(& _skeleton)->ozz::animation::Skeleton::joint_rest_poses().ozz::span<const ozz::math::SoaTransform>::operator[](((size_t)i))'
  144 |     const math::SoaTransform& soa_transform = _skeleton.joint_rest_poses()[i];
      |                                                                             ^
cc1plus.exe: all warnings being treated as errors
ninja: build stopped: subcommand failed.

from ozz-animation.

guillaumeblanc avatar guillaumeblanc commented on June 10, 2024

Hi,
Any progress? Could you propose a PR to fix this compiling issue?
Regards,
Guillaume

from ozz-animation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.