vaadin / vaadin/framework

VWindow has race-condition that freezes the GUI totally

Open
#10,934 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cannot reproduce Stale
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Tested with Vaadin 8.4.1

If the user takes an action that causes (alternating?) calls to

com.vaadin.client.ui.VWindow.bringToFront()
com.vaadin.client.ui.VWindow.hide()

in a very fast way (he deliberately clicked "very" fast to test the stability of the UI )

This method return -1 sometimes:
com.vaadin.client.ui.VWindow.getWindowOrder()

image

There is an IndexOutOfBoundException, and the whole UI freezes. It does not react to any clicks
anymore. bringToFront() and hide() should be hardened against this type of "attacks".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with com.vaadin.client.ui.VWindow.bringToFront(), hide(), and getWindowOrder(), then reproduce the rapid alternating calls described in Vaadin 8.4.1. Trace the IndexOutOfBoundsException and verify that repeated clicking no longer freezes the UI or produces an invalid window order.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.