x

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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

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

Hello all. I am following this tutorial to make a n inventory. Pretty much followed closely (only difference is I am storing the inventory in a Game Instance rather than Character controller.)

https://wiki.unrealengine.com/C%2B%2B_Inventory

I am getting a error and crush when I pick up an PickUpBase object. Report is here:

 LoginId:483efdfe41b0c3bf539825b6b2adf55e
 EpicAccountId:952fa0caa5f442c5a232d6b209904780
 
 Access violation - code c0000005 (first/second chance not available)
 
 UE4Editor_R7_4749!ASPR7GameState::GetItemDB() [e:\ue4\r7\source\r7\spr7gamestate.cpp:19]
 UE4Editor_R7_4749!USPR7GameInstance::AddItemToInventoryByID() [e:\ue4\r7\source\r7\spr7gameinstance.cpp:24]
 UE4Editor_R7_4749!APickUpBase::PickedUpByPlayer() [e:\ue4\r7\source\r7\pickupbase.cpp:31]
 UE4Editor_R7_4749!AR7Character::PickupItem() [e:\ue4\r7\source\r7\r7character.cpp:247]
 UE4Editor_Engine!FInputActionUnifiedDelegate::Execute() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\classes\components\inputcomponent.h:204]
 UE4Editor_Engine!UPlayerInput::ProcessInputStack() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\userinterface\playerinput.cpp:1225]
 UE4Editor_Engine!APlayerController::ProcessPlayerInput() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\playercontroller.cpp:2478]
 UE4Editor_Engine!APlayerController::TickPlayerInput() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\playercontroller.cpp:4229]
 UE4Editor_Engine!APlayerController::PlayerTick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\playercontroller.cpp:2142]
 UE4Editor_Engine!APlayerController::TickActor() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\playercontroller.cpp:4323]
 UE4Editor_Engine!FActorTickFunction::ExecuteTick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\actor.cpp:132]
 UE4Editor_Engine!FTickFunctionTask::DoTask() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:273]
 UE4Editor_Engine!TGraphTask<FTickFunctionTask>::ExecuteTask() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:784]
 UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:651]
 UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:560]
 UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:1330]
 UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:542]
 UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1454]
 UE4Editor_Engine!UWorld::RunTickGroup() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:760]
 UE4Editor_Engine!UWorld::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1408]
 UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1659]
 UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:396]
 UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3296]
 UE4Editor!GuardedMain() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
 UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
 UE4Editor!WinMain() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
 UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
 kernel32
 ntdll


If I understand correctly the whole error and crash starts from GetItemDB() function in GameState which is just " return ItemDB; " basically returning the database. I checked some questions about "Access violation - code c0000005" and it seems people suggest checking pointers, however it seems to unrelated for this situation. ? I would really appreciate some help about understanding he crush report here. It has been 2-3 days and I am kinda stuck. Here are my code files if you wish to look at them.

https://www.dropbox.com/s/o2f0aa1tdb9me9s/InventoryCode.rar?dl=0

I am using UE4 4.18.3 and VS 2017 with updates.

Thanks and respects.

Product Version: UE 4.18
Tags:
more ▼

asked Feb 27 '19 at 11:12 AM in C++ Programming

avatar image

TAN_
10 4 3 4

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

1 answer: sort voted first
more ▼

answered Feb 28 '19 at 12:07 PM

avatar image

TAN_
10 4 3 4

(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