yourhead / s3

public info about s3
8 stars 7 forks source link

data loss when using Save As #815

Closed yourhead closed 6 years ago

yourhead commented 6 years ago

Since this involves data loss on unloaded pages I think there's a fair chance this could be a RW bug. I'm logging here just to track until I can simplify and have a workable test case.

To duplicate:

  1. Open PGS test project
  2. Duplicate the last Friday page
  3. Save As
  4. Browse to Mandolin Books page and look at the images.
  5. Save the project again

First guesses: Since this seems to have a lot to do with loaded/unloaded page data my guess is that the duplicate function is causing some page data to be loaded but all pages marked as if they are loaded -- normally this would not be noticed as the data would be loaded when the user visited the pages. However the Save As locks the problem into position.

Unknowns: There does seem to be some special feature of this project file or its contents that is also a catalyst to the issue. I was not able to duplicate the problem on other small project files. I will have to do the long work of slowly cutting this file down bit by bit and retesting to determine if what part of the file is important -- or if it simply files of a certain size/complexity.

To do:

yourhead commented 6 years ago

Photo Album and Collage pages predictably also show the issue. Works with any page that uses the Sandwich-Files API.

yourhead commented 6 years ago

There is nothing magic about the file. I've managed to recreate a simpler version. It just requires some special attention to how the data is added to the photo album pages since photo albums also store a path to their original image location as a last resort if data goes missing.

yourhead commented 6 years ago

Single stepping through the code shows that no stacks or collage code is being called if the pages are never visited or exported -- so it is clearly outside of my control to fix. :-(

yourhead commented 6 years ago

Video showing:

https://www.dropbox.com/s/hxkykvp59iy3pmk/simple-data-loss.mp4?dl=0

yourhead commented 6 years ago

At the last stage when the RW file is saved locking in the dat loss the console logs some pertinent info:

Encountered missing file /Users/iac/Desktop/test.rw/Pages/5-Below/Data/33127FE9-CA95-46DA-B93E-C9D28A72DB6D while freezing a sandwich of type RapidWeaver Photo Album Data
Sandwich filling details:
RMSandwichFilling (0 subsandwiches):
Files:
{
    "33127FE9-CA95-46DA-B93E-C9D28A72DB6D" = "/Users/iac/Desktop/test.rw/Pages/5-Below/Data/33127FE9-CA95-46DA-B93E-C9D28A72DB6D";
}

Dictionary:
{
    FlashSlideshowSettings =     {
        FlickRSSEnabled = 0;
        ImageHeight = 320;
        ImageScalingMode = 1;
        ImageWidth = 460;
        KenBurnsEffectSpeed = 3;
        KenBurnsEffectType = 4;
        ShowCaptions = 0;
        ShowControls = 1;
        ShowProgressIconWhileLoading = 1;
        TransitionPauseTime = 3;
        TransitionSpeed = 1;
        TransitionType = 14;
    };
    HTMLSlideshowSettings =     {
        CaptionsDisplayMode = 1;
        EXIFTagsShown =         (
            ExposureTime,
            ISOSpeedRatings,
            ShutterSpeedValue,
            ApertureValue,
            MakerNote,
            UserComment,
            PixelXDimension,
            PixelYDimension,
            ImageUniqueID
        );
        ImageExportQuality = 1;
        ImageExportScalingEn<…>
yourhead commented 6 years ago

I've tested the extent of the issue:

Problem first appeared: RW v7.1.0 Problem exists through current release: v7.5.5 Problem found in private pre-release builds from this morning: [version number redacted] 😉

Affects pages made with the Photo Album plugin, the Blog plugin, all versions of Stacks that run with RW 7.1 (Stacks v2.5 - v3.0) and all versions of Collage 2.

yourhead commented 6 years ago

The bug has been submitted to Realmac Software. Hoping for a quick turnaround since it's now so easy to duplicate. 🤞

yourhead commented 6 years ago

Closing since this is now out of my hands. :-(