Skip to content

IDE hangs after changing "Language" preference #948

Closed
@per1234

Description

@per1234

Describe the problem

The "Language" menu of the File > Preferences dialog now offers a selection of seven languages the Arduino IDE user interface can be localized to (#941).

🐛 In some cases, changing the "Language" preference causes the Arduino IDE to go into a hang state.

To reproduce

  1. Select File > Preferences... from the Arduino IDE menus.
  2. Select a language from the "Language" menu.
  3. Click the OK button.

🐛 The IDE hangs forever in the state where the window title is "index.html" and the window contains only spinning dots:

image

🐛 Any unsaved changes to the sketch are lost.

Expected behavior

IDE continues to work normally after changing "Language" preference.

It is true that the user will need to restart the Arduino IDE after changing the preference anyway since the preference change will only take effect in the current window (as explained here), and even there not affect the Arduino CLI output. This is stated next to the preference ("(Reload required)"). However, the hang is not a good user experience.

Arduino IDE version

2.0.0-rc5-snapshot-6176e50

Operating system

Windows

Operating system version

10

Additional context

The fault does not occur on my Ubuntu 20.04 machine.


The fault seems to be intermittent. The hang occasionally does not occur and I have not been able to identify any specific conditions that either cause it to be consistently reproducible or consistently non-reproducible.

The fault occurs more often than not though.


Note that the issue was not introduced by #941.

I am not able to reproduce the fault when using the build from 69ac1f4 (tested by manually installing a language pack per these instructions).

The preference was broken at the next commit 112153f (#830), meaning it is not possible to test using the builds from there up to when #830 was fixed.

The fault does occur when using bc3cb0c, the commit where #830 was fixed. But this does not necessarily indicate that the bug was introduced at bc3cb0c.


The command line output printed at the time of the hang:

root INFO Updating daemon with 'data': {
  "board_manager": {
    "additional_urls": []
  },
  "daemon": {
    "port": "50051"
  },
  "directories": {
    "data": "c:\\Users\\per\\AppData\\Local\\Arduino15",
    "downloads": "c:\\Users\\per\\AppData\\Local\\Arduino15\\staging",
    "user": "c:\\Users\\per\\Documents\\Arduino"
  },
  "library": {
    "enable_unsafe_install": false
  },
  "logging": {
    "file": "",
    "format": "text",
    "level": "info"
  },
  "metrics": {
    "addr": ":9090",
    "enabled": true
  },
  "output": {
    "no_color": false
  },
  "sketch": {
    "always_export_binaries": false
  },
  "updater": {
    "enable_notification": true
  },
  "ide": {
    "bundled": false,
    "portable": false
  },
  "locale": "fr",
  "network": {}
}
serial-service INFO >>> Disposing serial service...
serial-service INFO <<< Disposed serial service.

If I select anything from the IDE menus, this is printed:

Attempting to call a function in a renderer window that has been closed or released.
Function provided here: bundle.js:2:1080768

Another issue with a similar hang state symptom, and introduced around the same time: #922

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions