Re: [Shotwell] Help in re-import logic



Hi,

Hi there,

So... I finally got something working that resembles some degree of 
debugable environment. I got Visual Studio Code working with the
LLDB 
debugger and a Vala Code plugin for Syntax Highlighting. This allows
me 
to step through the Vala code and inspect some of the variables.

If I also mangle the c-code a bit, I can also get insights to the 
produced c-code - but usually that is not so interesting. See this 
thread for details on that: 
https://bugzilla.gnome.org/show_bug.cgi?id=734953

That's actually quite nice :)


Anyway... What I wanted to say is that, right now, I have one image 
(more, actually, but I am concentrating on one for debug sake) for
which 
I cannot set the comment field. I can set the comment, and Shotwell
will 
show it, but upon next restart, Shotwell will remove that comment
again.

So I thougt I would take this opportunity to see what is going on.
So 
here is where I'm at:

I have one photo which I added a comment to, restarted Shotwell with 
debugger attached, set a breakpoint where the comments were altered
on 
the photo, and got a hit when Shotwell tries to remove the comment 
again. Please see screenshot.

In the screenshot you can see that the current photo has the comment 
"Test comment" and that the new comment being set is NULL. You can
also 
see the stacktrace coming from a photo monitor performing a re-
import 
(finish_reimport_editable). The job originates as a background job, 
though, and I have not yet found where it originates.

My questions would be

  * What does the terminology "reimport" mean?

No idea, sorry


  * Where do these background jobs originate from?

They are created in src/PhotoMonitor.vala:1042, based on the
information created in check_for_editable_changes() in
src/PhotoMonitor.vala:419. Looking at the code this is because some of
the file info does not match (file size and mtime)
(src/db/PhotoTable.vala:1095)

  * If it means that data is re-imported from images on each start-
up, then
    a) Is this correct behaviour? If write-back (to image files) is
not 
enabled (which I have not (*) ) would the database not be the
authority 
on this info?

I would assume that as well.

    b) Why does this (seemingly) only happen to some of my photos.
I.e. 
I could successfully alter the comment on another photo, and it was
not 
reverted.

No idea. You might be able to check that with
meson configure -Dtrace=monitoring,import

(*) But I do have "Watch library" enabled.

And yes... I have found and read (some of) the documentation for 
Shotwell on gnome.org. If the information is correct / up-to-date, I
tip 
my hat for good project documentation :-)


Probably it isn't :-/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]