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

Calling init in dll causes heap corruption #3

Open
coodeneko opened this issue May 22, 2024 · 1 comment
Open

Calling init in dll causes heap corruption #3

coodeneko opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@coodeneko
Copy link

I'm embedding zphysics into a dll for some experimenting. When done in the exe itself there is no issue but in the dll I am getting heap corruption.

It's originating somewhere in the JPH_IMPLEMENT_SERIALIZABLE_NON_VIRTUAL(SkeletalAnimation) macro but I haven't a chance to dig into it too much.

It's somewhere deep in mingw's

int __cdecl atexit (_PVFV func)
{
    return _register_onexit_function(&atexit_table, (_onexit_t)func);
}

Curious if anyone else has had much success or ran into this issue. I might dig into it more or I might rework my architecture around this and pass necessary info back into the dll as needed.

@hazeycode hazeycode added the bug Something isn't working label May 22, 2024
@hazeycode hazeycode transferred this issue from zig-gamedev/zig-gamedev Nov 5, 2024
@hazeycode hazeycode changed the title [zphysics] Calling init in dll causes heap corruption Calling init in dll causes heap corruption Nov 5, 2024
@jrouwe
Copy link

jrouwe commented Nov 6, 2024

I did fix some issues compiling Jolt as a dll with MinGW fairly recently:

jrouwe/JoltPhysics@a487dac
jrouwe/JoltPhysics@6416bcf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants