Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL2_ttf render functions crash on a real system #45

Open
Mode8fx opened this issue Apr 5, 2022 · 8 comments
Open

SDL2_ttf render functions crash on a real system #45

Mode8fx opened this issue Apr 5, 2022 · 8 comments

Comments

@Mode8fx
Copy link

Mode8fx commented Apr 5, 2022

When using render functions from SDL2_ttf, a program compiles and runs fine in PPSSPP, but crashes on a real system. After compiling the pspdev version of SDL2_ttf, however, these functions work as intended.

For full disclosure, the functions I attempted to run were TTF_RenderText_Solid and TTF_RenderUTF8_Solid, and they were tested on a Vita running Adrenaline.

@sharkwouter
Copy link
Member

Thanks for the report. I'll take a look at what's going on.

@sharkwouter
Copy link
Member

@Mips96 could you do another test and if there is an issue, share the a code example?

@KorigamiK
Copy link
Contributor

@Mips96 could you do another test and if there is an issue, share the a code example?

TTF_RenderUTF8_Blended_Wrapped TTF_RenderUTF8_Blended TTF_RenderUTF8_Solid are tested and see to be working for me.

However the default methods TTF_RenderText_Solid TTF_RenderText_Blended and similar don't work and instantly crash the program on execution. The error can be traced back to sdl_ttf.o using psplink.

I don't mind using the lesser res methods instead of the default methods, but this should at least be mentioned in the docs and should be removed from the header file.

@sharkwouter
Copy link
Member

Thanks for testing @KorigamiK. These function are intended to work, but I personally haven't used them, so I had not run into this. Do you have a small example where this function is used so I can do some testing?

@KorigamiK
Copy link
Contributor

Thanks for testing @KorigamiK. These function are intended to work, but I personally haven't used them, so I had not run into this. Do you have a small example where this function is used so I can do some testing?

Sure, I’ll get back to you

@sharkwouter
Copy link
Member

@KorigamiK have you gotten to making an example? I'd like to work on this tonight and it would be good to have.

@pggkun
Copy link

pggkun commented Oct 20, 2022

@sharkwouter I noticed the same issue. The SDL TTF crashes only on a real device. Here is an example I've made:
https://github.com/pggkun/PSP-SDL-TTF-Sample

The functions I've tested was TTF_RenderText_Solid and TTF_RenderUTF8_Solid
both crashed on a PSP 2000

@sharkwouter
Copy link
Member

So I did some debugging and came to the following conclusions:

So I don't really know how to debug this much further and what is causing this. It might be related with the PSP version of SDL not being able to update textures for some reason. Although that would cause corruption, not crashes, for afaik. So at the end of the day, I don't know.

Since the latest version of SDL2_ttf is not more broken, I am going to update it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants