CTD on launch caused by ucrtbase.dll with Exception code c0000005

Brief description of the issue: On launch, a black screen appears after a couple of seconds with a spinning circle in the lower right hand corner. A few seconds later, MSFS crashes back to the desktop with no error message.

Checking Windows Event Viewer Application log, I find this:

Faulting application name: FlightSimulator.exe, version: 0.0.0.0, time stamp: 0x5fda32ba
Faulting module name: ucrtbase.dll, version: 10.0.19041.546, time stamp: 0x43cbc11d
Exception code: 0xc0000005
Fault offset: 0x0000000000028565
Faulting process id: 0x38e4
Faulting application start time: 0x01d6da0e1a31d1db
Faulting application path: C:\Program Files\WindowsApps\Microsoft.FlightSimulator_1.12.13.0_x64__8wekyb3d8bbwe\FlightSimulator.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: f572054d-e124-404c-8c72-095c380c5da9
Faulting package full name: Microsoft.FlightSimulator_1.12.13.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

After enabling full dump logging and using WinDbg to analyze the exception, I see this:


  •                                                                         *
    
  •                    Exception Analysis                                   *
    
  •                                                                         *
    

*** WARNING: Unable to verify checksum for amd_ags_x64.dll
*** WARNING: Unable to verify checksum for â– â– â– .dll
*** WARNING: Unable to verify checksum for CoherentUIGT.dll
*** WARNING: Unable to verify checksum for XPlatCppWindows.dll

KEY_VALUES_STRING: 1

Key  : AV.Dereference
Value: NullPtr

Key  : AV.Fault
Value: Read

Key  : Analysis.CPU.mSec
Value: 3983

Key  : Analysis.DebugAnalysisProvider.CPP
Value: Create: 8007007e on THENEST

Key  : Analysis.DebugData
Value: CreateObject

Key  : Analysis.DebugModel
Value: CreateObject

Key  : Analysis.Elapsed.mSec
Value: 41744

Key  : Analysis.Memory.CommitPeak.Mb
Value: 263

Key  : Analysis.System
Value: CreateObject

Key  : Timeline.OS.Boot.DeltaSec
Value: 22688

Key  : Timeline.Process.Start.DeltaSec
Value: 32

Key  : WER.OS.Branch
Value: vb_release

Key  : WER.OS.Timestamp
Value: 2019-12-06T14:06:00Z

Key  : WER.OS.Version
Value: 10.0.19041.1

Key  : WER.Process.Version
Value: 1.12.13.0

ADDITIONAL_XML: 1

OS_BUILD_LAYERS: 1

NTGLOBALFLAG: 0

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

APPLICATION_VERIFIER_FLAGS: 0

CONTEXT: (.ecxr)
rax=0000000000000000 rbx=00000000557c3f62 rcx=0000000000000000
rdx=ffff8006ba4a2410 rsi=0000002ec785c910 rdi=00007ff945b5dbf0
rip=00007ff970f68565 rsp=0000002ec785c878 rbp=0000000000000000
r8=0000000000000103 r9=00007ff945b5dbf0 r10=0000000000000008
r11=0000000000000246 r12=0000002ec785ca40 r13=000001df16ea61c0
r14=0000002ec785f3e0 r15=0000000000000000
iopl=0 nv up ei ng nz na pe cy
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010283
ucrtbase!wcsncpy+0x15:
00007ff970f68565 0fb7043a movzx eax,word ptr [rdx+rdi] ds:0000000000000000=???
Resetting default scope

EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ff970f68565 (ucrtbase!wcsncpy+0x0000000000000015)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000000
Attempt to read from address 0000000000000000

PROCESS_NAME: FlightSimulator.exe

READ_ADDRESS: 0000000000000000

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR: c0000005

EXCEPTION_PARAMETER1: 0000000000000000

EXCEPTION_PARAMETER2: 0000000000000000

