Lazarus 1.3 trunk crashes on opening a form lazarus / 10-Designer ---------------------------------------------------------------------- Ocye · 2014-06-28 08:59 Opening any form in my project leads to an exception: QuoteTLazSourceFileManager.InitOpenedProjectFile select form in designer: fmGameOptions:TfmGameOptions TDesigner TApplication.HandleException Invalid argument index in format "Möglicherweise müssen sie einige Packages installieren, um fortfahren zu können...."   Stack trace:   $000000000044D65D   $000000000044EAB2   $000000000044F01C   $00000000009D4078 line 3438 of ../packager/pkgmanager.pas   $0000000000BC4B70 line 5516 of sourcefilemanager.pas   $0000000000BC48EA line 5454 of sourcefilemanager.pas   $00000000004C819F line 12146 of main.pp   $00000000004AE4B3 line 5805 of main.pp   $00000000004A3876 line 3417 of main.pp   $0000000000A03FE5 line 8256 of sourceeditor.pp   $00000000009EEB83 line 3634 of sourceeditor.pp   $0000000000CA5D77 line 6756 of synedit.pp   $0000000000CA1C55 line 6143 of synedit.pp   $0000000000C906DD line 2775 of synedit.pp   $000000000063428B line 5609 of include/wincontrol.inc   $000000000063454F line 5740 of include/wincontrol.inc   $00000000006375CA line 7044 of include/wincontrol.inc (German localization says I have to install some packages) As a workaround I have to restart Lazarus with the (previously failed) opened form to show it. There is nothing special on this form (this one is just an about dialog) even though the project is quite large. I'm running Lazarus in Qt flavor but Gtk2 is affected as well. Deleting the precompiled forms does not help. Is this a bug or my fault? Lazarus 1.3 r45707M FPC 2.6.4 x86_64-linux-qt ---------------------------------------------------------------------- BigChimp · 2014-06-28 09:44 Looking at the mailing list, there were some changes in .po files and .po parsing. I'd suggest trying again with the latest revision (if you haven't already), otherwise submit a bug report or post on the ML... ---------------------------------------------------------------------- JuhaManninen · 2014-06-28 12:37 Format() parameters were reduced as quote (") is now hard-coded in resource strings. Maybe German translation reorders some params, otherwise I don't understand how it could lead to a crash. Anyway, the cure is to fix the translations. Some of them are fixed already. A workaround is to use English IDE until that. ---------------------------------------------------------------------- Ocye · 2014-06-28 13:33 You are right, the localization is the reason for this crash. I wrote a bug report. http://bugs.freepascal.org/view.php?id=26405 Quote from: JuhaManninen on June 28, 2014, 02:37:11 pmAnyway, the cure is to fix the translations. IMHO a missing translation must not crash the application. And I vote for a fail safe Format function, something like: Code: [Select]function FormatDef(Const Fmt : String; const Args : Array of const):string begin   try      Result:=Format(fmt,args);   except      on E:Exception do        Result:=fmt+'(failed: '+E.Exception+')';   end; end;