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

Loading FBX scene causes double free #55

Open
AcrylicShrimp opened this issue Sep 4, 2023 · 2 comments
Open

Loading FBX scene causes double free #55

AcrylicShrimp opened this issue Sep 4, 2023 · 2 comments

Comments

@AcrylicShrimp
Copy link

First of all, thank for this amazing work!

I'm trying to load a FBX scene, but russimp is causing double free.

let scene = {
    let file = std::fs::read("...")
        .unwrap();
    russimp::scene::Scene::from_buffer(
        &file,
        vec![
            russimp::scene::PostProcess::JoinIdenticalVertices,
            russimp::scene::PostProcess::Triangulate,
            russimp::scene::PostProcess::SortByPrimitiveType,
            russimp::scene::PostProcess::SplitLargeMeshes,
            russimp::scene::PostProcess::ImproveCacheLocality,
            russimp::scene::PostProcess::OptimizeMeshes,
            russimp::scene::PostProcess::OptimizeGraph,
        ],
        "",
    )
    .unwrap()
};
my-app(25371,0x1fbef1e00) malloc: Double free of object 0x15c969cc0
my-app(25371,0x1fbef1e00) malloc: *** set a breakpoint in malloc_error_break to debug
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)

The error is coming from:

Scene::drop_scene(raw_scene);

But when I try to load another FBX file, it loads without any issue. I think the actual problem is inside assimp lib. Should I report it in there instead? What do you think?

@jkvargas
Copy link
Owner

jkvargas commented Oct 6, 2023

hi @AcrylicShrimp, I don't have much time to put on russimp right now.
But I am open to accept pull requests.
It is hard to say without going deep into it.

@AcrylicShrimp
Copy link
Author

Ok! I'll investigate and make a PR if I can handle this problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants