Hang when entering blank server name in account settings
Categories
(Thunderbird :: Account Manager, defect)
Tracking
(thunderbird_esr91+ affected)
People
(Reporter: henry-x, Unassigned)
References
Details
(Keywords: hang)
Steps to reproduce
- Open Account Settings and navigate to Server Settings for an account.
- Clear the input for Server Name.
- Click Copies and Folders.
- Close the "Server Settings" dialog, warning to enter a valid server name.
Result
Thunderbird then hangs and becomes unresponsive.
Expect
The dialog to close without hanging.
It might also make sense to replace the warning dialog, with a message next to the input instead.
Comment 2•3 years ago
|
||
Bug 1658781 is related. Maybe you can spot the problem?
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 4•3 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #3)
Which OS?
This is on linux, can you not reproduce on other platforms?
Reporter | ||
Comment 5•3 years ago
|
||
I did some debugging.
First, the prompt comes from checkUserServerChanges
via onAccept
https://searchfox.org/comm-central/rev/5d49baed2e8cbcdac07bddc0ff879a1ef60bd53c/mailnews/base/prefs/content/AccountManager.js#263
These methods do not hang. onAccept
is triggered by the "change"
event on the input.
Looking at the steps to reproduce again:
- Open Account Settings and navigate to Server Settings for an account.
- Clear the input for Server Name. At this point the
input
is not valid, but the "change" event has not yet been triggered because the input still has focus and no key has been pressed. - Click Copies and Folders. I imagine this click would trigger:
input
looses focus (which triggers the "change" event); unload of the current page; load of the next page. - Close the "Server Settings" dialog, warning to enter a valid server name. The prompt is shown during in the "change"
onAccept
handler and will not return until the dialog is closed.
Note that if, instead of step 3, you defocus the input
by clicking somewhere else on the same page, then the window will not hang after step 4. So I think this is something to do with a page load or unload.
Also, I think that whilst the "change" prompt is showing, the main thread still cycles the event loop (https://searchfox.org/mozilla-central/rev/75e9d727ce5ba2c14653cf8fb0f1367f085271b7/toolkit/components/prompts/src/Prompter.jsm#1057), but the "change" handler still won't return until the prompt is closed.
So my initial speculation is that the hanging is caused by some page load or unload method being called whilst the "change" handler is still running.
Updated•3 years ago
|
Comment 6•2 years ago
|
||
Danny, can you reproduce?
So my initial speculation is that the hanging is caused by some page load or unload method being called whilst the "change" handler is still running.
So you expect not OS related ?
Reporter | ||
Comment 7•2 years ago
|
||
As an update: I can no longer reproduce this. I do have a different computer now, still linux, but newer OS version (fedora 36).
So you expect not OS related?
I'm not sure. It could be a timing issue. Or maybe it was fixed in mozilla-central, or Gnome, etc.
Comment 8•2 years ago
|
||
Hi Wayne...
As a safety precaution, I created a new account to test this, as I have had issues in the past with changing something here and not being able to get it back...
Using TB 91.10.0, running under Windows 7 Pro 32-bit and Bitdefender AV:
(i) I could clear out the Server Name string, but as soon as I tried to go off-page (by clicking "Copies & Folders", as suggested), TB automatically restored the field and went to the new page. Returning to Server Settings, everything was unchanged.
(ii) If I cleared the Server Name string and clicked some other field on the same page (such as User Name, right below), the Server Name was restored as the focus changed to the new field.
(iii) There was never any warning message about a blank string, and TB did not hang during either of these procedures.
Using TB 102.0 new release, running under Windows 7 Pro 32-bit and Norton 360 AV:
(i) I could blank out the Server Name string, but as soon as I tried to go off-page (by clicking "Copies & Folders", as suggested), TB warned that the field was blank. When I ACK'd, the field was restored and we remained on the Server Settings page with no focus.
(ii) If I cleared the Server Name string and clicked some other field on the page (such as User Name, right below), TB again warned that the field was blank. When I ACK'd, the Server Name field was restored and focus changed to the new field.
(iii) TB did not hang during either of these procedures.
(Now I just have to figure out how to delete the test account :)
Comment 9•2 years ago
|
||
WFM per reporter
Description
•