Crashing on std::string concatenation

Post Reply
Dinglebyte
Posts: 2
Joined: Mon Sep 07, 2020 5:10 pm

Crashing on std::string concatenation

Post by Dinglebyte » Fri Jun 20, 2025 2:11 pm

Hello, I recently updated my devkitpro libraries with the windows installer, and now when I run my project, I get a consistent crash in places where I either convert a const char* to an std::string, or I append an std::string to another std::string.

For instance:

Code: Select all

void Foo(const std::string& str)
{
    //...
}

// ...
    static const char* myStr = "Test string 1234567890";
    Foo(myStr);

or like this

Code: Select all

std::string str1 = "SomewhatLongString";
str1 += "Extra";

It seems to happen only when the string length exceeds a certain size (like maybe around 16 characters?).

I was wondering if anyone else has had issues with std::string after the June updates. I tried to make sure to clear all of my intermediate build files after upgrading versions. When I built fresh on another computer I also ran into the same crashes though, so I don't think it's an issue of stale files.

I ran similar string tests inside the wii examples, but they did not crash. Unfortunately I can't provide a minimal test case. Just trying to brainstorm what might be happening or ways I can debug my program.


WinterMute
Site Admin
Posts: 2074
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Crashing on std::string concatenation

Post by WinterMute » Mon Jun 30, 2025 8:33 pm

Are you using libraries other than libogc?

If you can provide a project that exhibits this problem we can take a look. It might be difficult without a minimal testcase but we'll certainly take a look.

Help keep devkitPro toolchains free, Donate today

Personal Blog

Dinglebyte
Posts: 2
Joined: Mon Sep 07, 2020 5:10 pm

Re: Crashing on std::string concatenation

Post by Dinglebyte » Fri Jul 04, 2025 2:54 pm

Yes, I am using a few other libraries other than libogc: Bullet, Lua, and Vorbis.

My project is pretty big, but I think I have pretty decent install instructions. I would definitely appreciate it if you can take a look, but obviously no problem if you can't.

This is the engine:
https://github.com/mholtkamp/octave

And this is a sample game project:
https://github.com/mholtkamp/octo-bombers

You can load the project in the Editor and then package it for "Embedded Wii". Launching the Editor requires Vulkan support, but it's required for building the game since it cooks assets (like compressing textures with gxtexconv).

I'll try to provide some more info when I get home.


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests