Reconnecting integer variable into For Loop crashes editor

Tried to hunt down some other bug, but found this.

How I did it:

  1. Created new project with First-Person blueprint template (any other possibly will work, haven’t tested).
  2. Created new Actor Blueprint.
  3. Added Integer variable with name Number
  4. In construction script added ForLoop node, and connected Number into Last Index pin.
  5. Now when you try to rewire it using Ctrl button on a dot of the Last Index pin, you have very high chances to crash the editor.

Tested on 4.8.1 version.
Here’s also stack trace of a crash.

Unknown exception - code 00000001 (first/second  not available)

"Assertion failed: IsValid() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 698] 
"

KERNELBASE
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_GraphEditor!SGraphPin::OnPinMouseDown() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\grapheditor\private\sgraphpin.cpp:390]
UE4Editor_GraphEditor!SGraphPanel::OnMouseButtonDown() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\grapheditor\private\sgraphpanel.cpp:659]
UE4Editor_Slate!<lambda_2944fcd867c13fce09ac1f6fe9cbe583>::operator()() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:3994]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_2944fcd867c13fce09ac1f6fe9cbe583> >() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:212]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonDownEvent() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:3998]
UE4Editor_Slate!FSlateApplication::OnMouseDown() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:3907]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:1344]
UE4Editor_Core!FWindowsApplication::DeferMessage() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:1711]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:706]
UE4Editor_Core!FWindowsApplication::AppWndProc() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:628]
user32
user32
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:792]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:2323]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Hey Druha,

Thank you so much for noticing this issue within the editor. We actually have a bug out on this one which is referenced as: UE-17211. This bug I tested yesterday in 4.8.2 and it’s been resolved. You should be able to click on the wires with control once 4.8.2 is released. If you notice any other bugs like this, please report them immediately, thanks!

Have a great day! :slight_smile: