EmuNewz Network
Microsoft Visual C++ Runtime Library - Printable Version

+- EmuNewz Network (https://www.emunewz.net/forum)
+-- Forum: Official Boards for Emunews Affiliated Emu Projects (https://www.emunewz.net/forum/forumdisplay.php?fid=47)
+--- Forum: Official RPCS3 Forum [archive] (https://www.emunewz.net/forum/forumdisplay.php?fid=172)
+---- Forum: RPCS3 - Support & Issue Reporting (https://www.emunewz.net/forum/forumdisplay.php?fid=163)
+---- Thread: Microsoft Visual C++ Runtime Library (/showthread.php?tid=167481)



Microsoft Visual C++ Runtime Library - 1GTV - 02-09-2015

How to fix it? Goes to the latest versions of the emulator.


RE: Microsoft Visual C++ Runtime Library - ssshadow - 02-09-2015

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


RE: Microsoft Visual C++ Runtime Library - Bigpet - 02-10-2015

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


RE: Microsoft Visual C++ Runtime Library - fleur - 02-10-2015

I hope this might help somehow.
https://social.technet.microsoft.com/Forums/windows/en-US/b5d10db8-2980-4fe6-81e0-f232eab4037a/need-fix-for-microsoft-visual-c-runtime-library-runtime-error?forum=itprovistaapps


RE: Microsoft Visual C++ Runtime Library - Bigpet - 02-10-2015

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/e5dd03dbcb042c93f00a112f4b5e0f661245cd81/rpcs3/Emu/Cell/PPUThread.cpp#L87

If you want to hot-fix it locally just go to this file here: https://github.com/DHrpcs3/rpcs3/blob/e5dd03dbcb042c93f00a112f4b5e0f661245cd81/rpcs3/Emu/SysCalls/lv2/sys_ppu_thread.cpp#L189

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


RE: Microsoft Visual C++ Runtime Library - Nekotekina - 02-10-2015

Does it fail after opening a game, or after calling sys_ppu_thread_create()?


RE: Microsoft Visual C++ Runtime Library - syphurith - 02-11-2015

(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/e5dd03dbcb042c93f00a112f4b5e0f661245cd81/rpcs3/Emu/Cell/PPUThread.cpp#L87

If you want to hot-fix it locally just go to this file here: https://github.com/DHrpcs3/rpcs3/blob/e5dd03dbcb042c93f00a112f4b5e0f661245cd81/rpcs3/Emu/SysCalls/lv2/sys_ppu_thread.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..


RE: Microsoft Visual C++ Runtime Library - Bigpet - 02-11-2015

(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.


RE: Microsoft Visual C++ Runtime Library - syphurith - 02-11-2015

(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..


RE: Microsoft Visual C++ Runtime Library - syphurith - 02-18-2015

(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/b38d9226f35b0054973e493ec228227d (only 30 days, private)
BTW you may have to get the newest version of 7zip to unzip the archive..