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

[GSoC2024] added check for the attributes which aren't present for the specified clientID for a conflict of annotation #7776

Conversation

Viditagarwal7479
Copy link
Contributor

@Viditagarwal7479 Viditagarwal7479 commented Apr 15, 2024

Fixes #7775

The UI crashes when hovering over the conflicts between the manual annotations and the GT annotations in the review mode.
To fix this, I have added a check when the attributes drawnState and shape aren't present for certain conflicts, in such cases, we pass its value as null and thus skip the operation performed on those attributes.

How has this been tested?

Follow the steps to reproduce the issue. After this PR, the mentioned issue will not occur thus UI will not crash.

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
    - [ ] I have updated the documentation accordingly
    - [ ] I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
    - [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@Viditagarwal7479 Viditagarwal7479 changed the title added check for the attributes which aren't present for the specified clientID for a conflict of annotation [GSoC2024] added check for the attributes which aren't present for the specified clientID for a conflict of annotation Apr 15, 2024
@bsekachev bsekachev requested review from klakhov and removed request for nmanovic April 16, 2024 05:31
@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Apr 16, 2024

Hi, did you have a chance to test this with tag conflicts as well?

@Viditagarwal7479
Copy link
Contributor Author

Hi, did you have a chance to test this with tag conflicts as well?

Hello, tag conflict is a different issue from this.
The approach to the solution is similar. So, I think I should push the solution for that issue to this PR itself rather than creating a new PR.

@Viditagarwal7479
Copy link
Contributor Author

Oh, my bad; this solution is sufficient for solving the tag annotation issue also. As the clientID corresponding to the tag conflicts isn't present in drawnStates and svgShapes, hence it gets skipped.

When the deactivateShape function is called this is the clientID, this.drawnStates and this.svgShapes respectively.
image

@klakhov
Copy link
Contributor

klakhov commented Apr 17, 2024

Hi @Viditagarwal7479, Ive tried out the fix and here are some of my comments:
In general, while ignoring the nulls works as a workaround for crashes it doesnt fix the actual problem, so I would suggest to invistigate the issues more deeply.

  1. Lets talk firstly about tags conflicts. As I've already mentioned, the higlight system code from cvat-ui assumes that all the annotations highlighted annotations are on the canvas. But with your pr, after adding a tag conflict it is not right. Which means cvat-ui must understand that the conflict is about tags, filter it, and handle it properly(at least dont pass to cvanvasInstance). Also, while just not passing it to canvasInstance will prevent crush, it wont provide good UX. It would be good to add highlight to tags aswell, we can handle it just in cvat-ui by watching highlightedConflict from the application store in frame-tags component. I would suggest to add this changes to your PR with updated UI for gt tags
  2. The second thing is about mismatching groups conflicts crush. While trying out the issue's scenario Ive noticed that conflicts are not shown properly on the 0 frame. If I change the the frame and go back, the conflicts are rendered properly and no crush occurs. That means there is some bug in rendring conflicts at first place which we should invistigate and fix instead of just ignoring the nulls.
    Consider:
    gt-problem

@Viditagarwal7479
Copy link
Contributor Author

Hello @klakhov,
Thank you for your feedback.

  1. Based on your feedback I have added this in this PR [GSoC2024] Added feature to show tags corresponding to GT job and manual job in a separate row #7774 since that PR was already having other commits related to how tags are being displayed in review mode. Now the tags will not be passed into highlight pipeline on the canvas, the size of tags with conflict will scale by 1.1 times and also come back to original size when new conflict is being hightlighted.
  2. After going through the code also I am unable to figure out why this is happening, was surprised to see this happening.

@klakhov
Copy link
Contributor

klakhov commented Apr 19, 2024

Ok, It seems its different issue wich is not connected to GT tags. Lets finish the tags PRs first.
You are free to investigate this issue further or we can just close this PR.

@zhiltsov-max
Copy link
Contributor

No visible activity in this PR for 1 month, closing. Don't hesitate to reopen and continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI Crash on hovering over annotation conflicts which don't have UI representation
3 participants