Amerio.Stephane Posted March 25, 2023 Share Posted March 25, 2023 Hi, this is some seriously unexpected crash String a = String::format("%s %0.8f %0.12f %0.12f %0.8f %0.8f %0.8f %0.8f\n", "abc", 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f); Log::message(a.get()); String b = String::format("%s %0.8f\n", "abc", 1.f); Log::message(b.get()); String c = String::format("%s\n", "abc", 1); // OK, the '1' is ignored Log::message(c.get()); String d = String::format("%s\n", "abc"); // CRASH Log::message(d.get()); Output: abc 1.00000000 2.000000000000 3.000000000000 4.00000000 5.00000000 6.00000000 7.00000000 abc 1.00000000 abc Exception thrown at 0x00007FF8B25350B3 (Unigine_double_x64d.dll) in ig_x64d.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. If the format string contains one %s and the va_list only contains the char pointer, then it will crash. Link to comment
silent Posted March 27, 2023 Share Posted March 27, 2023 Hi Stephane, Thanks for the bug report. Indeed it was quite unexpected behavior :) I've filed a bug in our internal issue tracker, and I think it's safe to assume that it would be fixed prior to the upcoming 2.17 release. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts