Closed yourhead closed 6 years ago
Photo Album and Collage pages predictably also show the issue. Works with any page that uses the Sandwich-Files API.
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.
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. :-(
Video showing:
https://www.dropbox.com/s/hxkykvp59iy3pmk/simple-data-loss.mp4?dl=0
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<…>
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.
The bug has been submitted to Realmac Software. Hoping for a quick turnaround since it's now so easy to duplicate. 🤞
Closing since this is now out of my hands. :-(
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:
The images on the Mandolin Books page will likely be missing from editor mode.
If the project is closed without saving the images will come back
If the project is saved here the missing state of the images is made permanent.
Save As is required. Simply duplicating the page will not cause problems.
Duplicating the page is required. Simple Save As will not cause problems.
A file of sufficient size/complexity is required. I was not able to duplicate the problem with smaller files. There is a the possibility that this problem is related to this specific file -- however that seems somewhat unlikely.
When After the Save As and Page Duplicate are finished the missing images will be immediately obvious.
Images are missing in pages below the duplicated page. Pages above appear to be unharmed. (personal note: WOAH!!!!)
Quitting with the project in this state without saving any further changes will result in all the images being copied over. Both files will be identical except for the duplicate page.
The much more likely user scenario of making further modifications and saving will result in the missing images being locked into position and the now extraneous image files being removed from the project.
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: