-
Notifications
You must be signed in to change notification settings - Fork 1.3k
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Group name/label with whitespaces only crashes modeler #2231
Comments
Thanks for your report, I can reproduce your issue. Do you want to contribute a fix? |
I could take a look into it when I have some spare time - do you have a suggestion where I should start and where a fix would fit best? |
@torge-hmn I had a quick look myself and attached the crash report visible in the developer console, reachable via The trace allows us to deduce where the error is coming from, create a test case and address it. |
Thanks for your reply and attaching the stack trace - I already looked at the stack trace but forgot to attach it to the issue. I had a few minutes trying to examine the cause of the error and started implementing a reproducer test. I'm not quite sure but maybe this check leads to the crash: During I didn't have time to finish my reproducer tests and try fixing the issue, but do you think I am right about the cause or at least on track in the right direction? |
I've now created two tests (second one is the reproducer) calling As I'm not sure how you would like to fix the issue, I've provided a basic fix that at least fixes the reproducer test and prevents a modeller crash in this commit. I thought about some approaches for a better fix, but I'm not sure what fits the library best. Here are my ideas in order of my personal preference (which does not really matter 😄):
Maybe one of those ideas fits your thoughts and if not, please tell me how you would like the issue to be fixed. I would adjust my fix accordingly and create a PR - thanks! |
Amazing stuff. Do you want to open a PR with your changes? We can take it from there. I.e. we are fine with a draft PR only, to continue the discussion, and evolve the solution from there. |
Thanks for creating the pr @abdul99ahad! I didn't have time until now and just saw you already opened a pr. |
@torge-hmn We should have given you a heads-up on work happening on our end 🙈. Yes, the PR to address this issue is up, and we hope to get it merged soon. |
Oh, that's not a problem at all. I'm happy you're addressing the issue that quickly 😄 |
Describe the Bug
If the name/label of a group (= value of the referenced categoryValue) is initially set to a whitespace only string, the modeler crashes (= no useful interaction is possible anymore - can't move elements and creation of new elements is scuffed).
This behavior does not occur, when the group already had a valid name/label before. My strong assumption is that the implicit creation of the categoryValue is not taking place in case of a whitespace only value.
Steps to Reproduce
Expected Behavior
No crash. Either the group should get no name/label at all or the whitespace string should be used.
Environment
Crash report, visible in the console:
The text was updated successfully, but these errors were encountered: