I've been hunting this problem for half a year already. With other hypotheses rejected - Linux issue, old PC, PyCharm bug, bad luck, - the webbrowser Python lib supposedly makes the Ubuntu kernel panic.
Either from a terminal or within PyCharm (happens on both), I run
```
controller = webbrowser.get('google-chrome')
for link in links_list: # up to 10 items
controller.open(link)
time.sleep(1)
```
and the system crashes (hangs until a hard or soft reset) after several web pages are opened in my Chrome browser as the result of running the program.
All the details you'll find at https://askubuntu.com/questions/1370213/ubuntu-hangs-and-becomes-unresponsive-until-reset. I first thought it's something wrong with Ubuntu, and I opened a question on the forum.
The only detail I've not added there is that after each crash I can move the mouse on the screen but cannot interact with anything. That thing always puzzled me.
I can neither say the website I'm running the webbrowser nor test it on other domains - the issue happens sporadically, once in several hours of me opening and closing a Chrome browser controlled by the webbrowser lib.
Python 3.9.7, installed with Anaconda. I've tried older versions of Python.
Ubuntu 20.04 LTS.
|