Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect count entry number #4441

Closed
Ali96kz opened this issue Oct 31, 2018 · 17 comments · Fixed by #5325
Closed

Incorrect count entry number #4441

Ali96kz opened this issue Oct 31, 2018 · 17 comments · Fixed by #5325
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups ui

Comments

@Ali96kz
Copy link
Contributor

Ali96kz commented Oct 31, 2018

Steps to reproduce the behavior:

  1. File -> (New Bibtex library) or (New Biblatex library)
  2. Add some entry
    Number of entry will be 0.
    image
@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Nov 1, 2018
@AEgit
Copy link

AEgit commented Nov 1, 2018

Is it always an incorrect number, or does this only happen the first time you assign a item to a new group?

I noticed this behaviour before, but as far as I remember you get the correct numbers of items contained in a group, if you save your database, then close JabRef and then reopen the database in JabRef.

This is still, obviously, a bug, but a less serious one, I guess - it is basically the updating process of the groups panel, that does not work properly (which I think is also responsible for some other issues we see with the groups panel).

@Siedlerchr
Copy link
Member

Sometimes the number update if you switch to another db and then back again.

@CaptainDaVinci
Copy link
Contributor

CaptainDaVinci commented Mar 21, 2019

@Siedlerchr However, on switching to another library, group count shows count of previous library.

I am looking into this issue right now, what I have found is that when the database is changed, a new instance of the IntegerProperty hits is created each time [1]. And Text (representing GUI for the number of hits) is being bound to this newly created instance [2], therefore the binding does not prove useful here.

The Text should still be updated with the value of hits anyway, but it turns out that the binding of hits to Text is done before hits is updated. It is because of another binding [3] which internally triggers a callback to ViewModelTreeTableCellFactory.

This results in Text holding previous value of hits and not the current one.

When JabRef starts up there are some initial calls made which havehits initialized to 0, and Text binds to that, until database is changed.

@tobiasdiez
Copy link
Member

Thanks for investigating this issue. This is how it is supposed to work:

So it sound's reasonable that there is a problem with the binding of the text label to the correct hits property.

@samiyac
Copy link
Contributor

samiyac commented Mar 22, 2019

@tobiasdiez I think the problem might actually be concerned with databaseContext.getDatabase().getEntries().addListener(this::onDatabaseChanged);
I added a print statement inside the function onDatabaseChanged and it didn't print anything after a few entries were added.
The problem is related to this: https://stackoverflow.com/questions/44341400/whats-the-purpose-of-fxcollections-unmodifiableobservablelist/
This would solve issue #4679.

However, I think this issue might have more to do with the group being utilized in the line text.textProperty().bind(group.getHits().asString()); is the older group. This causes value to not be set properly. But I think this happens only if the only group you have is All Entries.

@samiyac
Copy link
Contributor

samiyac commented Mar 24, 2019

@tobiasdiez and @Siedlerchr Why do we have the All Entries group available when no library has been opened in JabRef? It doesn't seem to serve any function.

@tobiasdiez
Copy link
Member

You are right the "All Entries group" should only be shown when there is an open library.

@stefan-kolb
Copy link
Member

The value should also be updated if the library is closed which also does not happen right now.

@stefan-kolb
Copy link
Member

See #3142. Will probably fix both of the issues.

@tobiasdiez
Copy link
Member

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

@AEgit
Copy link

AEgit commented Sep 17, 2019

JabRef 5.0-dev--snapshot--2019-09-16--master--1bec5efd3
Windows 10 10.0 amd64
Java 11.0.4-bellsoft

As far as I can tell, this issue appears to be fixed in the current developer version of JabRef. Thank you very much!

What I do note, however, is that assigning articles to new groups creates a massive CPU workload (always around 95%-100% CPU workload on a 6-core Core i7). This CPU workload takes several minutes to disappear. I do not know, however, whether this issue is related to the current fix or if it is just related to the general performance problems, that JabRef has at the moment (see #5071).

@AEgit
Copy link

AEgit commented Sep 17, 2019

Follow-up: Note also, that the group entry count number is updated immediately, when an item is assigned to a new group. But the colour indicating the group assignment is not. The colouring of the group affinities is only updated if you select another item in the main table or another group in the panel and then re-select the newly assigned item.
As you can see, this is not a major issue, but I wanted to report it (see also here: #3112 (comment)).

@tobiasdiez
Copy link
Member

Thanks for the feedback. I'll try to improve the performance in the coming weeks but first I wanted to fix as much bugs as possible. Please open another issue for the coloring problem.

@AEgit
Copy link

AEgit commented Sep 17, 2019

I just realised that I had reported the colouring issue before. See here:
#3112

and (similar but not the same) here:
#2857

Thank you very much for your continuous work on JabRef!

@Siedlerchr
Copy link
Member

@AEgit Did you encounter by chance this issue after the latest fix? #5327

@AEgit
Copy link

AEgit commented Sep 17, 2019

@Siedlerchr Sorry for taking so long. See my reply here: #5327 (comment)

No, I cannot reproduce the issue you reported.

@Siedlerchr
Copy link
Member

Okay thanks for the info. Will test it again on another computer

Siedlerchr added a commit that referenced this issue Dec 11, 2019
49a1841 Update queen-margaret-university-harvard.csl (#4443)
f841560 Create uni-bern-institut-fur-musikwissenschaft-note.csl (#4401)
6ee503c Create harvard-cite-them-right-all-authors.csl (#4416)
3eceec4 Create harvard-queen-margaret-university.csl (#4441)
3c2299d JEMS.csl (#4436)
bb2f60f Create open-window.csl (#4430)
a908ab4 Nutrition Research Reviews (#4434)
208b693 Bump nokogiri from 1.10.3 to 1.10.4 (#4439)
122a3bb Create nmfs-west-coast-region-national-environmental-policy-act.csl (#4426)
3565fc2 Update tissue-engineering.csl (#4435)
981044e Create transposition.csl (#4375)
73ef6f3 Update tissue-engineering.csl (#4431)
7c4a4cf Update r-and-d-management.csl (#4432)
8628afb Create china-national-standard-gb-t-7714-2015-numeric.csl (#4065)
6ce148c removed spaces in harvard-gesellschaft-fur-bildung-und-forschung-in-europa.csl (#4422)
2af1c6f Create japanese-journal-of-applied-physics.csl (#4425)
fc16579 Add Presses universitaires de Strasbourg style (#4411)
01e58fb Correct spacing issues and documentation link (#4423)
d97cf3f Update geistes-und-kulturwissenschaften-heilmann.csl (#4421)
017947d Update ens-de-lyon-centre-d-ingenierie-documentaire.csl (#4413)
bffe57e Create instituto-de-pesquisas-energeticas-e-nucleares-sp.csl (#4368)
18686d1 Update and rename zeitschrift-fuer-digitale-geisteswissenschaften.csl… (#4410)
bd3a5f6 Final fix for journal article cit plus other updates - uniwersytet-im-adama-mickiewicza-w-poznaniu-wydzial-anglistyki (#4417)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 49a1841
@koppor koppor moved this to Done in Prioritization Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups ui
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants