Lazarus

Using the Lazarus IDE => General => Topic started by: fikkies on July 20, 2019, 09:28:02 pm

Title: recompiled an 2012 appl gives runtime error
Post by: fikkies 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

Title: Re: recompiled an 2012 appl gives runtime error
Post by: Thaddy 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)
Title: Re: recompiled an 2012 appl gives runtime error
Post by: fikkies 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
Title: Re: recompiled an 2012 appl gives runtime error
Post by: af0815 on July 21, 2019, 09:02:16 am
You can still create an old compiler side by side and recompile with it.
Title: Re: recompiled an 2012 appl gives runtime error
Post by: Martin_fr 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)
Title: Re: recompiled an 2012 appl gives runtime error
Post by: marcov 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.
Title: Re: recompiled an 2012 appl gives runtime error
Post by: Thaddy 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.
TinyPortal © 2005-2018