Crash when opening duden.de page

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
lexx9999
Newbie
Newbie
Posts: 3
Joined: 2020-07-27, 18:02

Crash when opening duden.de page

Unread post by lexx9999 » 2021-07-26, 21:42

Hi PaleMoon Team,

I found PaleMoon 29.3 is crashing when opening a duden.de page like https://www.duden.de/rechtschreibung/Haus
It's consuming more an more memory while on high cpu load.
The script busy error reports line 2113 which contains:
let b = <unique_prefix>__base.getBoundingClientRect();
There is a <unique_prefix>__init function which is called from multiple observers including a MutationObserver.

BR Lexx

User avatar
Pentium4User
Board Warrior
Board Warrior
Posts: 1103
Joined: 2019-04-24, 09:38

Re: Crash when opening duden.de page

Unread post by Pentium4User » 2021-07-30, 09:39

As I know it is caused by Google's WebComponents scripts that are in use there.
The profile picture shows my Maico EC30 E ceiling fan.

User avatar
seriousness
Hobby Astronomer
Hobby Astronomer
Posts: 23
Joined: 2021-05-15, 11:44

Re: Crash when opening duden.de page

Unread post by seriousness » 2021-07-30, 15:24

i just tried to go to duden.de and disable JavaScript in uBlock Origin for that site. Now it seems to work.

New Tobin Paradigm

Re: Crash when opening duden.de page

Unread post by New Tobin Paradigm » 2021-07-30, 15:27

If it "crashed" how did you get an a message from the js watchdog that a script is unresponsive?

What was the crash exception code? How is this web compat when it is a crash?

Do you even know what a crash is?

User avatar
jars_
Lunatic
Lunatic
Posts: 397
Joined: 2016-12-27, 00:12

Re: Crash when opening duden.de page

Unread post by jars_ » 2021-07-30, 17:06

When open than site, PM freeze. I decided to wait.
After 3-4 minutes, I had a window that I never saw: "Not enough system memory, close other programs in order to prevent data loss" :o
Image
(PM ate 3,7gb of memory and fell)
... also, the browser Vivaldi fell where I watched a video on yt:
Image
It's something strange ... very strange :!: :?:
SfMBE

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Crash when opening duden.de page

Unread post by Moonchild » 2021-07-30, 18:09

jars_ wrote:
2021-07-30, 17:06
also, the browser Vivaldi fell where I watched a video on yt:
So you have a problem on your system then, not the browser.

Download a better computer.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Crash when opening duden.de page

Unread post by Moonchild » 2021-07-30, 19:01

To the OP: problem seems to be an in-line script on duden's website that does some juggling with adding observers then (likely recursively) calling itself. This is a webmaster error; since it's an in-line script there's also not much we can do about it.
Please contact the site owners and ask them to look into it.
For the record, the script on the URL posted in this topic sits at line 2119 and surrounding, and is manipulating "laminashanalikala" elements, whatever that may be.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Moonraker
Board Warrior
Board Warrior
Posts: 1878
Joined: 2015-09-30, 23:02
Location: uk.

Re: Crash when opening duden.de page

Unread post by Moonraker » 2021-07-30, 19:38

No crashing here on linux...
user of multiple puppy linuxes..upup,fossapup.scpup,xenialpup..... :thumbup:

Pale moon 29.4.1

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Crash when opening duden.de page

Unread post by Moonchild » 2021-07-30, 21:29

Moonraker wrote:
2021-07-30, 19:38
No crashing here on linux...
Crashing only happens if you run out of memory. That may take a long while depending on your architecture and amount of available ram :P
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
lexx9999
Newbie
Newbie
Posts: 3
Joined: 2020-07-27, 18:02

Re: Crash when opening duden.de page

Unread post by lexx9999 » 2021-08-01, 15:08

Hi again,

I think the duden and chaturbate crashes have the same root cause. I saw both change style in the MutationObserver. It seems that chromium based browsers just ignore changes within a MutationObserver, but palemoon dies.

I've created a small standalone html (see attachment for full html), that triggers the problem (by enforcing a size change inside of the observer):

Code: Select all

var observer = new MutationObserver(function(mutations) {
  mutations.forEach(function(mutation) {
    target.style.width=.. // Setting to some different value KILLS PALEMOON
  });
});
Since there is no console output in Chromium I suppose they just ignore changes from within an MutationObserver-callback.

Hope that helps to fix the issue.

BR Lexx
BTW: Using and AddOn is not a fix, it's just a workaround.
Attachments
killpalemoon.zip
(864 Bytes) Downloaded 19 times

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Crash when opening duden.de page

Unread post by Moonchild » 2021-08-02, 01:25

I already tried to indicate the cause of this. It's a recursive call of the observer.
The problem is that by setting the style attribute inside a mutationobserver without checking first if the style needs to be changed (and bailing if not), you are causing a mutation to the object which triggers the observer, which sets the style, which changes the object which triggers the observer, which... See what I'm getting at?

Of course it'd be desirable to at least not hang, so I'll look into that, but ultimately this kind of a construct is webmaster error, IMO.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
lexx9999
Newbie
Newbie
Posts: 3
Joined: 2020-07-27, 18:02

Re: Crash when opening duden.de page

Unread post by lexx9999 » 2021-08-15, 12:05

Well, I understand this.

IMO it's a conceptual error to have an interface like this. Especially when considering that every item may have slightly different sizes on each browser. So any Not-The-Big-Players-Browser is fucked up. By doing this "recursion" fixes, those player are actively supporting badly written code, finally I would blame the Chromium world to be the root cause of this problem.

Anyway I'm happy that you're looking at it. Thanks a lot.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Crash when opening duden.de page

Unread post by Moonchild » 2022-07-13, 09:44

I've looked into this some more and we can't easily solve this on the browser side because the actual callback processing in JS is not in any way related to the mutationobserver.
What anyone who wants to observe a style change and then change that style in the callback should do to prevent issues (this has been a problem for all browsers, actually, and depending on what engine is used it may still be a problem) without needing to redesign their code is to simply make sure to immediately process the style changes and clear the observer queue by issuing an observer.takeRecords() after changing the style in the callback. This is a minimal, perfectly-safe change to website code that effectively stops falling into a recursion trap.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked