Menu

#2388 Invalid previews break further previews

2020.2
NeedInfo
Low
2020-10-14
2020-10-13
legoboyvdlp
No

I'm having a... weird problem with previews in the launcher:

void __cdecl PreviewImageItem::onDownloadError(enum QNetworkReply::NetworkError) failed to download: QUrl("file:///C:/Users/redpa/Documents/FlightGear/Custom Aircraft/A320-family/Splash/wing3.png")
20.36 [WARN]:gui "Error opening C:/Users/redpa/Documents/FlightGear/Custom Aircraft/A320-family/Splash/wing3.png: The system cannot find the file specified."
20.36 [WARN]:gui void __cdecl PreviewImageItem::onFinished(void) failed to read image data from QUrl("file:///C:/Users/redpa/Documents/FlightGear/Custom Aircraft/A320-family/Splash/wing3.png")

I definitely don't refer to wing3.png anymore. I removed that file from the .xml file. A search of all .xml files using Notepad++ shows all references have been removed.

I renamed the TextureCache folder, but it still picked it up, so it's not being cached there.
As well, this is breaking further previews -- after it fails to find wing3.png, it gives up and doesn't load ext1.png or ext2.png (defined after wing2.png in the list of previews -set file).

So 2 problems here -- if I removed wing3.png from the list of previews, why is it still trying to show it? And since it can't find wing3.png, it is breaking all subsequent previews in the list of previews.

Discussion

  • legoboyvdlp

    legoboyvdlp - 2020-10-13
    • labels: --> Launcher, Previews
    • assigned_to: James Turner
     
  • James Turner

    James Turner - 2020-10-13

    The first part I know; we cache preview paths; removing a path won't trigger a cache rebuild, you would need to adjust the -set.xml. Since that's the only normal way to add/change previews :)

    However, of course one missing or problem preview shouldn't break other ones, I'll try to figure out what's going on there.

     
  • James Turner

    James Turner - 2020-10-13
    • status: New --> NeedInfo
     
  • legoboyvdlp

    legoboyvdlp - 2020-10-13

    Ah, that explains it -- I'm using a file that is included from the -set file. (A320-main.xml).

     
  • James Turner

    James Turner - 2020-10-13

    Hmm, I wonder if I can detect that case? The problem is I don't want to scan all aircraft each time, it's quite slow. But maybe I should re-scan when loading the details, for any one aircraft it's quick, just some people have multiple 200+ aircraft directories, and scanning takes 5 or 10 or 20 seconds.

     
  • James Turner

    James Turner - 2020-10-14

    I think what I'll do, is refresh the aircraft data when entering the details view (and maybe some other times); that won't be perfect but should be un-noticeable most of the time.

    This is all kind of an edge case for developers; normally it's hard to change an included file or preview, without the -set.xml also changing, since they are all downloaded at the same time.

     

Log in to post a comment.

MongoDB Logo MongoDB