Invalid integer value error exception during form resize event

I am getting continuous exceptions when dimensions are not integer.
In the attached screenshot you can see where it is raised and the call stack.
It starts from the resize event.

It seems like a bug where sysutils.pas cannot handle the conversation and raises exception.

Is there a workaround for this?

Thanks
Mehmet Emin

It seems that from somewhere, it tries to convert a float as string to an integer.
Without knowing where this comes from or how to reproduce this, there is unfortunately little we can do.

I have temporarly modified Weblib.forms.pas and to overcome the problem. Marked with yellow.
The problem is that margin top css value is sometimes non integer and web core cannot handle this during resize events.

Hi @brunofierens
You can reproduce the issue like this (with an empty project), below added a non integer margin-top style.
Thanks

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta $(ThemeColor)>
    <noscript>Your browser does not support JavaScript!</noscript>
    <link rel="icon" href="data:;base64,=">
    <meta $(Manifest)>
    <title>TMS Web Project</title>
    <script type="text/javascript" src="$(ProjectName).js"></script>
    <style>
    </style>
  </head>
  <body style="margin-top: 20.5px;">
<meta $(BodyParameters)>
  </body>
  <script type="text/javascript">
    rtl.run();
  </script>
</html>

On my production env. this style is assigned by an external js code and it is calculated with a fraction.

We applied an improvement to make it handle non-integer margin values.
This improvement will be in the next update.

Thank you as always for your prompt support.
Just tested with the latest version fixed.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.