Microsoft Visual C++ Runtime Library
Started by 1GTV




9 posts in this topic
1GTV
Unregistered


 
02-09-2015, 04:51 PM -
#1
How to fix it? Goes to the latest versions of the emulator.
ssshadow
Administrator
*******


4
2,494 posts 63 threads Joined: Aug 2017
02-09-2015, 05:11 PM -
#2
Just means the emulator has crashed, because you know, it isn't finished and only runs like 1 real game.

https://github.com/DHrpcs3/rpcs3/wiki/FAQ
Bigpet
Unregistered


 
02-10-2015, 02:23 AM -
#3
For this specific error, the game passed a stack_size of 0 to the create thread call, this causes some default value on a real PS3 but we don't know what that default value is. I wanted to compile a sample to test on a real PS3 but I didn't get around to it yet.

So if anyone wants to test what happens when you call sys_ppu_thread_create with a stack size of 0 on a real PS3 that would be helpful
fleur
Unregistered


 
02-10-2015, 08:36 AM -
#4
I hope this might help somehow.
https://social.technet.microsoft.com/For...ovistaapps
Bigpet
Unregistered


 
02-10-2015, 12:52 PM -
#5
lol what? No, we know why this happens, I just explained it to you. It's literally programmed to fail right here: https://github.com/DHrpcs3/rpcs3/blob/e5...ad.cpp#L87

If you want to hot-fix it locally just go to this file here: https://github.com/DHrpcs3/rpcs3/blob/e5...d.cpp#L189

and add
Code:
if(stacksize == 0) stacksize = 0x100;
there. Like I said, we just don't know what the right value is.
Nekotekina
RPCS3 Developer


0
137 posts 5 threads Joined: Aug 2017
02-10-2015, 08:10 PM -
#6
Does it fail after opening a game, or after calling sys_ppu_thread_create()?
syphurith
Unregistered


 
02-11-2015, 07:47 AM -
#7
(02-10-2015, 12:52 PM)Bigpet Wrote: lol what? No, we know why this happens, I just explained it to you. It's literally programmed to fail right here: https://github.com/DHrpcs3/rpcs3/blob/e5...ad.cpp#L87

If you want to hot-fix it locally just go to this file here: https://github.com/DHrpcs3/rpcs3/blob/e5...d.cpp#L189

and add
Code:
if(stacksize == 0) stacksize = 0x100;
there. Like I said, we just don't know what the right value is.
(A bit obfuscated saying. Somewhere in doc)
Quote://Stack memory: allocated in 4KB units.
if (stacksize%4096) stacksize = ((int)(stacksize/4096)+1)*4096; // Bytes for UserMemory
Surely 0x0100 is less than 4KB, why not try modify the amount to 0x1000 instead? And from "include", there is "PTHREAD_STACK_MIN" which is defined as 4096 (0x1000). Eh.. The implementation of sys_ppu_thread_create is not so accurate as it may be..
Bigpet
Unregistered


 
02-11-2015, 01:54 PM -
#8
(02-11-2015, 07:47 AM)syphurith Wrote: Surely 0x0100 is less than 4KB, why not try modify the amount to 0x1000 instead? And from "include", there is "PTHREAD_STACK_MIN" which is defined as 4096 (0x1000). Eh.. The implementation of sys_ppu_thread_create is not so accurate as it may be..

I read that section too and thought that to myself but I can't be sure without either testing it on a real PS3 or disassembling the lv2 lib.

And yeah, most of the lv2 function that are implemented are really inaccurate at the moment. Very few even return all of the possible errorcodes given in the SDK.
syphurith
Unregistered


 
02-11-2015, 03:11 PM -
#9
(02-11-2015, 01:54 PM)Bigpet Wrote:
(02-11-2015, 07:47 AM)syphurith Wrote: Surely 0x0100 is less than 4KB, why not try modify the amount to 0x1000 instead? And from "include", there is "PTHREAD_STACK_MIN" which is defined as 4096 (0x1000). Eh.. The implementation of sys_ppu_thread_create is not so accurate as it may be..

I read that section too and thought that to myself but I can't be sure without either testing it on a real PS3 or disassembling the lv2 lib.

And yeah, most of the lv2 function that are implemented are really inaccurate at the moment. Very few even return all of the possible errorcodes given in the SDK.

Well i only doubt why that is 0x100 but not 0x1000 selected, while 4KB is the smallest allocation unit. Just add a 0 may solve the problem, even you don't know why now - but you may get its reason later. I searched the web for some tips about how to programmatically get the stack size or overflow it to get its size, but without luck today.

Have fun developing it, devs.
PSX: PPC code is a little weird for one known ARM (Thumb). But i admit i don't know much about even x86.
PS2: PTHREAD_STACK_MIN is a macro defined in ppu toolchain's "pthread.h". So i even thought about trying to allocate 4096 bytes of ram in one thread and to see what happens with 4097+ bytes in another. That is a stupid way i admit..
PS3: I've reinstalled the os on my pc, and lost all those f**king MSVC.. Tired of waiting for the whole afternoon for MSVS installation..
syphurith
Unregistered


 
02-18-2015, 06:32 PM -
#10
(02-11-2015, 01:54 PM)Bigpet Wrote:
(02-11-2015, 07:47 AM)syphurith Wrote: Surely 0x0100 is less than 4KB, why not try modify the amount to 0x1000 instead? And from "include", there is "PTHREAD_STACK_MIN" which is defined as 4096 (0x1000). Eh.. The implementation of sys_ppu_thread_create is not so accurate as it may be..

I read that section too and thought that to myself but I can't be sure without either testing it on a real PS3 or disassembling the lv2 lib.

And yeah, most of the lv2 function that are implemented are really inaccurate at the moment. Very few even return all of the possible errorcodes given in the SDK.

I made a dirty hack about this minutes ago. Now it can automatically increase the stack size of created ppu thread (round up to products of 4KB). Along with the LLVM build of the version there is a test file, which is only designed to call pthread_attr_getstacksize to have a so-called stack size, while the main ppu thread create the test threads with specified stack size. I haven't contacted anyone for testing the SELF though, and would looking forward for its result.
Since i don't know which game OP tried to experience i can't tell if this would really fix the problem.
Download the build here: http://rghost.net/private/885SgSMFJ/b38d...3ec228227d (only 30 days, private)
BTW you may have to get the newest version of 7zip to unzip the archive..


Forum Jump:


Users browsing this thread: 1 Guest(s)