Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Failed to upload file; project keeps refering to non-used image file
QtWS25 Last Chance

Failed to upload file; project keeps refering to non-used image file

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 2 Posters 4.4k Views
  • 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.
  • R Offline
    R Offline
    Rick16bit
    wrote on 2 Oct 2013, 07:47 last edited by
    #1

    Hi there,
    Probably not the first time asked, but this annoying issue keeps popping up once in a while:

    "error: Failed to upload file '/home/ccs/Desktop/...../gauge_CoolantTemp_C_v3.png'.
    "File not found"

    This usually happens when adding an image file to one of the QRC resources (got multiple), and then deleting it again. Even though the file isn't used anymore and nowhere to be found in the Qt project when searching on the filename, it still keeps trying to find this file. Usually it got fixed by putting the file back again (on the disc, not in the Qt project), rebuild stuff, and then after a while it was gone. A bit vague...

    This time the issue is slightly different. The Qt project compiles fine under a Virtual Machine setting. But once I try to deploy it to a (32 bit ARM Linux) device, it keeps nagging about a file again.
    A: The "missing" file just exists, didn't delete it from the disk yet.
    B: The file is nowhere used. Searched through files, removed auto made qrc files (*.o / *.cpp)
    C: did a clean / run qmake / rebuild several times

    So what could be still refering to this file, why can't the deployment process find an existing file, and mist important, how to fix?

    Got to mention that I successfully deployed the same project with many image files many times. No idea how it got stuck now.

    Cheers

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Oct 2013, 10:59 last edited by
      #2

      Hi and welcome to devnet,

      when all else fails, did you also delete the build directory ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rick16bit
        wrote on 2 Oct 2013, 13:01 last edited by
        #3

        Thanks!

        Deleted several files, but probably not everything as you mentioned. I'm kinda new to Qt though, so you could you tell me which files are safe to be deleted? Asides from the directory I made myself, I can't see any particular Build folder. A lot of auto-generated files are placed in the root folder though.

        Using Qt Creator 2.6.0 btw
        Oh, and excuses if I can't try & reply the suggestions quickly. Some minutes ago Windows blue-screened, and that locked up VM-Ware that runs Ubuntu and this project.... Got to find a fix somehow.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 2 Oct 2013, 15:35 last edited by
          #4

          If you are using a shadow build (which should be the default with Qt Creator) you can delete the complete shadow build directory

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rick16bit
            wrote on 3 Oct 2013, 07:50 last edited by
            #5

            Hi again,

            Just recovered VM-Ware with an older back-up, we're up and running again. Though the error described above is still alive hehe.

            Shadow-builds are disabled on this project.

            By the way, why does this image file need to be placed on the remote device anyway? All the image data is inside the Executable file itself, rather than loaded on the fly from the HD. I didn't explicitely tell to deploy this file, other than adding it to a QRC file (and removed it again). Maybe I did something stupid, but it sounds like Qt isn't handling this very well.

            Thanks for helping!

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 3 Oct 2013, 13:02 last edited by
              #6

              Then you have to search for all generated files and remove them.

              Are you sure that you use a qrc path in your code for this file ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Rick16bit
                wrote on 3 Oct 2013, 13:39 last edited by
                #7

                Deleted all files in the root folder except the main.cpp / h, xxx.qrc, and the ui_xxx files. But no success. I find it strange that the image name is nowhere mentioned in any of those files (did a search through ALL files). Not sure if the search will also succeed on binary files though.

                The image path can't be outside the project folder either, because due the VM-ware crash yesterday, I only copied back this folder. If the project was using files outside the project folder, it couldn't refer to this image which was only added very recently.

                qrc path
                The paths are written like ":/images/a.png". Also, when deleting all images on the device, the project still works & shows all images, so it isn't loading anything from its (flash) memory.

                Btw, I think I had this issue in the past as well. I believe I deleted the entire qrc file, and remade it to fix the problem. That might be an eventual work-around, but not a nice one of course.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 5 Oct 2013, 21:27 last edited by
                  #8

                  There must be somewhere some generated files that are not deleted. Are you setting some output folders in your pro file ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    Rick16bit
                    wrote on 8 Oct 2013, 07:36 last edited by
                    #9

                    I bet there are, can't be magic holding up this reference :)

                    Maybe I found it. Indeed, the PRO file refered to folders. Not specifically to this file, but it had this:
                    someFolderFiles.files = SomeFolder/*
                    someFolderFiles.path = /opt/POG_Monitor/SomeFolder
                    INSTALLS += someFolderFiles

                    When commenting it, the project managed to run. But I now missed some other (non image) files, so I re-enabled the code.

                    As for the "fix" then,
                    Although the compiler said it can't find the PGN file, it really is there. So I simply deleted it from the harddrive (actually I had to remove all files in that folder). And now it runs again... Could it be that those files were locked/protected or damaged somehow?

                    Anyway, thanks for helping!

                    1 Reply Last reply
                    0

                    8/9

                    5 Oct 2013, 21:27

                    • Login

                    • Login or register to search.
                    8 out of 9
                    • First post
                      8/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved