Illegal character in format string (Windows XP) lazarus / 13-General ---------------------------------------------------------------------- OnixJr · 2008-01-23 00:38 Hi friends, recently I downloaded PeaZip and when running (unzip some file) I receive the message "illegal character in format string"... OK, I decided wait for next release of them... But today, I drop an TDBCalendar and I receive: "Error creating component TDBCalendar. Illegal character in format string"... (first I updated Lazarus with last SVN revision)... with TCalendar I get the same error. I search in forum and mantis, but I get none result... My question is: is this a lazarus bug or a "non-finished" implementation? ---------------------------------------------------------------------- Bart · 2008-01-24 08:41 Try to create it at runtime, then you can debug the code to see where it goes wrong. This way we can see where the problem is. Bart ---------------------------------------------------------------------- OnixJr · 2008-01-24 13:49 OK, I did... I has created a TDBCalendar with simple code: Code: [Select] procedure TForm1.Button1Click(Sender: TObject); begin   MyDBCalendar := TDBCalendar.Create(Self);   MyDBCalendar.Parent := Self; end; When the button is clicked, an exception occur and I need found the file "except.inc" (in source/rtl/inc directory)... The cursor stop in (begin line): Code: [Select] Function fpc_Raiseexception (Obj : TObject; AnAddr,AFrame : Pointer) : TObject;[Public, Alias : 'FPC_RAISEEXCEPTION']; compilerproc; var   _ExceptObjectStack : PExceptObject;   _ExceptAddrstack : PExceptAddr; begin {$ifdef excdebug}   writeln ('In RaiseException'); {$endif}   fpc_Raiseexception:=nil;   fpc_PushExceptObj(Obj,AnAddr,AFrame);   _ExceptAddrstack:=ExceptAddrStack;   If _ExceptAddrStack=Nil then     DoUnhandledException;   _ExceptObjectStack:=ExceptObjectStack;   if (RaiseProc <> nil) and (_ExceptObjectStack <> nil) then     with _ExceptObjectStack^ do       RaiseProc(FObject,Addr,FrameCount,Frames);   longjmp(_ExceptAddrStack^.Buf^,FPC_Exception); end; Executing in GDB ([gdb "C:\project1.exe"] ... [run]) the message appear too [OK CANCEL], but if click in OK the program continue normally and when it stoped, gdb give "Program exited normally". (the program not crash when message appear). Somebody could reproduce it too? ---------------------------------------------------------------------- OnixJr · 2008-01-24 13:57 OK, I think I found the error... I think it's because of the Windows XP Service Pack 2 (Windows SP2 have a bug? =)... See the screen: (http://img233.imageshack.us/img233/561/clipboard01oz7.png) I will test on Windows 2000 and post again the outcome ... ---------------------------------------------------------------------- OnixJr · 2008-01-24 14:20 OK, I fix the problem... Im my regional options (in control panel), date format is: "M/d/aaaa" (a = ano [year in portuguese]) I change it to "M/d/aa" and now is working... I change it again to "M/d/aaaa" and continue working (I give up of trying to understand the MS-Windows =) ---------------------------------------------------------------------- Phil · 2008-01-24 15:21 Quote from: "OnixJr"OK, I fix the problem... Im my regional options (in control panel), date format is: "M/d/aaaa" (a = ano [year in portuguese]) I change it to "M/d/aa" and now is working... I change it again to "M/d/aaaa" and continue working (I give up of trying to understand the MS-Windows =) Does M/d/yyyy work? It looks like Windows is interpreting "aaaa" as a literal. Maybe it uses "y" as a universal format specifier. Thanks. -Phil ---------------------------------------------------------------------- OnixJr · 2008-01-24 17:39 No Phil... if use "y" in format specifier, Windows [in portuguese version] not accept (message: invalid format)... Thanks! ---------------------------------------------------------------------- Phil · 2008-01-24 18:34 Quote from: "OnixJr"No Phil... if use "y" in format specifier, Windows [in portuguese version] not accept (message: invalid format)... It looks like you're not alone in hitting this problem: http://forums.asp.net/p/257052/257814.aspx You might do some googling to see if anyone has found a workaround. I found several other posts where people are asking about this, but no answers. At least it doesn't appear to be a problem with Free Pascal's RTL. Thanks. -Phil