STACK_TEXT:
0000002ec785c878 00007ff945939058 : 000001df0ca4af00 0000002ec785c910 0000002ec785c910 0000000000000000 : ucrtbase!wcsncpy+0x15
0000002ec785c880 00007ff9459399fe : 000001df2e082bd0 000001df0ceec850 000000000000002f 00000000ffffffff : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x1c5028
0000002ec785c8e0 00007ff94587954a : 00000000e81be686 0000002ec785f3e0 0000000000000000 00007ff90000003d : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x1c59ce
0000002ec785c990 00007ff9458794b6 : 000001e1698b1460 000001df18580360 0000000000000000 0000000000ae0007 : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x10551a
0000002ec785c9e0 00007ff94592dae4 : 0000002ec785f420 0000000000000000 0000002ec785cb20 0000002ec785f424 : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x105486
0000002ec785ca20 00007ff94592cdfa : 0000002e00000014 0000002ec785f830 00007ff945750000 000001df188d168c : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x1b9ab4
0000002ec785f3e0 00007ff9458d8c3a : 0000002ec785f830 0000002ec785f560 00007ff945750000 00007ff945750000 : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x1b8dca
0000002ec785f460 00007ff9458d5ed2 : 000001df188b0130 0000000000000000 0000002ec785f830 0000000000000000 : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x164c0a
0000002ec785f7d0 00007ff94591555f : 000001df188b0100 000001df188b01b8 000001df00000000 0000000000000000 : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x161ea2
0000002ec785f830 00007ff972487034 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : WwiseLibPCx64P!AK::SoundEngine::PinEventInStreamCache+0x1a152f
0000002ec785f860 00007ff97305d0d1 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : kernel32!BaseThreadInitThunk+0x14
0000002ec785f890 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : ntdll!RtlUserThreadStart+0x21

SYMBOL_NAME: ucrtbase!wcsncpy+15

MODULE_NAME: ucrtbase

IMAGE_NAME: ucrtbase.dll

STACK_COMMAND: ~38s ; .ecxr ; kb

FAILURE_BUCKET_ID: NULL_POINTER_READ_c0000005_ucrtbase.dll!wcsncpy

OS_VERSION: 10.0.19041.1

BUILDLAB_STR: vb_release

OSPLATFORM_TYPE: x64

OSNAME: Windows 10

IMAGE_VERSION: 10.0.19041.546

FAILURE_ID_HASH: {36b88905-bfca-3d38-62dd-754385d58f96}

Followup: MachineOwner

Exact same problem here, exact same way it crashes too, same event viewer log.

2 Likes

Sorry to hear you’re having the same issue buddy but good to hear too. Since that means this clearly is a bug that needs to be addressed rather than something is wrong with our PCs.

I’ve just spent a couple of hours going through all the suggestions that was sent to me by Asobo when I filed a bug report about this. The issue is still there and I just sent them a report of the situation before I came here.

Will be most interesting to see their response and will try to remember to post any updates in here for you or anyone else with the same issue. Might also be a good thing if you too file a proper bug report with them. So they get an even more clear picture this is something affecting multiple customers.

1 Like

Apparently somebody with the same error fixed it by setting app language to En-us
See https://answers.microsoft.com/en-us/xbox/forum/xba_gapp/flight-simulator-2020-crash-ucrtbasedll-exception/e8df9f05-21d4-492a-bc80-47abfd6d06a6

Yep, I saw that too.

In my case though, that’s how I already have it and yet I have the problem.

In the thread where you found that info, I also remember how the last post was made by a guy who just like me already had Eng-US installed and unfortunately no more replies after he mentioned that.

This suggestion was also on the list Asobo support asked me to go through.

Thanks though for the tip!

Does it look exactly like this?

Might be worth removing English United States, reboot and re-add it and get rid (temporarily) of any other language if you have any

I only have and ever had Enlish (United States) installed and yes, that’s exactly what it looks like.

Will grab a screenshot when I’m in front of the PC.

I think what needs to happen here really is for Asobo to get all these CTD etc issues sorted by property addressing the buggy parts of the code rather than keep asking people to perform a myriad of different “work-arounds”. Just to make Asobo’s software work.

Looking at this Eng-US thing for example. Don’t force people to install something they maybe don’t even want on their PCs for whatever reason. Instead, find out why your software doesn’t work without it and fix that part of the code.

Looking at the result I pasted above after analyzing the dump file and an error message such as…

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

… you don’t need to be a developer to conclude something clearly isn’t right. Which all posts in this forum from people with similar issues are evidence of.

People have been struggling with making this game launch and run without crashing ever since it was first released and it’s like I told Asobo in my reply to them, having these kind of severe issues where people are not even able to launch your software, this long after the RTM version, that is not acceptable.

Here’s the screenshot as promised

One more thing. I wonder how many of these CTD issues people are reporting, like the one discussed in this thread, are actually caused by the game code. Versus all code and stuff going on in the background to make sure no one can play this game without a proper license.

Don’t get me wrong. I fully appreciate you want to make sure people don’t steal from you. And I’m a very strong advocate of knowing the difference between mine and yours. Not only for computer licenses but in every regard in life. However, when your measures trying to make sure that won’t happen affect people who really did pay for your product. To a degree where they can’t even launch your product. Then there is a problem.

Looking at this specific example again where the game won’t even launch. This to me feels very much like it could be caused by these secret things going on in the background to make sure I’m a valid user. Compared to issues where the title crashes in-game when you perform a certain action.

Here’s an example of exactly this I posted back in August. Where’s it’s clearly seen all hocus-pocus going on in the background when you play MS titles.

