[Bug 160564] New: No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] New: No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
           Summary: No refresh of the number of pictures assigned to a tag
                    after removing the tag from some pictures
           Product: digikam
           Version: 0.9.4-svn
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: aironmail gmail com


Version:           0.9.4-svn (using KDE 3.5.9)
Installed from:    Gentoo Packages
OS:                Linux

I have been doing some organization on my tags and I found the following (using the latest svn, from today):

- On the left panel I displayed the tags tab.
- Then I had a tag assigned to many pictures, it said something like "Tag Name (187)". So a tag name and the number of pictures between the brackets.
- I clicked on the tag, so the pictures were displayed on the gallery.
- I selected all pictures
- Now, right click -> Remove a tag -> And selected the tag mentioned above "Tag Name".
- The pictures that were using that tag dissapear from the gallery, which is normal.
- But, and this is the bug, the number of pictures between the brackets for that tag is not modified, it still said "Tag Name (187)"
- I try to close digikam and restart, and then the value is refreshed correctly saying 0.

So, the problem occurs when we remove the tag from a picture, that apparently doesn't force to recount the number of images using the tag.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Gilles Caulier-4
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|general                     |Tags



------- Additional Comments From caulier.gilles gmail com  2008-04-08 15:41 -------
Yes,

sometimes, i can reproduce the problem, but not everytime.

This is the same for you ?

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From aironmail gmail com  2008-04-08 15:45 -------
Well, I have tried three or four times and it happened always, but I can't discard that it will work eventually.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Gilles Caulier-4
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcel.wiesweg gmx de



------- Additional Comments From caulier.gilles gmail com  2008-04-09 22:29 -------
Marcel,

I suspect than the problem come from MetadataHub::write(ImageInfo*, WriteMode) which do not ping AlbumManager::scanTAlbums() when all tags are assigned/unassigned to images.

AlbumManager::scanTAlbums() will emit signalTAlbumsDirty() which contain a map of count of items. this map is used by all tags folder view. This signal is never emitted in this case...

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
andi.clemens gmx net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      everconfirmed|0                           |1



------- Additional Comments From andi.clemens gmx net  2008-07-06 23:55 -------
I can confirm this and it seems to happen only when all instances of the tags are removed. I created a new database for this test. Example:

1. only one tag exists to keep testing simple
2. only one folder exists to keep testing simple (9 images)
3. select all images in the folder, assign the tag
4. totals are getting updated correctly
5. select not all images (8 images), remove tag
6. totals are getting updated correctly
7. now select the one remaining image
8. remove tag
9. totals are not updated
10. select all images again, assign
11. totals are getting updated correctly
12. select all images, remove tag
13. totals are not updated...

Playing around with GDB, I found out that in TagFolderView::slotRefresh (line 1016) the Map doesn't contain the right values. In my example the tag has the ID 2. If I remove the tag from all images, the data of the map contains a strange integer value (1635373), if I remove the tag only from 8 images, data field of the map contains a '1', which is correct.
Somehow removing the last instance of a tag-image-relationship (which happens on removing all tags for example) sets a wrong data field in the tagsStatMap.
But I don't really know what to do about it. Went through all Hub functions, but I can't see anything strange.

