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

Switch the vector type to EASTL #8

Open
0xC0000054 opened this issue Jan 2, 2024 · 1 comment · May be fixed by #11
Open

Switch the vector type to EASTL #8

0xC0000054 opened this issue Jan 2, 2024 · 1 comment · May be fixed by #11

Comments

@0xC0000054
Copy link
Collaborator

0xC0000054 commented Jan 2, 2024

I have been testing a few of the methods that take or return std::vector, e.g. cISC4BudgetSimulator::GetAllGroups and cISC4TractDeveloper::GetActiveStyles. These methods cause the game to crash when accessing the internal layout of the C++ type.

I fixed the crash by switching the vector type to the EASTL equivalent, which has the internal layout that SC4 expects.
I configured EASTL to use SC4's cIGZAllocatorService for its memory management, which appears to be what the game's vector type uses on Windows.

@0xC0000054 0xC0000054 changed the title Switch the standard library collection types to EASTL Switch the vector type to EASTL Jan 3, 2024
@0xC0000054
Copy link
Collaborator Author

After further testing, a few of the other EASTL types (list, set) crash or return no data.

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

Successfully merging a pull request may close this issue.

1 participant