Recent

Author Topic: SIGSEV crash with "background,color" and "ColorFromString..."  (Read 450 times)

QEnnay

  • Full Member
  • ***
  • Posts: 129
I just installed 4.0 in Linux Mint 22+Cinnamon and getting a SIGSEV in ipCSS running in the IDE. If I run it standalone it just crashes with no error message.

Code: Pascal  [Select][+][-]
  1.       'b': if Cmd = 'background-color' then begin
  2.              if Args.Count > 0 then
  3.                BGColor := ColorFromString(Args[0])  // it crashes at this line highlighted
  4.              else
  5.                BGColor := clDefault;
  6.  
  7.  

I rolled back to a 3.xx version and getting the same issue.

How do I fix this fast. It is my main Contacts program that I use 20+ times per day.
Linux-Mint 20.1 x64 + Cinnamon; Lenovo Flex 5 Ryzen 5 4500, 16GB memory
FPC: 3.2.0-1, Lazarus 2.0.12-0, all 64bit

dsiders

  • Hero Member
  • *****
  • Posts: 1439
Re: SIGSEV crash with "background,color" and "ColorFromString..."
« Reply #1 on: May 08, 2025, 12:46:45 am »
I just installed 4.0 in Linux Mint 22+Cinnamon and getting a SIGSEV in ipCSS running in the IDE. If I run it standalone it just crashes with no error message.

Code: Pascal  [Select][+][-]
  1.       'b': if Cmd = 'background-color' then begin
  2.              if Args.Count > 0 then
  3.                BGColor := ColorFromString(Args[0])  // it crashes at this line highlighted
  4.              else
  5.                BGColor := clDefault;
  6.  
  7.  

I rolled back to a 3.xx version and getting the same issue.

How do I fix this fast. It is my main Contacts program that I use 20+ times per day.

Check the CSS in the HTML document for a malformed background-color value. It has to be a named HTML color  like RED (not clRed) or a hex value like #FF0000 (#rrggbb). I'm not sure if it can handle rgb() or rgba() color values in the CSS.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

cdbc

  • Hero Member
  • *****
  • Posts: 2216
    • http://www.cdbc.dk
Re: SIGSEV crash with "background,color" and "ColorFromString..."
« Reply #2 on: June 01, 2025, 11:03:18 am »
Hey goodman STOP TROLLING THIS FORUM!!!
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

Thaddy

  • Hero Member
  • *****
  • Posts: 17187
  • Ceterum censeo Trump esse delendam
Re: SIGSEV crash with "background,color" and "ColorFromString..."
« Reply #3 on: June 01, 2025, 01:04:30 pm »
dsiders is right: it must be a color to html/css specification and not a color like the fpc color constants, which may or may not resolve to the same value.
dsiders also gave the correct syntax.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018