[Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B
Martin Frb
lazarus at mfriebe.de
Sun Aug 18 14:21:30 CEST 2019
On 18/08/2019 11:17, Bo Berglund via lazarus wrote:
> So this Lazarus installer successfully deposits a working Lazarus
> *without* the initial message about disabling the pascal scripting.
>
> And Lazarus options seems to be exactly like the 2.0.4 I installed
> previously.
> So the message I previously saw about deactivating scripting seems to
> be an *installer* bug when in fact the installation has succeeded all
> the time...
I doubt it. Nothing was fixed that could have triggered this.
Most likely some condition changed. Maybe simple because of the code
grew a few bytes....
Something like this normally points to incorrect mem access. But running
in valgrind revealed nothing.
Of course PascalScript has different code for each target CPU and OS.
(linux vs win // but not diff version of win afaik).
> Now after getting 2.0.5 working in Win7 I returned to the RPi4
>
> The editormacroscript.xml now contains this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <CONFIG>
> <EMS>
> <Settings SelfTestError="Replace All [Exp: True / Got: False /
> Info: False / SynTxt: Test abc abcde 123
> ]" SelfTestFailed="1"/>
> </EMS>
> </CONFIG>
>
> Does this explain what is wrong on the RPi4 installation?
Unfortunately not. This will require deeper debugging. Potentially quite
a lot.
I do not have access to an RP at the moment. I planed to set one up (or
get QEMU to work) for more than 2 years now... But didn't find the time.
So that may still be a long time before I get to it.
If you want to go on trying to see if we can find anything, then please
open
components\macroscript\emscriptclasses.pas
around line 555
replace TEmsSynWrapper.EMS_SearchReplace
with:
function TEmsSynWrapper.EMS_SearchReplace(ASearch, AReplace: string;
AOptions: TSynSearchOptions): integer;
begin
debugln(['*** EMS_SearchReplace ASearch ', ord(ssoReplaceAll), ' / ',
integer([ssoReplaceAll])]);
debugln(['*** EMS_SearchReplace ', Pointer(ASearch), ' / ',
Pointer(AReplace), ' / ', integer(AOptions), ' / ', Pointer(self)]);
debugln(['*** EMS_SearchReplace ASearch ', ASearch, ' / ', AReplace]);
debugln(['*** EMS_SearchReplace ASearch ', length(ASearch), ' / ',
length(AReplace)]);
debugln(['*** EMS_SearchReplace ASearch ', RawByteString(ASearch), ' /
', RawByteString(AReplace)]);
debugln(['*** EMS_SearchReplace ASearch ', StringCodePage((ASearch)), '
/ ', StringCodePage((AReplace))]);
debugln(['*** EMS_SearchReplace ASearch ',
StringCodePage(RawByteString(ASearch)), ' / ',
StringCodePage(RawByteString(AReplace))]);
debugln(['*** EMS_SearchReplace ASearch ', self.Text, ' / ',
dbgs(CaretXY)]);
Result := SearchReplace(ASearch, AReplace, AOptions);
debugln(['*** EMS_SearchReplace ASearch ', Result]);
debugln(['*** EMS_SearchReplace ASearch ', self.Text, ' / ',
dbgs(CaretXY)]);
end;
Start lazarus from console, so you can get the output. Copy the output.
The output only matters, if the error occurs. So self-testing must be
re-enabled.
More information about the lazarus
mailing list