Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Felgo Live files changes are not cosing reload

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #18085

    Marcin

    Hi Felgo,
    Maybe it’s not a bug but rather a question.
    How to tell Felgo that it should “clear” the files it scans for changes?

    My story.
    1. Have a project where Felgo live works well(PC).
    2. Move the files around, different directories etc but wasn’t a big issue
    3. On a different PC(Mac) did some changes to that project, push the changes to git
    4. Load the changes(includes completely new files for example) using git on the first PC.
    Result: Felgo doesn’t reload changes after saving files.
    By default it even didn’t want to pick up new changes, which came from git pull, but normal desktop deployment was working fine.
    Currently the only option is to use standard, debug desktop development, because Felgo live doesn’t reload anything and, it looks like, it still reads old files here and there.

    Is there a way I can clear all cache data for Felgo Live, so it picks up new files, some kind of cache clear?
    It affects desktop for sure, didn’t test anything else for now.

    #18088

    Marcin

    Have some update.
    Looks like once I opened another project next to the first one in QtCreator, there are more issues.
    Now Felgo always launches the new project, even if I close it completely in QtCreator, it starts the closed projects still.
    Like it was cached somewhere and live server doesn’t see the old project anymore, despite it is now the only  opened project in QtCreator.

    All applies only to desktop kit on Linux.

    #18102

    Alex
    Felgo Team

    Hi Marcin,

    I am not quite sure if I understand the issue correctly. I’ll try to give you a bit of insights how the system works, maybe there is an explanation for what you are seeing.

    The Live Server is started with a given path to your project workspace. This path is determined by Qt Creator, and matches the path of the currently active project in Qt Creator. Now the Live Server watches the files in the project workspace. If any file changes (there are editors that make soft changes that will not be recognized by the watcher, so use Qt Creator to edit the files), the Live Server sends the file(s) to the Live Client. The Live Client then stores the files in its own application directory and loads them.

    So every time you switch the active project in Qt Creator (e.g. close one then another one becomes active), the Live Server is started with the currently active project. Is this not the case for you?

    Cheers,
    Alex

    #18110

    Marcin

    Hi Alex,
    Thank you for explanation.

    The truth is I could totally brake something hence the issues.
    Later I realized that I had broken pro file(no Config += VPLAY) so maybe Live server didn’t load this version of files?
    Will double check my theory later.
    That could have been the reason behind everything.

    PS.Considering I reported 4-5 things on the forum yesterday, the fact I made only one not clear description, is not that bad 🙂

    #18118

    Alex
    Felgo Team

    Yeah you did great! 😉

    It’s just hard to get a grasp on this issue without actually seeing what’s going on. Keep us updated!

    Cheers,
    Alex

    #18140

    Marcin

    Hi Alex,
    With more and more usage of Felgo Live(desktop app) I am able to “break it” consistently 🙂
    The problem happens mostly with my main game, after a while changes stop to load(the app is restarted on save but new changes are not included) or it just crashes.
    By crashes I mean that live server app works but my game is not started anymore, I need to click the play button on the desktop client.
    Since it’s not a big issue for me now, and I have higher priorities, I will just switch to using old method for time being.
    When I get the time, and the issues still will be there,  will try to separate the problem and report it with example and steps to replicate.

    #18393

    Marcin

    Hi Alex,

    Got more experience with this and I know what is happening, more or less.
    First, it’s not an issue, for me at least.
    Nothing big, really small.

    What I observered.
    1. Open a project in QtCreator, lets say, Platformer project. Currently only platformer project is opened. All works perfectly.
    2. Felgo live server is running desktop kit Platformer game.
    3. While platformer game is run by live server, open another project/close platformer project and open different.
    4. Currently situation is: platformer game is still run by live server(we didn’t close the app) but new active(default) project is new opened(bottom left corner of QtCreator).
    5. In this situation Felgo Live server is not aware new project is the default one and doesn’t react on change in new project files.
    6. Solution? Manually close platformer which is still being run by live server, and click green run button on live server  desktop kit(restart basically desktop kit in live server).
    Now Felgo Live server understand new project is default and all works(reacts to file changes)

    If, while changing default projects, we wouldn’t be running old project app, no issue happens because live server understand default project was changed right away.

    Bottom line: whenever I change default project I close that app running in Felgo liver server and reopen it.
    That’s all.
    For me case closed 🙂

    #18397

    Alex
    Felgo Team

    Hi Marcin,

    thank you very much for this detailed report. The live server is supposed to close and re-open with the active project, anytime you switch it in Qt Creator. On what platform are you seeing this behaviour?

    Cheers,
    Alex

    #18414

    Marcin

    Hi Alex,

    I am using Linux Mint 18.3 with KDE.
    Bloody Linux, right ;p;p

    I hit today the second version of the same behavior, with git.
    I did some changes but didn’t commit them.
    Start the desktop liver server kit, and while the app was running, I did git checkout . outside of QtCreator, what reversed all my not committed file changes.
    Similar scenario, until I manually restarted live server desktop kit, no changes were detected.

    When get some time will maybe check this behavior on Mac.

    #18453

    Marcin

    Sorry, I promise I truly think this is the last time 🙂
    So the issue happens when active project is changed because, for example, we did “File’ -> “Open recent project” and select something new.
    This automatically changes the active project(bottom left corner of QtCreator) but the issues persists in Felgo live server.

    But if I manually change active project by selecting build target(bottom left corner of QtCreator) Felgo live server restart the app, so how it should work.
    So it’s not an issue in this functionality all the time just with actions like opening recent project etc., manual app restart is needed.

    #18454

    Marcin

    I give up.
    Today I can’t always replicate the issue, not sure what is the deciding factor here.
    I give up, don’t bother, it’s really small.
    I spent enough time on that already 🙂

    #18464

    Alex
    Felgo Team

    Hi Marcin,

    thanks for all the info. Never give up, never give in! 🙂

    Regarding the Git issue
    This could be related to how the file watcher is currently implemented. Qt Creator has a pretty invasive way of saving a file, involving creation of intermediate files, which is recognized by our file watcher. Git possibly performs soft changes on files which are not caught by the current file watcher. We plan to update the file watcher to be less dependent on Qt Creator and is able to listen to any for of file operations possible. Until then, we recommend to just restart the live server after changing files from Git.

    Regarding the changing of active project
    To sum this up, this only happened when opening a project from “Recent Projects”, and it does not happen all the time? We were not yet able to reproduce this.

    Cheers,
    Marcin

    #18472

    Marcin

    Hi Alex,
    Thank you for answer.

    Git issue
    Can imagine that. QtCreator is one of the less intuitive IDEs I have ever used to handle files(structure, changes) in general.
    Good there are some improvements coming soon.


    Changes issue

    Only happens when, while changing projects, old project is running in live client(desktop or real device, doesn’t matter).
    Recently there was a time when it started to work, but after few hours went back to old issues.
    So there is something more involved, maybe the fact if project was already opened in current QtCreator session is important etc.
    The truth is, when I will have some time, probably will be able to 100% isolate the problem.
    Since fix is so easy will wait with that.

Viewing 13 posts - 1 through 13 (of 13 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded