Skip to content

clipping long text crashes in vita2d_draw_texture_tint_part_scale #54

@mmozeiko

Description

@mmozeiko

Not sure if I'm using clipping functionality wrong, but I cannot get it to work without crashing application.
When it crashes it is either in vita2d_draw_texture_tint_part_scale function (according to address from dump file). Or it the crash completely locks up Vita and only thing that helps is hard reboot. Not sure if GPU driver crashes or smth like that (the dump file has GPUCRASH in name).

Here's a reduced example that crashes inside vita2d_draw_texture_tint_part_scale function:

#include <vita2d.h>
#include <psp2/kernel/processmgr.h>

int main()
{
	vita2d_init();
	vita2d_pgf* font = vita2d_load_default_pgf();

	for (;;)
	{
		vita2d_start_drawing();
		vita2d_set_clear_color(RGBA8(0, 0, 0, 255));
		vita2d_clear_screen();

		uint32_t color = RGBA8(255, 255, 255, 255);
		for (int i = 0; i < 400; i++)
		{
			vita2d_enable_clipping();
			vita2d_set_clip_rectangle(i, i, i + 20, i + 20);
			vita2d_pgf_draw_text(font, i, i, color, 1.f, "TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT");
			vita2d_disable_clipping();
		}
		vita2d_end_drawing();
		vita2d_swap_buffers();
	}

	vita2d_fini();
	vita2d_free_pgf(font);
	sceKernelExitProcess(0);
}

Am I using clipping functions wrong? Or is there some other issue with my code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions