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

Multiple inhertance crash when iterating over the types after loading the assembly #14

Open
antopilo opened this issue Apr 19, 2024 · 2 comments

Comments

@antopilo
Copy link

After adding more than one inheritance on a class(baseType + interface), Coral crashes after calling type->GetBaseType(); on said type.

C# Example:

public interface IRespawnable { 
    void Respawn() {}
}

public Player : Entity, IRespawnable { }

C++ crash:

m_GameAssembly = m_LoadContext.LoadAssembly(absoluteAssemblyPath);

for (auto& type : m_GameAssembly.GetTypes())
{
	auto baseType = type->GetBaseType(); // Crash here
	std::cout <<  std::string(type->GetBaseType().GetFullName()) << std::endl;
}
@peter1745
Copy link
Contributor

Hmm yeah I can see how this would cause crashing, Coral currently assumes a single base type. I'll see if I can get this fixed

@Th3T3chn0G1t
Copy link
Contributor

Tentative fix in 464fc5f awaiting verification.

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

3 participants