HISE Logo Forum
    • Categories
    • Register
    • Login

    Aborting downloads = paused

    Scheduled Pinned Locked Moved Bug Reports
    23 Posts 4 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by

      Sometimes aborting downloads results in the status being changed to paused and being unable to clear list - even clicking the trash icon doesn't clear it, I have to restart HISE.

      e4c8e681-e33c-4280-a1f1-26c2694b343b-image.png

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          I can see the abort command triggers the stop command. So I'm guessing that since the download is paused it never reaches the isFinished state and won't be cleared from the download queue.

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by d.healey

            Here's a test snippet that demonstrates the issue. Press start to begin downloading a 100mb file. Press stop to abort the download. You'll see the download is paused, the file is deleted, but the paused/aborted download list never clears and won't clear even when pressing the clear button. In my real project the file occassionaly isn't deleted either, I'll try and recreate this in another snippet.

            This problem also happens with the pause and abort control in the server control panel.

            HiseSnippet 1205.3ocsW01aaaCDlxIJqx6ErNr8cA+IEfDE6sztgMLrTaGO3s3Ti31h8gBzQKQGSDIRARpz5EDf8Sa+j1+fsiTuFGGmLiE+Ic7ti74d3w6NOVvCHRIWfrbd0hDBx5Srmrfol2aNlxPC6ir9Ja7TtPseH+8rHNNbeEQpPcWjfkRRHxxZqeVapky1Hyu+9m5hivr.R0RHza3z.xIzXppZ0wG8qznnA3Pxqnw0r9viFFvY83Q7T.VaY2FkfCt.eN4Tr1rF1HqcNNjp3hIJL.Fj01c4gKlLG.Xl8ugJoSiHZgNnIvFks7.dTnFw5UQ8lSiBGWD9RDrKiqHisxHiuzdDMjVtdEo74FEtUdTmOrZrN30oN7Z+vgmUM3scF7dp8j.AMQUoQisO1dHSQDyvvUPcXkYKpwW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xNEJQw3.A+cAYEN0Sf+DyJ.lXl+Hhi8HsraGjoXJ3mca+1nXHk7cAAZpXe.6q1mudC74a1.eNbC74YafOOeC74a2.e9t05itZvKRU73rmIvBiO1zgwx5XS4BSFI5eko4iwC
            
            1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey
              last edited by

              Bump bump - the snippet in the last post demonstates the issue.

              Matt_SFM ustkU 2 Replies Last reply Reply Quote 0
              • Matt_SFM
                Matt_SF @d.healey
                last edited by

                @d-healey Hi, I tried your snippet and faced the same issue. I wish I could be of some help but I didn't find any solution.
                As you said it seems that the file won't be cleared if its state is not set to 'isFinished'.

                I recently watched your c++ tinkering video and started to take a look at HISE's source code, so here it is :
                Tell me if I'm completely wrong, but in ScriptingApiObjects.cpp line 649 is this function :

                bool ScriptingObjects::ScriptDownloadObject::abort()
                {
                	shouldAbort.store(true);
                	return stop();
                }
                

                Wouldn't it be possible to add something like that to set the aborted download to Finished ?

                data->setProperty("finished", true);
                

                Really I don't know c++, I'm just taking a shot here :grinning_face_with_sweat:

                Develop branch
                Win10 & VS17 / Ventura & Xcode 14. 3

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Matt_SF
                  last edited by

                  Thanks Matt, I already had a look at the C++ myself but I quickly got lost. The abort function calls the stop function which triggers the pause action and some other stuff. I shall wait for master Christoph :)

                  Matt_SFM 1 Reply Last reply Reply Quote 1
                  • Matt_SFM
                    Matt_SF @d.healey
                    last edited by

                    @d-healey said in Aborting downloads = paused:

                    I already had a look at the C++ myself but I quickly got lost.

                    I thought you did. I ended up a bit lost too among these functions 😆

                    Develop branch
                    Win10 & VS17 / Ventura & Xcode 14. 3

                    1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @d.healey
                      last edited by ustk

                      @d-healey Just examined the source, it appears that abort is just a stop with delete file. I partly fixed it but the callback's still fired every 500ms... Will tell if I get somewhere ;)

                      EDIT sorry I started the message long ago so I haven't seen you looked at the code already :)

                      Can't help pressing F5 in the forum...

                      1 Reply Last reply Reply Quote 1
                      • ustkU
                        ustk
                        last edited by ustk

                        I should add that everything works if you call a clean after abort. so it is usable with a simple fix.
                        But it would be better handled automatically. Having a look...

                        Can't help pressing F5 in the forum...

                        1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk
                          last edited by ustk

                          Another problem, with a bad connection, the download often passes to "finished" state, with no resume option (except clean and start again). A timeout safety could be good, like waiting 10sec before declaring a download stopped (so internally it is not finished and could be resumed manually after fixing the "bad connection))

                          Can't help pressing F5 in the forum...

                          1 Reply Last reply Reply Quote 1
                          • d.healeyD
                            d.healey
                            last edited by

                            Bump bump @Christoph-Hart :)

                            1 Reply Last reply Reply Quote 0
                            • d.healeyD
                              d.healey
                              last edited by

                              @ustk Is this issue solved by your pull request?

                              ustkU 1 Reply Last reply Reply Quote 0
                              • ustkU
                                ustk @d.healey
                                last edited by

                                @d-healey Yes it should be.

                                Can't help pressing F5 in the forum...

                                d.healeyD 2 Replies Last reply Reply Quote 2
                                • d.healeyD
                                  d.healey @ustk
                                  last edited by

                                  @ustk Excellent, I'll try it out!

                                  1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey
                                    last edited by

                                    @ustk Yeah that works great, thanks!

                                    1 Reply Last reply Reply Quote 2
                                    • d.healeyD
                                      d.healey @ustk
                                      last edited by

                                      @ustk said in Aborting downloads = paused:

                                      @d-healey Yes it should be.

                                      Is this still working for you? Seems to be broken in the latest commit for me.

                                      HiseSnippet 1039.3ocsVstiaSDEd7l0.1PKTId.rxubjBNIksEDU.oIYCJhlsQ0sU7upI1i2LZGOi0LiCMTkGRdS3M.Niuj3.YWsJhleD4y8uyEeNdgTDQTJgDY475MYDj0WXGtgqWMdElxQylfrdn8DwuyYBb7DRp.MZSFVoHwHKqV+hQGKmyQE+9qedDlg4Qj8rPn2JnQjWPSo58bWL7WoL1TbL40zzFZewvYQB9XASjC3okceTFN5F70jqvF0NyFY8IWFS0BYnFqIJj04iDwaBWA3qT+2RUzkL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mmqEokuN.LVbYwBRKqK4XXxpXJD8O.QDnMV.
                                      
                                      ustkU 1 Reply Last reply Reply Quote 0
                                      • ustkU
                                        ustk @d.healey
                                        last edited by

                                        @d-healey the pull request has been made on develop and I'm not sure it has been merged… I thought you had merged it yourself on your own branch. Not at my comp to verify…

                                        Can't help pressing F5 in the forum...

                                        d.healeyD 1 Reply Last reply Reply Quote 0
                                        • d.healeyD
                                          d.healey @ustk
                                          last edited by

                                          @ustk Ah that explains it! @Christoph-Hart Mergy mergy please :)

                                          1 Reply Last reply Reply Quote 0
                                          • d.healeyD
                                            d.healey
                                            last edited by

                                            This problem is still there

                                            Peek 2021-12-01 12-38.gif

                                            d.healeyD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            21

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.6k

                                            Posts