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"

Timeline in C++ triggers breakpoint.

I have been following these two links to try and get Timelines to work in C++:

I tried both UTimelineComponent and FTimeline but both ways are triggering a break point when I try to play. Here is a screen shot of the error:

alt text

Edit: I tried initializing the timeline and curve in both the BeginPlay function and the constructor but to the same results.

Product Version: UE 4.18
capture.png (51.5 kB)
more ▼

asked Jan 21 '18 at 09:18 PM in C++ Programming

avatar image

151 27 21 30

avatar image vr_marco Jan 21 '18 at 10:07 PM

Can you tell which exception is being thrown?

avatar image Katianie Jan 21 '18 at 10:24 PM

Doesn't look like an exception per-say, just triggers break point.

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

1 answer: sort voted first

Hey there, you need to see what is the actual cause of the crash, check the Autos tab to see if anything is invalid (especially check the this variable, myDoorRotateComponent and myResetRotationTimeline).

more ▼

answered Jan 21 '18 at 10:00 PM

avatar image

6k 162 129 305

avatar image Katianie Jan 21 '18 at 10:07 PM

Why would it be invalid? I followed the previous tutorials and none of them mentioned this issue. Should I be initializing it by calling initialize component? Because that did not work either :(

avatar image xlar8or Jan 21 '18 at 10:11 PM

Usually crashes like this are from accessing an invalid object, just confirm that that is the case to know how to proceed.

avatar image Katianie Jan 21 '18 at 10:23 PM

All I'm getting is what you see with the triggered break point. I tried it again with UTimelineComponent and here is where it triggered a breakpoint: https://i.imgur.com/NjWCLL6.png

avatar image xlar8or Jan 22 '18 at 12:12 AM

Ok so it seems your timeline is set to null. To confirm you can comment the PlayFromStart command and see if it doesnt crash. If that doesn't crash then it confirms that the problem is indeed in the timeline. When you defined the timeline did you set it to UPROPERTY()?

avatar image Katianie Jan 22 '18 at 02:38 AM

Just tried to set it to UPROPERTY() but I don't think it helped, I still got a triggered breakpoint in the create default sub object. Here is a screen shot: alt text

untitled.png (120.4 kB)
avatar image xlar8or Jan 22 '18 at 10:30 AM

Can you show me where you initialize the timeline?

avatar image Katianie Jan 22 '18 at 01:28 PM

Sure, Here is where I am initializing the curve and the timeline. Its in BeginPlay() :alt text

untitled.png (153.5 kB)
avatar image xlar8or Jan 22 '18 at 01:30 PM

Does the AddInterpFloat code executes? That would mean that the timeline is still valid in the constructor.

avatar image Katianie Jan 22 '18 at 04:54 PM

If I use UTimelineComponent pointer, ue4 triggers a breakpoint on line 59 when I try to CreateDefaultSubobject. If I change it to use FTimeline object, it compiles and runs without error, the issue I see now is that the object is not calling the update function I provided (ResetRotationTimelineUpdateCallback).

avatar image xlar8or Jan 23 '18 at 12:00 PM

When you say triggers breakpoint on line 59, you mean crash?

avatar image Katianie Jan 24 '18 at 04:34 PM

I mean what you see in the first image.

(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