Announcement

Collapse
No announcement yet.

Infinite Loop Detected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Infinite Loop Detected

    Hey!

    Im pretty new to unreal engine 4, im trying to make a inventory system but i get this when im trying to start my game.

    http://gyazo.com/d3f0637088f418cfb34ab1314d641051

    I would appriciate every help i could get! THANKS

    #2
    Could you show the place (or places) where this function is called?

    Sadly this error message does not tell you where exactly something happens but only where the engine found it which may or may not be accurate

    Comment


      #3
      What do you mean? When i press the stuff it leads to the thing i screenshotted

      Comment


        #4
        Yes but the debugger just shows you the place of the code which is run in an infinite loop not actually the place where it's caused since it could already prevent that while compiling in that case. It's just an estimate and you'll have to investigate.

        The picture you showed is the function "ScaleToRatio". Now to help you I'd need the places where you call this function since I'm ~99% sure it's caused there and not inside of this function

        Comment


          #5
          http://gyazo.com/0b2a1d8219e4f3f0f1dc2b74a9fe3675

          Comment


            #6
            Now we know for sure it's not inside of the scale to ratio function itself.

            Could you show some pictures of where you call that function? (Inside the code. Like the places where you created a node with the name of your function).

            Comment


              #7
              http://gyazo.com/4c8983a67b7b4976650a31249b099cc6

              http://gyazo.com/b283f298de4c4bfc9b0c25e251113988

              http://gyazo.com/b3116df55b19ee386b3e2f15004ffd4d

              As i followed a tutorial i forgot where i put it and im very bad at blueprints, but it might be one of these.

              Comment


                #8
                So far it looks pretty legit. Could you show me the "Hotbar 2" script as well?

                And in general: Stuff that doesn't have an exec pin (the white line) can't cause this issue. The exec line is the only interesting thing right now

                Comment


                  #9
                  http://gyazo.com/fa719cccf1007598325e0e0c44fa6cf2

                  i think its somewhere here then

                  Comment


                    #10
                    When i remove that IsValid it works, but i need to have it.

                    Comment


                      #11
                      Alright there we go.

                      You've created a recursive function (or in other words an infinite loop). Whenever HotBar 2 is called it does what it should do and at the end you call the function "HotBar 2" (itself) so it will just infinitely repeat it. Remove that and you're fine.

                      Comment

                      Working...
                      X