Gilles, Marcel, any idea?
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From andi.clemens gmx net  2008-07-28 18:52 -------
Created an attachment (id=26459)
 --> (http://bugs.kde.org/attachment.cgi?id=26459&action=view)
patch for displaying the error

This one is really killing me. For the last 3 weeks I'm working on this, but I
have no clue what is going wrong.
I spent 3 hours stepping through the source with GDB but now I have no idea
where to look anymore.
Something is going wrong when the KIO::Job is executed.
My first thought was that when scanTAlbums() is executed, it will not notice
the tag anymore because it has no association with any image in the ImageTags
table. But this is not the case, the tag is still read.

If you apply the patch you will see that there is actually something going on.
The tag count is initialized with a random number, sometimes it even works
correct. But most of the time the counter reads something like 12343432...

The KDE4 version seems to avoid updating these counters completely, so right
now I'm only able to test it with the KDE3 branch.

Gilles, Marcel, maybe you have any idea why the counter is not initialized
correctly? Use this patch to see what is going on, maybe it will help.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
andi.clemens gmx net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26459|0                           |1
        is obsolete|                            |



------- Additional Comments From andi.clemens gmx net  2008-07-28 18:55 -------
Created an attachment (id=26460)
 --> (http://bugs.kde.org/attachment.cgi?id=26460&action=view)
the right patch this time

oops I uploaded the wrong patch...
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From andi.clemens gmx net  2008-07-29 11:08 -------
If above patch is not applied, the reason for not updating the counter can be found in here for example:
http://lxr.kde.org/source/extragear/graphics/digikam/digikam/tagfilterview.cpp#137

m_album will be empty if all tag instances are removed from images and so the refresh is not done. With the patch applied it seems to work and you get the uninitialized count valued displayed.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
andi.clemens gmx net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26460|0                           |1
        is obsolete|                            |



------- Additional Comments From andi.clemens gmx net  2008-08-02 21:34 -------
Created an attachment (id=26579)
 --> (http://bugs.kde.org/attachment.cgi?id=26579&action=view)
fixes the issue

Finally I found a solution. The problem can be found in the kioslave. We only
fill the tagsMap with the tags assigned to images and count those, but the
other existing tags in the database are ignored.
This patch will initialize the map with all tags found in database and set the
count to zero.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From andi.clemens gmx net  2008-08-02 21:37 -------
I just recognize that there is some code left from an old test I made in the kioslave. I will not upload a new patch, but on commit those lines will be removed...

Andi
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From andi.clemens gmx net  2008-08-03 09:54 -------
In KDE4, we have currently disabled the scan method in dio.cpp so I can't test / apply a patch there. Tag counts are only done on startup right now or when settings changed.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
andi.clemens gmx net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26579|0                           |1
        is obsolete|                            |



------- Additional Comments From andi.clemens gmx net  2008-08-13 16:31 -------
Created an attachment (id=26834)
 --> (http://bugs.kde.org/attachment.cgi?id=26834&action=view)
counter fix for tags and albums

I just recognized that the described bug is also true for normal album folders.
This patch fixes both issues.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Gilles Caulier-4
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From caulier.gilles gmail com  2008-08-13 18:53 -------
Andi,

Patch sound fine for me. Of course this code need to be ported to KDE4 (:=)))

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From andi.clemens gmx net  2008-08-13 19:01 -------
SVN commit 846543 by aclemens:

We need to initialize the albumsMap and tagsMap with all available information first before counting, so that empty albums and tags are updated correctly.


CCBUGS:160564
TODO:KDE4PORT


 M  +104 -93   digikamalbums.cpp  
 M  +27 -16    digikamtags.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=846543
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         
andi.clemens gmx net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From andi.clemens gmx net  2008-08-13 19:07 -------
I will close this one know, but it has to be ported to KDE4 as well. Right now this is not possible because

KIO::Job* scan(const KUrl& albumURL)

in dio.cpp is commented out, so the kioslaves actually don't update the counters at all.

Gilles, Marcel, I think there needs to be something implemented first in the albumdb interface? So this is why it is commented out?

Andi
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Gilles Caulier-4
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From caulier.gilles gmail com  2008-08-13 19:31 -------
Andi,

I don't remember why this code is commented. Perhaps Marcel have do it.

Marcel, any idea ?

Note: Marcel is not in Europe for the moment (Autralia until October). So we need to take a care about this file if he don't see this mail (i'm not sure if he have wifi in hotel). I recommend to place an annotation in TODO file from trunk.

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Marcel Wiesweg
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From marcel.wiesweg gmx de  2008-08-16 10:07 -------
Hi, I'm still alive ;-)
I actually have unfinished code lying on my laptop that listens to database signals to trigger updating everything that AlbumManager handles after the db is changed.
The relevant code parts fixed by this patch can now be found in albumdb.cpp, getNumberOfImagesInAlbums() and getNumberOfImagesInTags(). The code is different though, Andi you know better than me if the same fix is needed.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 160564] No refresh of the number of pictures assigned to a tag after removing the tag from some pictures

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160564         




------- Additional Comments From andi.clemens gmx net  2008-08-16 10:20 -------
"Jaaaa, er lebt noch, er lebt noch....." :D
�hh sorry for that!

I already found those functions and I applied my patches in there, but as
mentioned before the scan function doesn't work. So if this is fixed by your
code on your laptop, we will just have to wait. This patch isn't that
important anyway, at least not for stability or usability. So take your time
and don't hurry (don't know if you will be able to commit anyway, or if you
want to... you have better things to do in Australia I guess!! :-))

Andi

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel