[GH-ISSUE #109] VirtualGui backend (SDL & TURTLE) based applications crash. #52

Open
opened 2026-05-05 03:36:25 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @ismail-yilmaz on GitHub (Oct 15, 2022).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/109

VirtualGui applications (both SDL and TURTLE) crash when setting window caption or rendering text with draw routines.

reproducible: always
platform: Linux
compiler: GCC & CLANG
Upp: Nightly

Example:

#include <VirtualGui/SDL2GL/SDL2GL.h>

using namespace Upp;

class MyApp: public TopWindow {
public:
    MyApp()
    {
		Zoomable().Sizeable().SetRect(0, 0, 320, 200);
    }

    void Paint(Upp::Draw& w) override
    {
        w.DrawRect(GetSize(), SWhite);
   //   w.DrawText(10, 10, "helloworld", StdFont(), Magenta); // works
        w.DrawText(10, 10, "hello world", StdFont(), Magenta); // crashes

   //    w.DrawText(10, 10, "hello worll", StdFont(), Magenta); // works

   //    w.DrawText(10, 10, "a world", StdFont(), Magenta); // works
   //    w.DrawText(10, 10, "ab world", StdFont(), Magenta); // crashes
    }
};

CONSOLE_APP_MAIN
{
	SDL2GUI gui;
	gui.Create(RectC(0, 0, 1280, 800), "Crash Test");

	RunVirtualGui(gui, [] {
		SetLanguage(LNG_ENGLISH);
		SetDefaultCharset(CHARSET_UTF8);
		MyApp().Run();
	});
}
Originally created by @ismail-yilmaz on GitHub (Oct 15, 2022). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/109 VirtualGui applications (both SDL and TURTLE) crash when setting window caption or rendering text with draw routines. reproducible: always platform: Linux compiler: GCC & CLANG Upp: Nightly Example: ``` #include <VirtualGui/SDL2GL/SDL2GL.h> using namespace Upp; class MyApp: public TopWindow { public: MyApp() { Zoomable().Sizeable().SetRect(0, 0, 320, 200); } void Paint(Upp::Draw& w) override { w.DrawRect(GetSize(), SWhite); // w.DrawText(10, 10, "helloworld", StdFont(), Magenta); // works w.DrawText(10, 10, "hello world", StdFont(), Magenta); // crashes // w.DrawText(10, 10, "hello worll", StdFont(), Magenta); // works // w.DrawText(10, 10, "a world", StdFont(), Magenta); // works // w.DrawText(10, 10, "ab world", StdFont(), Magenta); // crashes } }; CONSOLE_APP_MAIN { SDL2GUI gui; gui.Create(RectC(0, 0, 1280, 800), "Crash Test"); RunVirtualGui(gui, [] { SetLanguage(LNG_ENGLISH); SetDefaultCharset(CHARSET_UTF8); MyApp().Run(); }); } ```
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#52
No description provided.