Empty TimeSpan causes error

Hi there,

It seems that there is a bug with TimeSpan in 4.7.1-2462028.
I did the following:

  • I defined a very simple UObject class:
#pragma once

#include "Object.h"
#include "Timespan.h"
#include "Turn.generated.h"

/**
 * 
 */
UCLASS(Blueprintable)
class WHATEVER_API UTurn : public UObject
{
	GENERATED_BODY()
	
	public:

	 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Time")
	 int32 TurnNumber;

	 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Time")
	 FTimespan TotalTime;

	 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Time")
	 FTimespan ElapsedTime;
};
  • I created a Blueprint based on this class.
  • Edited both defaults to be 01:00:00.000 or any other number, they can also be 00:00:00.000
  • Compiled the BP
  • Editor crashed and steps into the FString FTimespan::ToString() const method. There a nullpointer prevents the execution of the GetDays() method. When I step back one call hierarchy level, it seems that RawData, which should probably contain the textbox value, only contains 0x0000000000000000.

If you need any additional information, let me know :slight_smile:

Hey Stoeoeoe,

Can you be more specific about which build you’re using? Since there’s no 4.8 build in Releases yet, every build in the Master branch after 7.0 is technically 4.8.

We have a known crash (UE-11310) in FTimespan::ToString in 4.7 - could you upload your crash log and the callstack for the crash so I can check to see if you’re experiencing that same crash?

Thanks,

Jonathan

Hi Jonathan,

You are right, of course, sorry for that. I was referring to 4.7.1-2462028, must’ve been a bit too enthusiastic about the new builds…

I uploaded the crash log. I also tried to copy the crash report data, however the Crash Report Client freezed everytime when I focused on the crash report field. So there seems to be something wrong too. I uploaded the DxDiag as well, if that helps

Log file
DxDiag

Hey Stoeoeoe-

I was able to reproduce the crash you mentioned however this has already been fixed on an internal version of the engine. There does appear to be a simple workaround for the current version however. The crash only occurs if the timespan node / variable is selected when you attempt to compile. Deselecting the node or selecting a different node should allow the compile to complete without crashing.

Cheers

Hi ,

Sorry for the late answer. When I tried to compile after updating the default value of the property (even after focusing another element), the editor still crashed. After I closed the “Class Settings”, I could comile though. So, thanks for the hint! When I reopened the settings again, the editor crashed again.
I hope the fix will be included in the next hotfix! :slight_smile: