4D Crash on WebArea running javascript

Hi,

A customer reported 4D crashing when using TinyMCE for email text editing. This started after the holiday break, probably due to a OS update.
They are using 4D c/s v17r4 in Citrix Windows environment Windows Server 2016 Standard 1607 (14393.3115))

I found the crashing happens in a Web Area (using OS engine) when executing javascript. Not related to TinyMCE, just any small page trying to run a line of js crashes 4D.

Anyone experienced the same crashing problem?
Is there some kind of Windows setting which might have changed by the OS update and solves this issue?

When using the 4D embedded engine the crash disappears, but then I’m not sure everything will work as expected.

TIA,
Koen

Hi Koen,

We are encountering the same problem.

Crash 4D with System engine.
We are on 4D v16.6 32 bits on Windows TSE Windows Windows Server 2012 R2.
We also tried in V17.3 32 bits and 64 bits. Same result.

Strangely it works on Windows 7

This was working with 4D v13.

Unfortunately for us, embedded engine is not working for the site we are trying to display…

Interested for any workaround…

We found the same issue when we converted our v13 database to v17R6 a couple of months ago. The crash occurred when we were calling a JavaScript function that gives focus to a field during On End URL Loading.

I did a little bit of testing and found that what the function did wasn’t the problem, just calling it was enough to cause the crash.

I also tried running the page in IE 11 (Windows 10 by the way) and then calling the function from the debug console. That worked fine.

Rather than spend a heap of time trying to figure it out I just converted all of our web areas to the embedded engine. The only reason that we were running the system engine in the first place was because of Windows XP. But we don’t support that OS now, so I was free to make the change.

I did find that it wasn’t every page with JavaScript though. A really basic test page with a single div and a function that gave the div some inner text worked fine.

You might need to log it with 4D and get their input if you’re not able to use the embedded engine. Hopefully they’ll be able to fix it.

Regards,
Adam

We have also found the line of code which crashes 4D :

<code 4D>
WA Évaluer JavaScript(*;$vt_waName;“document.title”)

</code 4D>

We are working on/testing a workaround…

PS : this was already a workaround because “WA Get page title” was not working on Windows…

Hi Bruno,

I did a bit more experimenting and for us it turns out it was due to our page using IE7 compatibility mode. We have the below meta tag in our page head, removing it or changing it to IE=8 resolves the crash issue.

Causes crash:

No crash:

Possibly you’re page has the same?

PS: I found the same with “WA Get page title” not working when we first started using web areas. I can’t remember why I didn’t use the document.title workaround, but we call “WA Get page content” and then use regex to find the tag and extract the value. It assumes that is before any comments or script elements that may include text that will cause a match, but since we only display pages that we control it works ok.

Regards,
Adam

Hi Adam,

No, we do not have this meta tag in the web pages we have.

But it could be that the web area behaves as default as IE7…

PS : we needed the page title to see where we were in the site… My colleague rewrote code to use the url instead (more reliable).

Thanks

Hi Bruno,

Glad you were able to work around the issue.

Regards,
Adam

: Bruno LEGAY

Unfortunately for us, embedded engine is not working for the site we
are trying to display…

I have the same issue with internet site of my bank : virtual keyboard does not display (not easy to connect !).