Recent

Author Topic: recompiled an 2012 appl gives runtime error  (Read 1833 times)

fikkies

  • Newbie
  • Posts: 4
recompiled an 2012 appl gives runtime error
« on: July 20, 2019, 09:28:02 pm »
I build a (rather complex) application in 2012 and I still use it.
It was build in 32 bits and also workes fine on recent 64 bit (Linux Mint)
Of course after 7 years some changes are nessecary and no problem compiling but when I run I get -- Acces Violation Press OK to ignore --
before the app itself starts, and the application stops.
on Debugging I get - for me unknown -  assembler codes.

Main question. Is there an old error  in the application or is the Lazarus 2012 version not (backward) compatible to the 1.8.2  version.

Frits


Thaddy

  • Hero Member
  • *****
  • Posts: 18765
  • To Europe: simply sell USA bonds: dollar collapses
Re: recompiled an 2012 appl gives runtime error
« Reply #1 on: July 20, 2019, 09:34:44 pm »
On some points, both the compiler and Lazarus are not fully backwards compatible.
The compiler issues are usually minor and documented in the release notes, including work-arounds tips how to modify your code.
They can have a major effect, though, if you are not aware of those changes.
Lazarus is (was) less well documented on breaking changes.

BTW: same issues exist with e.g. Delphi.

The most likely is, however, that there was already a bug in the existing code that is now revealed because of the compiler being more strict.
(e.g. less forgiving in the case of use-after-free)
« Last Edit: July 20, 2019, 09:43:00 pm by Thaddy »
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

fikkies

  • Newbie
  • Posts: 4
Re: recompiled an 2012 appl gives runtime error
« Reply #2 on: July 20, 2019, 09:49:23 pm »
thanks
Any way, I will have to break up all the modules and compile - debug them one by one,  starting with the database.

frits

af0815

  • Hero Member
  • *****
  • Posts: 1409
Re: recompiled an 2012 appl gives runtime error
« Reply #3 on: July 21, 2019, 09:02:16 am »
You can still create an old compiler side by side and recompile with it.
regards
Andreas

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12184
  • Debugger - SynEdit - and more
    • wiki
Re: recompiled an 2012 appl gives runtime error
« Reply #4 on: July 21, 2019, 11:31:35 am »
When you get the asm code, have you tried the stack window? And the thread window (changing to each thread, watching the stack)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12708
  • FPC developer.
Re: recompiled an 2012 appl gives runtime error
« Reply #5 on: July 21, 2019, 01:57:05 pm »
I wouldn't really phrase it as the newer versions necessarily "more strict". That implies deliberation, which it is probably not.

More a result of chance memory layouts.

Thaddy

  • Hero Member
  • *****
  • Posts: 18765
  • To Europe: simply sell USA bonds: dollar collapses
Re: recompiled an 2012 appl gives runtime error
« Reply #6 on: July 21, 2019, 05:43:18 pm »
More a result of chance memory layouts.
With which you had a higher chance of succeeding on dangling pointers before 3.0.0. Hence my comment.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018