Getting access violation error on BlueprintImplementableEvent

Howdy,

Ok, so I am having a problem with using a BlueprintImplementableEvent. I run my editor through Visual Studio. Within the Editor, I created a new c++ class that derives from UUserWidget. This class is used as a base class for a popup system in my game. Once I coded the class, I created a blueprint from it inside the editor. I then take a UserWidget blueprint that I had already created and re-parent it with this new blueprint of the base class.

In the c++ code for the base class, I create a BlueprintImplementableEvent. I call the event from another function within the same base class code. The first time I call the event, it works just fine. The second time, however, I get the same access violation every time:

(UE4Editor-CoreUObject.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0x0000000000000010.

At present, the event looks like this:

UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Popup Event")
		void Toggle_Popup_Event(const uint8 _ind, const bool _state);
};

My stack trace points to a line in the .generated.cpp file for my overall project.

void UGame_Popups::Toggle_Popup_Event(const uint8 _ind, bool _state)
	{
		Game_Popups_eventToggle_Popup_Event_Parms Parms;
		Parms._ind=_ind;
		Parms._state=_state ? true : false;
		ProcessEvent(FindFunctionChecked(GAME_Toggle_Popup_Event),&Parms);
	}

It points to the ProcessEvent line. I have placed a break on this line and there was acceptable data for both the GAME_Toggle_Popup_Event and &Parms. The GAME_Toggle_Popup_Event had the same data as it did during the first, successful run of this event. I figure this is basically just the memory location of the event so it seems correct that it should be the same through subsequent calls. The Parms showed the appropriate changes between the two calls as well. If I try to Step Into the function when I place a break on it, it instantly gives me the error.

On the editor side, I have utilized the event inside the base class blueprint originally. I also tried utilizing it in the re-parented “derived” blueprint but got the same error.

This is really frustrating as I have many other blueprintimplementableevents in my code and they work just fine. Granted, none of them are in base/derived class situations like this though.

I am using Visual Studio 2015 and am on Unreal version 4.14.

If you need any more information, please feel free to ask.

Hey maxxumas-

Can you provide the full callstackand log files from the crash? Is the UFUNCTION in the base C++ class or the child class? Just to make sure I followed your workflow properly, please let me know if this setup is accurate:

C++ Base Class → Child class → Blueprint → Re-parented blueprint

If you’re able to reproduce this crash in a new project, can you also provide either the setup steps that cause the crash or provide the sample project showing the crash?

Hi , thanks for the reply. I will try to reproduce this in a sample project.

For the time being I just re-worked my program a bit so I didn’t need to do the event.

To answer your question about the flow, I did C++ Base Class → Blueprint → Re-parented blueprint. There was no direct c++ child class. Just the re-parented blueprint.

Sorry if calling it a base class was a bit confusing. Whenever I make a blueprint from c++, I always just sort of view them as one entity so this re-parenting felt like a ‘child’ class. Not sure if that’s a good practice or not hehe.

I appreciate the speedy reply and will get back to you as soon as I can

Hey maxxumas-

Sorry for the delayed response, I was wondering if you were still having the access violation errors problem? Is so, can you provide the full callstack and log files? Additionally, where are you making the call to your BlueprintImplementableEvent? If you have found a solution for your problem, please post it here in case others searching for the same issue can use your solution.

Hey maxxumas-

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Cheers