Jump to content


Photo

Microsoft Visual C++ Runtime Library error constantly


  • Please log in to reply
26 replies to this topic

#16 keithinhanoi

keithinhanoi

    Jarl

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 569 posts

Posted 10 November 2014 - 11:50 PM

I've had a series of the Microsoft Visual C++ Runtime Library error in my game before, and it was also not associated with the Dawnguard Impatience of a Saint \ Arvak quest, because I was getting it on a brand new character.

 

I investigated into it, and it was not at all related to MS Visual C++ being installed in the wrong way. It's just a memory exception error, and the MS VisC++ Runtime Library tries to "catch" the error, but it can't. It's pretty much the same as getting CTDs, really.

 

That all happened to me before Sheson's memory patch fix. I was at my wits end, pulling my hair out.

 

Still, even with the memory patch active, you can make Skyrim go belly up. It depends on what you have set for the memory fix values in the SKSE .ini, and also what your other ENBoost settings are in enblocal.ini. From everything you've described, it sounds as though either Skyrim's allotted RAM or your VRAM is getting gobbled up.

 

If you post any contents of your .ini files, please kindly use the spoiler tags to avoid mega-long forum posts - thanks!


  • 0

#17 z929669

z929669

    Ixian Inventor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,313 posts

Posted 11 November 2014 - 12:23 AM

If you use the default values for SKSE.ini and the STEP-recommended ENBoost setup, you should be good. With your RAM, you could set SKSE memory settings to 1024/512 (I do; default is 768/256 I think). This probably does need to go up just one step under a very taxing VRAM load.



#18 Sarcasm

Sarcasm

    Citizen

  • Members
  • Pip
  • 63 posts

Posted 11 November 2014 - 01:00 AM

When configuring ENBoost, I wasn't sure on one part of the instructions:

 

  • Set VideoMemorySizeMb= ('yes, this should be blank')
  • Set AutodetectVideoMemorySize=true
  • (64-bit env only) Set ExpandSystemMemoryX64=true
  • NOTE: This sets the proper VRAM allocation automatically

"This sets the proper VRAM allocation automatically"

 

How smart is it at doing this? I don't have a lot of VRAM, but I have a lot of RAM. The manual setting allows 64-bit users to combine their RAM and VRAM on VideoMemorySizeMb. Does the auto detect feature only consider VRAM or does it also combine VRAM and system RAM as well?

 

After editing a few lines in ENB on someone else's suggestion, the game has been running for quite a while now, 60- 90 minutes maybe?, without an error. I didn't really change much except disabling autodetectvideomemory and manualy setting VideoMemorySizeMb=16384.

 

I'll try auto detect again and increase the SKSE memory settings

 

My enblocal.ini also has some of the memory settings out of order from how they are presented in STEP. For instance, STEP lists ExpandSystemMemoryX64=true as the last setting in [MEMORY] but in Project ENB's enblocal, it is the first setting in that category. Is this significant? Should I move them in the order step mentions them?

 

  •  

Edited by Sarcasm, 11 November 2014 - 01:05 AM.

  • 0

#19 keithinhanoi

keithinhanoi

    Jarl

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 569 posts

Posted 11 November 2014 - 01:52 AM

I would not say that you don't have a lot of VRAM.

 

Regardless of whether VideoMemorySizeMb is manually or automatically set, it refers to the same thing - memory used for caching textures and object geometry (the 3D information about things being rendered.)

 

If VideoMemorySizeMb is set larger than your physical VRAM, then - if needed - system RAM will also be used to cache data.

 

Whether ENB actually needs to use that much memory for cached data depends on what mods you're using, especially including higher-resolution texture replacers, and where you are located in the game (because some areas require the loading of a lot more textures than other areas.)

 

Although you are unlikely to use it all, manually setting your VideoMemorySizeMb to 16GB when you only have 16GB of system RAM is not a good idea. Skyrim itself has already claimed 4GB, and if ENB tries to use over 12GB of system RAM, well, there's nothing left to do but start using virtual memory (the Windows "swap" file) or just crash - and I haven't even accounted for the RAM that the Windows system itself needs to run.

 

