Crashing on std::string concatenation

Post Reply
Dinglebyte
Posts: 1
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: 2068
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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest