Recent

Author Topic: FLT STACK CHECK error under Lazarus IDE 2.2.4  (Read 731 times)

Firebird

  • New Member
  • *
  • Posts: 22
FLT STACK CHECK error under Lazarus IDE 2.2.4
« on: February 15, 2023, 07:51:41 pm »
Dear All,
I have programmed a DLL in C that calculates 1 dimensional algebraic functions (just like you would interactively do with the Windows calculator app). This worked fine under Lazarus IDE 2.0.10. Now that I have changed to Lazarus IDE 2.2.4 a runtime error pops up (see attached screenshot). What could be the reason for that? I would be grateful for any feedback.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9908
  • Debugger - SynEdit - and more
    • wiki
Re: FLT STACK CHECK error under Lazarus IDE 2.2.4
« Reply #1 on: February 15, 2023, 08:44:17 pm »
https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-exception_record

Quote
EXCEPTION_FLT_STACK_CHECK
   The stack overflowed or underflowed as the result of a floating-point operation.

I don't know why it didn't happen with the hold setup you had. But often this is a case of being lucky or unlucky. That is some bugs, albeit being present, do not cause an error. But any change in code, may just shift the address that they access, and make them crash.

As a first step ensure you compile
- without optimization
- with debug checks enabled (range, overflow, stack, ....)

Firebird

  • New Member
  • *
  • Posts: 22
Re: FLT STACK CHECK error under Lazarus IDE 2.2.4
« Reply #2 on: February 24, 2023, 01:44:44 pm »
Thanks for your reply. I rechecked my codes and adopted some parts. It now works. The old code had worked for me for years in the C environment ;-)

 

TinyPortal © 2005-2018