Keep in mind that the Direct X part of the NVidia drivers is probably allotting RAM itself, up to the same as the amount of your VRAM, so in your case, very likely Video memory would show up as 4095MB if you run DXDiag. So, a safe place to start with the VideoMemorySizeMb in enblocal.ini is setting it manually to be the same as your VRAM - so 2048. As a starting point.

 

Then there's the ReservedMemorySizeMB setting in enblocal.ini, which you didn't mention, but which can affect things, as well as EnableCompression.

 

If you do decide to reduce VideoMemorySizeMb and find that the MS VisC++ RL errors show up again, I'd suggest toggling ExpandSystemMemoryX64 from true to false, because it doesn't necessarily "expand" system memory, but rather it changes what part of the memory allotted to Skyrim (TESV.exe) is used for cached data. For some reason, this can cause Skyrim to crash for some people with it enabled and for others with it disabled. So it's worth a try changing it for troubleshooting purposes.

 

Finally, to answer your question about the order of the settings in enblocal.ini - there's no problem with it not matching what you see from STEP, but it certainly makes it easier to check if your order matches. I think the STEP order of the settings is the same as is found in the original ENB binary download copy of enblocal.ini, if I'm not mistaken.


  • 0

#20 Sarcasm

Sarcasm

    Citizen

  • Members
  • Pip
  • 63 posts

Posted 11 November 2014 - 02:10 AM

I see, you're right, dxdiag does list 4022GB of VRAM for Display.

 

Actually I added EnableCompression=true into enblocal on the suggestion of someone on another forum. I set that at the same I set the AllocateMemoryMb to 16384, so I'm not sure which one had the bigger impact. But it seems like the errors stopped when I made those changes. I haven't let it run for more than an hour and a half though to get a good feel for it. What does EnableCompression do exactly?

 

I'm going to change enblocal back to autodetect, and just leave Skyrim on with an idle new character while I go to sleep. Hopefully it will still be running in the morning. I'll check back later with results. Thanks to all the help so far from so many people ! I can only hope this is nearly fixed, but I know to never declare a Gamebryo engine problem as truly fixed.


  • 0

#21 Sarcasm

Sarcasm

    Citizen

  • Members
  • Pip
  • 63 posts

Posted 11 November 2014 - 07:34 PM

The Good News: The runtime errors seem to be gone. I haven't seen them in over a day now.

 

The Bad News: Instead of runtime errors after 30 minutes, now the game just closes after 30 minutes. No error, no "not responding", no message of any kind. The game just disappears.

 

I'm not sure what to think. I've been testing the game a lot today, just letting it run idle. I had it running for hours at a time until about 12 hours ago, but ever since for some reason it crashes after 30 minutes or so. I didn't even change any settings in that time. I'll leave the game running, and when I come back it's not running anymore. No error or crash report or anything, the game just isn't there anymore. I'm going to change the memory patch back to 768/256. I'm really confused, for a while I thought the problem was fixed. But now it seems to be back just in a different way, with the same behavior on auto-allocated memory and on 16382 fixed.


Edited by Sarcasm, 11 November 2014 - 07:37 PM.

  • 0

#22 z929669

z929669

    Ixian Inventor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,313 posts

Posted 11 November 2014 - 09:48 PM

OK, I have to chime in again at this point after now realizing that you had set VideoMemorySizeMb=16384 (!) ... you told enbhost.exe to take all available memory regardless of the requirements of all other competing processes (at least that's what we think).

  • Rule #1: Don't go changing INI settings for ENB, SKSE or even Skyrim based on any information you get on some forum ... We have defined all of the recommended INI settings --that should even be considered-- in the STEP guide. Other guides on this site similarly define settings that can be changed and what they should be changed to. Don't experiment or take any advice from those who spout off recommendations outside the context of a well tested guide like STEP or Skyrim Revisited et al. ... if you DO, then please, please post such details in your posts for assistance.
  • Rule #2: Never forget Rule #1!

Now, in the OP, you mentioned that you followed the STEP Guide ... I respectfully disagree ;) ... if you had, then your game would very likely be running without said errors :yes:

 

