Recent

Author Topic: Runtime error 211 at ...  (Read 2749 times)

desperateNewBee

  • New Member
  • *
  • Posts: 12
Runtime error 211 at ...
« on: November 18, 2019, 11:20:08 am »
Hi experts,

I am running Lazarus on windows 64 and had my project work fine with lazarus 2.0.2
Now I upgraded to lazarus 2.0.6 but unfortunately did not choose "secondary installation" but did override previous installation...

My project did recompile fine with 2.0.6 but at running start I always get the message:
Runtime error 211 at ... (please see attached picture)

I discovered it has to do with "abstract methods" but I can't find out which kind of methods.

So I uninstalled version 2.0.6 and reinstalled version 2.0.2 - and got the same error.
Now I am somehow desperated...

Can anyone give me a hint, how I can find the reason for this errors?
(I am no expert at all)

In my project I am using the fantastic TvirtualStringTree component.
May be thats important?

Thanks in advance for any hint!


wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Runtime error 211 at ...
« Reply #1 on: November 18, 2019, 11:33:48 am »
At first during development, make sure that debug information is generated: Go to "Project" > "Project options" > "Compiler Options" > "Debugging" and select the option "Generate info for the debugger". This way  line number and unit name will be displayed inside the error message. This will help you to find the bug.

Then have a look at the message window. There should be a warning that you created an instance of a class with abstract methods. The warning contains the line number and the unit.

desperateNewBee

  • New Member
  • *
  • Posts: 12
Re: Runtime error 211 at ...
« Reply #2 on: November 18, 2019, 11:52:14 am »
Thanks wp!
This will surely be helpful!

desperateNewBee

  • New Member
  • *
  • Posts: 12
Re: Runtime error 211 at ...
« Reply #3 on: November 18, 2019, 04:30:38 pm »
sorry again,
the problem seems to be with "widestring" and "ansistring":

I get these warnings when compiling:
Projekt kompilieren, Ziel: lib\x86_64-win64\Demo.exe: Erfolg, Warnungen: 8
Main.pas(86,42) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString"
Main.pas(103,42) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString"
Main.pas(114,45) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString"
Main.pas(115,44) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString"
Main.pas(116,34) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString"
Main.pas(125,41) Warning: Implicit string type conversion from "AnsiString" to "WideString"
Main.pas(125,60) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString"
Main.pas(149,44) Warning: Implicit string type conversion with potential data loss from "WideString" to "AnsiString"

This happens in "foreign code" from a unit I bought and I just opened the example project again (which worked perfectly before).

Perhaps there must be some compiler switch dealing with widestring and ansistring?
This code did work perfectly before; just after reinstalling Lazarus I face this problem now.

Does someone has any idea?

Thank you in advance!

desperateNewBee

  • New Member
  • *
  • Posts: 12
Re: Runtime error 211 at ...
« Reply #4 on: November 18, 2019, 05:02:13 pm »
sorry for my confusing posts,

but the widestring - ansistring topic is obviously not the problem.
I just transferred the project to another PC (win10; the old is win7-64)) with an installed lazarus 2.0.2.
The warnings remain, but the project is running...
So I can now examine the problem by comparing the project settings.

Thanks and sorry for my "zero knowledge level"!

If I find the problem I will post it here.
Ohterwise I simply proceed my work on the other PC...

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Runtime error 211 at ...
« Reply #5 on: November 18, 2019, 06:59:39 pm »
Thanks and sorry for my "zero knowledge level"!
We all started at zero.

Bart

  • Hero Member
  • *****
  • Posts: 5274
    • Bart en Mariska's Webstek
Re: Runtime error 211 at ...
« Reply #6 on: November 18, 2019, 07:34:33 pm »
We all started at zero.

With the exception of Pascal strings  O:-)

Bart

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: Runtime error 211 at ...
« Reply #7 on: November 18, 2019, 07:48:24 pm »
We all started at zero.

With the exception of Pascal strings  O:-)

{$zerobasedstrings on}

desperateNewBee

  • New Member
  • *
  • Posts: 12
Re: Runtime error 211 at ...
« Reply #8 on: November 19, 2019, 08:05:46 am »
We all started at zero.

With the exception of Pascal strings  O:-)


Well, somehow I am a very little familiar with strings...  %)
But the strange thing was simply, that the same code did run well before and so I didn't have to care about those warnings (as they are in the "foreign code" and not "my fault").

Anyway I finally found the reason - even more stupid than dealing with strings!
Yesterday I did install the 64-Lazarus versions (according to my windows 64 bit) and the former installation must have been 32-Bit Lazaurs. Because on my other PC, which I switched to yesterday afternoon, also Lazarus 32 Bit was running and the project did o.k. there.

By comparing both installations I finally found that difference.
The problem were obviously some functions in my "foreign unit" which don't work with the 64-bit version and raise the "211 exception".

So I have now installed the new 2.0.6-32-Bit Lazarus and everything is doing well again (same warnings as before - but the project is running perfectly again)

Thank you all.
And thanks for not blaming me at all... :)

 

TinyPortal © 2005-2018