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"

Component function changes, Blueprint crash

Windows 10 - Binary Version - 4.10.3

I am using the 3rd person template for my project. On my C++ character class, after some time I replaced the Camera Boom with my custom spring arm component class(I just swapped the class names in code) and overrode the standard character movement component.

Since I got some strange behaviour from both on initialisation functions (InitializeComponent did not work for the spring arm, PostInitProperties not for the movement comp) I overrode BeginPlay for both as an init method. Now both initialised properly, but when I tried to open my character blueprint, the editor crashed.

I found out that this is caused by the BeginPlay override of the spring component class, and replaced it with PostInitProperties, which lets me load the blueprint again.

Product Version: UE 4.10
Tags:
more ▼

asked Feb 21 '16 at 09:00 PM in Bug Reports

avatar image

queelaga
1 1 1 2

avatar image Doug E ♦♦ STAFF Feb 22 '16 at 03:43 PM

Hello queelaga-

I'm not sure I understand what your question is. You mentioned a crash but then it sounds as though you were able to edit the code to fix the crash. Can you elaborate on what exactly you're reporting and what you need help with?

Cheers

Doug Wilson

avatar image queelaga Feb 23 '16 at 09:58 AM

I am able to work around it, but the problem that I can't override the BeginPlay function(without crashing the editor on opening the player BP) remains.

avatar image Doug E ♦♦ STAFF Feb 23 '16 at 02:08 PM

Can I get more information about how you're overriding BeginPlay? If you could also post the callstack and log files from the crash, we can use that to hopefully find where the crash is occurring.

avatar image queelaga Feb 23 '16 at 04:07 PM

I think I figured out where the crash is coming from: For some reason, when I open the player character blueprint (or when I stop the game with the blueprint open in editor) the engine calls the springsarms TickComponent functions(several hundred times). In the tick function, I call two functions that dereference pointers that are supposedly set in the BeginPlay function, which of course does not get called when the game is not running, so nullptr gets called -> crash. I added some checks for the pointers with logs (which is how I figured that out), so it's not an immediate problem any more, but I find this behaviour very odd still. Also, I couldn't reproduce this with the movement component, so I'm not sure what the cause is.

edit: this behaviour only applies as long as BeginPlay is being overridden.

avatar image Doug E ♦♦ STAFF Feb 23 '16 at 04:33 PM

Can you post the callstack and log files from the crash to provide additional information? Also, if you can post the code you're using when you override BeginPlay it will help me setup a recreation of the issue locally.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi queelaga,

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 offer further assistance.

Thank you.

more ▼

answered Mar 01 '16 at 02:45 PM

(comments are locked)
10|2000 characters needed characters left
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