Persons wanting to install a guided mod build and play the game: I don't understand why these people don't follow the advice we have outlined in the guide based on thousands of man hours of testing and input from very reliable sources in the modding community (and even that input is not totally trusted prior to validating ourselves). The vast majority of modding "problems" that people post about are a result of not following the guide(s).

 

My advice? Please consider the following:

  1. Uninstall everything related to Skyrim (including Steam)
  2. go the the STEP wiki guide (or one of the other mature guides on this site), carefully read it and follow all advice exactly
    1. Don't do anything extra that is not explicitly directed in the guide and associated notes
    2. Don't skip anything you think seems unnecessary that is explicitly stated in the guide and associated notes
    3. Be sure to follow links within the STEP guide to the ancillary guides and mod pages
    4. Unless you already know everything, read everything!!
    5. Report anything incomplete, confusing, or suspect about the guide in the bug thread (this helps us to improve the guide)
  3. Play and have fun or use the valuable lessons learned by taking the preceding advice to tweak to your heart's content --and report your findings ;)

EDIT: This post addresses only those persons that are trying to mod the game to play the game and not those persons that just want to tweak and test the limits (but this latter group will almost never post for help, because they generally know full well what craziness they are toying with at any given time, causing their game or their box to "blow up")



#23 Sarcasm

Sarcasm

    Citizen

  • Members
  • Pip
  • 63 posts

Posted 12 November 2014 - 03:50 AM

I'd like to reiterate that I did follow the STEP setup for all these utilities to the letter, and SKSE and ENB especially since I know how important yet finicky they are. STEP has been my go-to for setting up both ENB and SKSE since I discovered STEP. Truthfully though, trying out random stuff posted on forums is what got my game running stable for the time being. Whether that changes I'll just have to play and see.

 

From trying the game out for much of the day, I can say as a simple fact that if VideoMemorySizeMb= and AutodetectVideoMemorySize=true  are set as STEP requires, then my game crashes after around 35 minutes without question, no matter what changes are made to other settings. Turning off autodetect and setting VideoMemorySizeMb=16384  resulted in the game running flawlessly for 3 and 4 hours straight in two different tests. Two other tests were interrupted by nosy Windows Update restarting my computer while I was away, but I know they both lasted for at least 2 hours each. Again, setting enblocal.ini as STEP says causes the game to crash on a regular basis after about 35 minutes; you could almost set a clock to it.

 

I'm going to start a game and actually play. If I get no issues after a few days, then I'll come back and mark this as answered. Really though, thanks for all the help that people have provided thus far! I feel like the game is actually playable finally, and that's a huge relief. Hopefully it lasts, ha.


Edited by Sarcasm, 12 November 2014 - 03:51 AM.

  • 0

#24 z929669

z929669

    Ixian Inventor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,313 posts

Posted 17 November 2014 - 07:11 PM

Just use this (I recommend using SMAA, but change EnableProxyLibrary=false if you don't and please don't use any other proxy for the time being).

 

The guide does not define every setting, and I suppose it is possible that your iteration of the file may have some slight differences. If you still get the crashes, then either one of your other setup parameters is different from what we recommend, or there are settings or environment diffs in your setup that we are not accounting for.

Attached Files



#25 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 12,623 posts

Posted 17 November 2014 - 11:36 PM

The mod page needs some updating with better instructions. AutodetectVideoMemorySize=true really shouldn't be used. You can use the ENB Guide: https://wiki.step-pr...ENB#tab=ENBoost



#26 z929669

z929669

    Ixian Inventor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,313 posts

Posted 19 November 2014 - 03:16 AM

@Tech

You should update STEP Guide and mod notes when you have definitive evidence that the settings should be changed, especially since you are getting all of this info from multiple reliable sources now.



#27 FaithVance577lJ

FaithVance577lJ

    Prisoner

  • Members
  • 1 posts

Posted 19 April 2018 - 10:07 PM

If you’re getting Microsoft Visual C++ Runtime Error, you might be able to fix the problem simply by creating a new user account. 
check for other methods here:

  • 0


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users