what c++ version you have installed ?

PS : forums search function is a good thing :wink:

I’ve now restored a system image to get back after all the mess with MSFS. So these are the versions I currently have installed. Which are the same I had installed when installing MSFS

However, as part of the instructions from the MSFS Support, I uninstalled all these and replaced them with the latest version. Unfortunately, that failed to address my issue in the same way as all other suggestions in the guide.

The search function in the forum certainly is a good thing. Unfortunately, it didn’t help me in this specific case. I found lots of people having issues with the same dll file. Finding people with also the same exception code and crash scenario though, not so much luck. Or did you find something I missed :wink: ?

Here are the instructions I got from MSFS Support. So you all know what I already tried :wink:

Below you will find the most common solutions to that issue.

Community add-ons
Do not create subfolders in the Community repository. When unzipping and installing community content, make sure to follow the instructions of the content developer.
If you’re unsure what add-on is causing the problem we recommend removing all content from the Community folder and adding the add-ons one by one to find the add-on responsible.
Be aware that installing many Community add-ons (sceneries, liveries, etc…) will increase the loading times.

The issue appears after a Windows 10 updates
If the problem starts after installing a Windows update, uninstall the update to try to resolve the issue.

1. Select the Start button, then select Settings > Update & Security > Windows Update > View your update history > Uninstall updates.
View update history settings
2. Right-click the update you want to remove, and then select Uninstall.

Unplug your USB devices
Unplug any non-essential (or ALL) USB devices that may be plugged in. Once in-game, plug your USB devices again.

Enable PC games to connect to Xbox Live

** (Re) Install Xbox Identity Provider from this page*
** Reboot your computer*

If the problem persists after that, please do the following:

TROUBLESHOOTING

1. Run Microsoft Flight Simulator as Admin
To do so, type “Flight simulator” in the Windows search bar then select “Run as administrator” in the menu.

2. (If missing) Install the English (United States) Language Package and reboot your computer
Microsoft Flight Simulator requires the English (United States) Language Package. To install a new language pack on your system, follow this link: Language packs for Windows

3. Download and install the Xbox (beta) app

** To Download & Install the Xbox app, click here*
** Reboot your computer*
** Launch Microsoft Flight Simulator from the Xbox app*

4. Issues caused by sound drivers

** Change your Sound Output to your Monitor. Later in-game you can switch back any output you want.*

Alternatively:

** Disable Nahimic service in Start Up Task Manager while performing a clean boot – To do so, simply follow the instructions from the Microsoft help-center: https://support.microsoft.com/en-us/help/929135/how-to-perform-a-clean-boot-in-windows*

** Disable Nvidia Sound devices.*

5. Deactivate Windows Defender and/or your firewall

** Open Start. . …*
** Open Settings. . …*
** Click. Update & Security. …*
** Click Windows Security. This tab is in the upper-left side of the window.*
** Click Virus & threat protection. …*
** Click Virus & threat protection settings. …*
** Disable Windows Defender’s real-time scanning.*
** Set game priority to high*
** Turn off any overlays*

6. Check that your antivirus is not causing a conflict with the game

Sample of Virus checkers that have been known to prevent games and apps from launching:

** Kaspersky*
** Trend Micro Maximum Security*
** Comodo Antivirus*
** Sophos*
** Emisoft Anti-Malware*
** Avira*
** Avast*

If your antivirus falsely flagged Microsoft Flight Simulator, remove the file from quarantine then whitelist Microsoft Flight Simulator. To do so follow the instructions from your antivirus manufacturer.

7. Reinstall the App from the Microsoft Store

** To do so, type “Flight simulator” in the Windows search bar then select “Uninstall” in the menu. Click twice.*

** Open the Windows Store app*
** Go to My library, search for Microsoft Flight Simulator*
** Click install*

8. Additional troubleshooting

** Make sure Windows has the latest updates: Select Start , then select Settings > Update & Security > Windows Update > Check for Updates.*

** Follow this guide How to troubleshoot crashes & CTDs at the loading screen.*

Finally, we recommend visiting the official forums and joining our official Discord channel where our growing community of simmers is gathering additional solutions to uncommon problems.

these 0x0000005 code is a general code… it also happens e.g. if you have CTD because hardware failed because overcloacking.

A question, to be sure:
you have NO MODS installed ?

At the moment I have only a reinstall of these xbox app in mind…

1 Like

Nope, I have no mods installed. Fact is there wasn’t even a trace of MSFS on my PC before I installed it via MS Store. So a 100% fresh installation of MSFS.

As for installing/reinstalling the Xbox app, that I’ve already done. That is found under step 3 in the guide above if you have a look. I’ve followed every single steps in the instructions above, line by line. As well as in the How to troubleshoot crashes & CTDs at the loading screen guide.

A word of !!!CAUTION!!! for anyone else finding this info. Be very careful before following the advice to allow Windows to update your device drivers!! This advice is in the How to troubleshoot crashes & CTDs at the loading screen guide under the section UPDATE OR REINSTALL DEVICE DRIVERS

When I followed this advice, my HP Reverb (G1) wouldn’t start anymore. It was like it wasn’t connected anymore even when it was. No matter how many times I tried restarting my PC including shutting it completely OFF and switching it back ON, my HP Reverb was no longer found connected to my PC.

Luckily, I never do these kind of things without first making sure I have a fresh system image backup. Restoring this image, meaning all those MS recommended device driver updates were gone with the wind, my HP Reverb is working just fine again…

I assume this FAQ’s are a mix of Support-Best-Of’s ( not positiv :wink: ) and the result of forum discussions :slight_smile:

In special what you mentioned should not be a recommendation.

We all know these MS-Window Bug which show you absolut none-sense optional drivers which crash your windows or made it instable.

With all of these I have really only the c++ libs in mind… Important is the order: made un-install, restart pc, new install. ( not install it over the old ones ).

But one point I have: you start the game with the HP Reverb (G1) connected ( VR ) ?

PS: if you already wrote that you tried what I mention. It is not bad meaning from me, it’s just hard to read big posts for not native english speakers :slight_smile:

0xc0000005 is an access violation error. It plagued me because I wanted to save drive space by installing the packages to a different location.
Do you have the “OneStore” packages on another drive or a location other than default?
It wasn’t until I moved the 100+Gb OneStore to another location that my CTD’s started.
MS tells you to edit the last line in the User.cfg file to reflect the new location. Don’t do it, you will get CTD with 0xc0000005 errors.
I resolved the problem by using symbolic links to point to the remote OneStore folder. Since I started using symbolic links, no CTD’s whatsoever.
The “official” advice of editing the User.cfg file to point to the new location is complete rubbish. Leave the User.cfg alone and just use symbolic links. It solved my problems.
It seems that Msfs has trouble accessing other drives.

please don’t repeat this text in different threads… If you think it is imporant, then use Links…

EDIT: I forgot the “please” :wink:

That’s exactly what I did, all according to the guide provided by MSFS Support.

That is actually one thing I will try to see if it will make any difference. Last night when I was following the guide, I disconnected all my devices except for my mouse and keyboard. What I didn’t think of though was I have all devices connected via a USB hub…except for my HP Reverb which is connected directly to my PC.

Not sure though how I’m supposed to try out VR in MSFS without having my Reverb connected but it’s certainly worth a shot! Maybe MSFS just needs to launch the first time without having the Reverb connected and then it’s fine to have it connected after that.

No need for any excuses, very nice of you trying to help :slight_smile:

This is interesting information! I’m not really sure what you mean by “OneStore” packages but I did choose another drive than my C: drive when installing MSFS from MS Store. I have a 1 TB SSD with two partitions, a 100 GB C drive for Windows and a second partition for other things such as MSFS in this case.

Unfortunately, I don’t have space enough on the C drive to install MSFS onto that one. Otherwise, it could have been an interesting test for sure! Weird though if installing MSFS to another drive than C would cause issues. Especially since you are offered to pick a drive during the installation of MSFS.

Also, one of the first things you learn when you start playing around with Windows is to only keep stuff related to Windows on the system drive. Where you keep anything else somewhere else. This to avoid mixing up pure OS stuff with other things. Or risking having a misbehaving application create a multitude of log files for example, filling your system drive up with a crashing machine as a result.

If this issue indeed would turn out to be related to what drive you picked for the installation, it wouldn’t surprise me if what is really making that an issue is all the weird security/encryption stuff going on behind the scenes when you run MSFS as previously mentioned with drives with strange looking drive letters etc.

Yes it would appear to be a def bug.
I have the Steam version installed from yesterday and like you have tried all the various tests.
I’m in UK and installed English US language pack and changing default language etc.
i.e. not linked to language or version. (Steam/Microsoft Store/Xbox App etc.)

the “ucrtbase.dll” file seems to be a common factor with this bug which is aparently part of Visual Basic C++ runtimes which like you I have tried installing/reinstalling.

How did you send bug report to Asobo? there doesn’t seem to be a support option on their website?

Yep, this is really quite hopeless :frowning:

To create a support ticket, simply click the Support option at the top of the screen when you’re in here and then pick the Submit a Request option on next screen. Also found at the top of the page.

Just did another go, again installing via the MS Store onto my 100% free of MSFS stuff system. This time without having my HP Reverb connected. Not during the installation, not when trying to launch the game and guess what…still the very same issue.

It was a good idea though! So thanks again for the suggestion @MichaMMA :+1: