Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Packaged game crash when loading level (Access violation - code c0000005)

My packaged game works fine, but it crashes 8 times out of 10 when I load a specific level.

Here is my crash report :

MachineId:800837C847A4628419CFD1AF5676931A EpicAccountId:8d3b33a34344460bba37b3c32f561d29

Access violation - code c0000005 (first/second chance not available)

UE4Game_Win64_Shipping!TBaseMulticastDelegate::Broadcast() UE4Game_Win64_Shipping!TGraphTask::ExecuteTask() UE4Game_Win64_Shipping!FNamedTaskThread::ProcessTasksNamedThread() UE4Game_Win64_Shipping!FNamedTaskThread::ProcessTasksUntilQuit() UE4Game_Win64_Shipping!FTaskGraphImplementation::WaitUntilTasksComplete() UE4Game_Win64_Shipping!FPhysScene::WaitPhysScenes() UE4Game_Win64_Shipping!FPhysScene::EnsureCollisionTreeIsBuilt() UE4Game_Win64_Shipping!UWorld::FlushLevelStreaming() UE4Game_Win64_Shipping!UEngine::LoadMap() UE4Game_Win64_Shipping!UEngine::Browse() UE4Game_Win64_Shipping!UEngine::TickWorldTravel() UE4Game_Win64_Shipping!UGameEngine::Tick() UE4Game_Win64_Shipping!FEngineLoop::Tick() UE4Game_Win64_Shipping!GuardedMain() UE4Game_Win64_Shipping!GuardedMainWrapper() UE4Game_Win64_Shipping!WinMain() UE4Game_Win64_Shipping!__scrt_common_main_seh() kernel32 ntdll

Product Version: UE 4.12
more ▼

asked Sep 16 '16 at 06:57 AM in Bug Reports

avatar image

86 4 6 12

avatar image Matthew J Sep 16 '16 at 03:00 PM

Hello Panelsofsilence,

The main error message that you're getting alludes to a null pointer issue. This is the one I'm talking about:

Access violation - code c0000005 (first/second chance not available)

Could you check to ensure that anything you're doing with pointers is checking to ensure that the pointer is valid? Otherwise, to try and narrow down where this is, does this issue happen in Standalone Game as well? If so, you could try attaching the Visual Studio debugger to the process before the crash occurs so that you can see what null is being referenced.

avatar image Panelsofsilence Sep 16 '16 at 03:56 PM

Hi Matthew,

Thanks for your answer, I'm just beggining with programation, and I am learning step by step. So I try to get some infos about "pointers", but I don't really understand what they are...

I am almost certain the issue is in my FirstPersonCharacter blueprint.

I am attaching for screenshots of my blueprints. Two are the parts in the Eventgraph where there could be the error, and the third screenshot is the Eventgraph of a fonction that is called in the blueprint :

Could it be related to that?

alt text

avatar image Matthew J Sep 16 '16 at 04:54 PM

From looking at what you've provided, the only thing that seems like it could possibly cause this would be the "Object" result of "Object in Front of Camera". It seems that even if the linetrace fails to touch anything, it'll still try to move forward with the rest of the function and make use of that output, although it is likely null in that scenario. When you try to reference a null pointer, it'll always cause an access violation.

I would suggest setting up a boolean to store the Return Value of the LineTraceForObjects node and then check that before the Branch you currently have directly after it, only executing the rest of the function if it's True. Could go a bit further debugging purposes and add a Print String onto the False end of the branch to let you know it failed.

Edit: Or if you would rather avoid creating another variable, have the function also return a boolean and use that.

avatar image Panelsofsilence Sep 17 '16 at 10:03 AM

Hi Matthew,

I edited my blueprint, setting a boolean variable after the function and using it to execute the rest of it. But it didn't work. I even deleted that part of the blueprint, and the crash is still occuring. So I think it's not related to that.

My guess is that it would more be related to some kind of data cache : I have this windows that appears after the crash and that could suggest that way :

I join you also the crash report.

(I cooked the content of the project before building it, through the editor, so I don't understand the nature of this error message)

alt text

avatar image Panelsofsilence Sep 17 '16 at 10:14 AM

Other weird stuff I have that could cause the crash, when I open the project I have in the Output Log : LogUObjectGlobals:Warning: Failed to find object 'Class None.'

Apart from that I have no error message while PIE or packaging

avatar image Matthew J Sep 19 '16 at 02:35 PM

This seems like it may be caused by the spaces in your folder names. Unreal Editor doesn't do that well with spaces in any form which is why we prevent users from including spaces in their project names. Could you try removing the spaces from your folders that have them, such as "VIRTUAL DREAM CENTER" and "BUILD 2"?

avatar image Panelsofsilence Sep 19 '16 at 07:22 PM

Hi Matthew, Unfortunately removing the spaces in the names of my folders didn't change anything. It's still crashing with the same error message.

avatar image Matthew J Sep 19 '16 at 08:13 PM

Thank you for attempting that. Does this project have code at all? If so, in Visual Studio, what configuration are you using when building the project? If you haven't done it, try packaging for the configuration "Development" or "Shipping" (Not the ones with "Editor" on the end), whichever corresponds with the configuration you're using when you package. You'll need to package again after doing this.

avatar image Panelsofsilence Sep 20 '16 at 08:52 AM

Thanks Matthew, My project only have blueprints scripting (I know nothing yet about C++). So I just installed Visual Studio 2015 and configured it following the UE documentation. Same with the UnrealVSExtension. But now I do not succeed in opening my project in Visual Studio... Sorry I'm a newbie here, but I cannot find how to do that in the online documentation. Should I generate a Visual Studio project in UE?

avatar image Panelsofsilence Sep 20 '16 at 09:05 AM

OK! I created a C++ actor and it opened the project in Visual Studio :)

avatar image Panelsofsilence Sep 20 '16 at 09:42 AM

Ok (sorry for this step by step comments!), so I did a batch build of the project in Visual Studio, with the shipping config, but... I cannot find it now. Where does it go? Did you mean that by packaging in Visual Studio? Not knowing what to do next, I just packaged in the UE editor, and it didn't change anything, still the same crash.

avatar image Matthew J Sep 20 '16 at 03:37 PM

You didn't need to add code to your project if it didn't already have code. If you still have a copy of the project that doesn't have code, I'd suggest going back to using that. If you don't, create a new project and migrate your content from your old project to it.

Adding code when you don't plan to do anything with it will only complicate things and cause you more headaches down the line if you're not sure what to do with it.

avatar image Matthew J Sep 20 '16 at 03:48 PM

Could you take screenshots of your Project Settings > Packaging section for me? Also, what configuration are you packaging for, Development or Shipping? I suggest also trying to run under the PIE setting of "Standalone Window" as this usually has the same behavior as packaged games. See if you get the same issue when using this method.

avatar image Panelsofsilence Sep 20 '16 at 05:49 PM

Hi Matthew, Yes, I played in Standalone Window and there is still the same crash. I join you two screenshots of my packaging settings :alt text (first I was packaging with the "cook only maps" option, but I thought I may cause the crash, so I unchecked the option, but nothing changed)

packaging1.jpg (306.4 kB)
packaging2.jpg (327.2 kB)
avatar image Matthew J Sep 22 '16 at 09:15 PM

Since this is only occurring with one of your maps, could you try removing this map temporarily to see if the crash goes away? If so, could you try creating a new map and then migrating the content from the broken map to the new one? It could be something that can be fixed by migration.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Matthew, It was to difficult, I upgraded my whole project to 4.13, and in 4.13 the crash disappear, hopefully! Thanks for your help, even if we didn't figure the reason of this crash.

more ▼

answered Sep 22 '16 at 11:54 PM

avatar image

86 4 6 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question