-
Notifications
You must be signed in to change notification settings - Fork 2
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
Thread issues ? #2
Comments
no stacktrace? |
@fr500 I managed to fix debug mode (
Looks to me like the issue comes from |
About the thread issue, i'm getting a lot of |
OK, so you require a fscanf implementation for file_stream_transforms? I imagine that would be hard to implement though in file_streams.c - since it has to go through a VFS interface. |
@twinaphex It seems so |
Thanks, i'll test it after work. |
I'm not getting the segfault anymore, there is an infinite looping though. From fscanf reference :
It seems to me it is not happening. |
|
Are you sure ? This function feels extremely similar to
It's still not working (with or without |
Yes, it's similar. The difference is rfprintf calls filestream_vprintf, which does take a va_list. This one looks good to me, but there's a good chance there are non-scanf bugs nearby. Better test it by slapping some printf (or retro_log_cb or whatever) around the scanf calls. I never tested this thing under libretro, I just #defined filestream_tell/etc to ftell/etc and slapped it in a standalone program. |
It would, of course, be possible to turn filestream_scanf into filestream_vscanf and reintroduce the wrapper function. But I recommend sticking with this #define; the fewer functions take varargs or va_list, the better, they're tricky. |
@twinaphex @fr500 I hope you'll be able to help me with this, while i would love seeing this core as a good alternative to emulate saturn games on hardware with low specs, this issue seems out of my league.
speed issue :
On my pentium 2.56Ghz, games that would run at full speed on standalone version will run at around half speed on libretro version.
file_stream_transforms :
When i try to add this code in
yabause/src/cdbase.c
:#ifdef __LIBRETRO__
#include "streams/file_stream_transforms.h"
#endif
as it was in the old yabause-libretro repo, i get segfaults, gdb doesn't help with this one.
random segfaults when closing :
The core crashes sometimes when i close retroarch, i didn't find how to reproduce this consistently, and again gdb doesn't say anything helpful.
My guess
It could be related to threads ? To get this core working i stubbed a few functions from
yabause/src/thr-linux.c
tolibretro/thr-unix.c
(lines 134-180), perhaps they need some changes to work properly in the libretro core ? The first part of the file, which comes from the current yabause libretro core, seems custom made for the libretro core.The number of threads for the libretro core doesn't seem to match at all with what is set in
yinit.numthreads
(also, this value is hardcoded to 4 in the standalone version), at 1 i see 5 threads intop
, at 4 i see 12 threads intop
, above values don't seem to do much difference.I also saw there is a
rthread.c
in the libretro-common repository, is that something that should be implemented when dealing with threads in a libretro core ?The text was updated successfully, but these errors were encountered: