OpenBSD error: Illegal character in format string. lazarus / 23-Operating Systems ---------------------------------------------------------------------- crsc · 2016-01-01 08:08 Hello, I installed FPC 3.0.0 and Lazarus 1.4.4 on OpenBSD x86_64. When I place objects like buttons on the form and press F9 to compile and run, everything works fine. When I change something on the form, like move the buttons or insert some code, I got following error message: QuoteIllegal character in format string. Press OK to ignore and risk data corruption. Press Cancel to kill the program. Now I have to delete following XML file: ~/lazarus/project1/lib/x86_64-openbsd/project1.compiled Without this file, I can compile again but a compilation create this file again. Before every compilation I have to delete it. Do you have an idea, what the problem can be and how to fix it? ---------------------------------------------------------------------- Bart · 2016-01-01 11:14 Can you create a backtrace? Run Lazarus inside gdb, provoke the error and then create the backtrace. See: http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB. Bart ---------------------------------------------------------------------- crsc · 2016-01-01 13:08 Hello Bart, not sure if I made the backtrace correct: Quote (gdb) run Starting program: /usr/local/bin/lazarus-ide TMainIDE.ParseCmdLineOptions:   PrimaryConfigPath="/home/cr/.lazarus"   SecondaryConfigPath="/etc/lazarus" TBuildManager.SetBuildTarget Old=x86_64-openbsd-gtk2 New=x86_64-openbsd-gtk2 FPC=True LCL=False TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/cr/mystuff/workspace/src/lazarus/projects/project1/unit1.pas TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner [TMainIDE.DoRunProject] INIT TMainIDE.DoInitProjectRun Check build ... TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Last= -Fu.  -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq fcllaz.pas TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Last= -Fu../../packager/units/x86_64-openbsd;.  -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq lazutils.pas TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Last= -Fuforms;widget set;nonwin32;../packager/units/x86_64- openbsd;../components/lazutils/lib/x86_64-openbsd;. -Fiinclude  -MObjFPC -Scghi -O1 -g -gl -vew -l alllclunits.pp TFPCTargetConfigCache.NeedsUpdate TargetOS="" TargetCPU="" Options="- Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg" compiler file changed "/usr/local/bin/fpc" FileAge=1451348368 StoredAge=0 TFPCTargetConfigCache.Update /usr/local/bin/fpc TargetOS= TargetCPU= C ompilerOptions=- Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg ExtraOp tions=-Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg PATH=/home/cr/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/lo cal/bin:/usr/local/sbin:/usr/games:.:/home/cr/mystuff/workspace/bin RunTool /usr/local/bin/fpc "-iWTOTP" "-Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg" "-Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg" [New process 31712] RunTool /usr/local/bin/fpc "-va" "-Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg" "-Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg" "compilertest.pas" TFPCTargetConfigCache.Update: has changed TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Last= -MObjFPC -Scghi -O1 -g -gl -vewnhi -l -Fugtk2;../../packager/units/x86_64- openbsd;../../components/lazutils/lib/x86_64-openbsd;../units/x86_64- openbsd;. -Figtk2 lcl.pas TMainIDE.CheckIfProjectNeedsCompilation  Src has changed Project /home/cr/mystuff/workspace/src/lazarus/projects/project1/unit1.pas TApplication.HandleException Illegal character in format string   Stack trace:   $000000000077117A   $0000000000771A17   $0000000000770D47   $0000000000E08DBC line 1291 of buildmanager.pas   $00000000007C1A55 line 6656 of main.pp   $00000000007C2F1D line 6926 of main.pp   $00000000007C30FD line 6952 of main.pp   $00000000007B3EA2 line 3277 of main.pp   $0000000000C434DA line 1559 of ../designer/designer.pp   $0000000000C46D19 line 2706 of ../designer/designer.pp   $0000000000C47BDB line 2934 of ../designer/designer.pp   $0000000000966732 line 2036 of include/control.inc   $00000000009599B4 line 5341 of include/wincontrol.inc   $0000000000A2A172 line 112 of lclmessageglue.pas   $00000000009E42B5 line 3628 of gtk2proc.inc   $00000000009E1C85 line 1962 of gtk2proc.inc   $00000000009E0CB2 line 2368 of gtk2proc.inc [TMainIDE.Destroy] A Program received signal SIGSEGV, Segmentation fault. 0x00000000007db06a in BEGINCODETOOL (this=0x2d92ba1c0, ADESIGNER=0x2f9c06ef0,     ACTIVESRCEDIT=0x0, ACTIVEUNITINFO=0x0, FLAGS=1) at mainbase.pas:388 388       if (not (ctfSourceEditorNotNeeded in Flags)) and (SourceEditorManager.SourceEditorCount=0) Current language:  auto; currently minimal (gdb) backtrace #0  0x00000000007db06a in BEGINCODETOOL (this=0x2d92ba1c0,     ADESIGNER=0x2f9c06ef0, ACTIVESRCEDIT=0x0, ACTIVEUNITINFO=0x0, FLAGS=1)     at mainbase.pas:388 #1  0x00000000007c9667 in ONPROPHOOKPERSISTENTDELETING (this=0x2d92ba1c0,     APERSISTENT=0x2f9c08f90) at main.pp:8620 #2  0x0000000000b86625 in PERSISTENTDELETING (this=0x2d92ba340,     APERSISTENT=0x2f9c08f90) at propedits.pp:5679 #3  0x0000000000c478f3 in DODELETEPERSISTENT (this=0x2f9c06ef0,     APERSISTENT=0x2f9c08f90, FREEIT=false) at ../designer/designer.pp:2895 #4  0x0000000000c4809b in NOTIFICATION (this=0x2f9c06ef0,     ACOMPONENT=0x2f9c08f90, OPERATION=OPREMOVE) at ../designer/designer.pp:3045 #5  0x00000000007848dc in NOTIFICATION (this=0x2f9c08f90,     ACOMPONENT=0x2f9c08f90, OPERATION=OPREMOVE) at customform.inc:283 #6  0x0000000000808d7e in CLASSES$_$TCOMPONENT_$__$$_DESTROY () #7  0x00000002d92ba1c0 in ?? () #8  0x00007f7ffffd7410 in ?? () #9  0x000000024ed3f6c0 in ?? () #10 0x00000000009f14c0 in GTK2PROC_$$_GTKMAP$PGTKWIDGET$POINTER$$BOOLEAN32 () #11 0x000000000096dc45 in DESTROY (this=0x2f9c08f90, vmt=0x0)     at control.inc:4858 #12 0x000000000095c1f2 in DESTROY (this=0x2f9c08f90, vmt=0x0)     at wincontrol.inc:6513 #13 0x0000000000970491 in DESTROY (this=0x2f9c08f90, vmt=0x0)     at customcontrol.inc:54 #14 0x0000000000783431 in DESTROY (this=0x2f9c08f90, vmt=0x0)     at scrollingwincontrol.inc:315 #15 0x0000000000784621 in DESTROY (this=0x2f9c08f90, vmt=0x1)     at customform.inc:207 #16 0x0000000000749160 in SYSTEM$_$TOBJECT_$__$$_FREE () #17 0x00000002d92ba1c0 in ?? () #18 0x0000000000c2fece in DESTROYJITCOMPONENT (this=0x2f48e9500, INDEX=0)     at ../designer/jitforms.pp:765 #19 0x0000000000c2fbfb in DESTROY (this=0x2f48e9500, vmt=0x1)     at ../designer/jitforms.pp:716 #20 0x0000000000749160 in SYSTEM$_$TOBJECT_$__$$_FREE () #21 0x00000002d92ba1c0 in ?? () #22 0x000000000077a907 in SYSUTILS_$$_FREEANDNIL$formal () #23 0x000000025ef6c950 in ?? () #24 0x0000000000c4e159 in DESTROY (this=0x28d46d240, vmt=0x1)     at customformeditor.pp:486 #25 0x0000000000749160 in SYSTEM$_$TOBJECT_$__$$_FREE () #26 0x00000002d92ba040 in ?? () #27 0x0000000000c4cf32 in FREEFORMEDITOR () at formeditor.pp:79 #28 0x00000000007ab1f3 in DESTROY (this=0x2d92ba1c0, vmt=0x1) at main.pp:1620 #29 0x0000000000749160 in SYSTEM$_$TOBJECT_$__$$_FREE () #30 0x0000000265b57970 in ?? () #31 0x0000000000792dd7 in DOBEFOREFINALIZATION (this=0x27e7142b0)     at application.inc:1086 #32 0x00000000007807c6 in BEFOREFINALIZATION () at forms.pp:1842 #33 0x000000000074d809 in SYSTEM_$$_INTERNALEXIT () #34 0x00007f7ffffd6c10 in ?? () #35 0x00000002a4f2bda0 in _rthread_findstorage (key=0)     at /usr/src/lib/librthread/rthread_tls.c:104 #36 0x0000000000000000 in ?? () ---------------------------------------------------------------------- Bart · 2016-01-01 17:03 Thanks for the backtrace. Before investigating this further, I would like to ask you to try the 1.6RC (witih the same compiler) and see if the issue is present there as well. If the problem is not there in 1.6, we will not try to fix it in 1.4 branch, since that is end of life. One more question: do you have the IDE setup in a different language than English? If so, please make the laguage English to see if the error is gone. (If so, the problem will be in some .po file, and it should be easy to fix.) Bart ---------------------------------------------------------------------- crsc · 2016-01-01 18:31 Hello Bart, thank you very much for your help. I also tried 1.6RC but the problem is the same. The language of my system and of the lazarus IDE is set on us english. Thanks again. Greetings, Christian PS: Here the backtrace with 1.6RC1-0: Quote (gdb) run Starting program: /home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1-0/lazarus TMainIDE.ParseCmdLineOptions:   PrimaryConfigPath="/home/cr/.lazarus"   SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-openbsd-gtk2 New=x86_64-openbsd-gtk2 FPC=True LCL=False TMainIDE.SetupInteractive /usr/bin/make TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/cr/mystuff/workspace/src/lazarus/projects/project1/unit1.pas TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner [TMainIDE.DoRunProject] INIT TMainIDE.DoInitProjectRun Check build ... * TMainIDE.SaveDesktopSettings Hint: [TFPCTargetConfigCache.NeedsUpdate] TargetOS="" TargetCPU="" Opt ions="-Fr/home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1- 0/components/codetools/fpc.errore.msg" compiler file changed "/usr/local/bin/fpc" FileAge=1451348368 StoredAge=0 Hint: [TFPCTargetConfigCache.NeedsUpdate] /usr/local/bin/fpc TargetOS= TargetCPU= CompilerOptions=- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1- 0/components/codetools/fpc.errore.msg ExtraOptions=- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1- 0/components/codetools/fpc.errore.msg PATH=/home/cr/bin:/bin:/sbin:/us r/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/gam es:.:/home/cr/mystuff/workspace/bin Hint: (lazarus) [RunTool] /usr/local/bin/fpc "-iWTOTP" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1- 0/components/codetools/fpc.errore.msg" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1- 0/components/codetools/fpc.errore.msg" [New process 15024] Hint: (lazarus) [RunTool] /usr/local/bin/fpc "-va" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1- 0/components/codetools/fpc.errore.msg" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus-1.6RC1- 0/components/codetools/fpc.errore.msg" "compilertest.pas" Hint: [TFPCTargetConfigCache.Update] has changed Hint: (lazarus) Project needs building: Src has changed Project /home/cr/mystuff/workspace/src/lazarus/projects/project1/unit1.pas TApplication.HandleException Illegal character in format string   Stack trace:   $00000000007895BA   $0000000000789E57   $0000000000789187   $0000000000E4BA0F line 1272 of buildmanager.pas   $00000000007DF089 line 6546 of main.pp   $00000000007E053A line 6816 of main.pp   $00000000007E0769 line 6842 of main.pp   $00000000007D11FC line 3228 of main.pp   $0000000000C75DBA line 1568 of ../designer/designer.pp   $0000000000C79679 line 2735 of ../designer/designer.pp   $0000000000C7A54B line 2965 of ../designer/designer.pp   $0000000000987162 line 2036 of include/control.inc   $000000000097A2F4 line 5383 of include/wincontrol.inc   $0000000000A4AFF2 line 112 of lclmessageglue.pas   $0000000000A07A25 line 3628 of gtk2proc.inc   $0000000000A05445 line 1962 of gtk2proc.inc   $0000000000A044B7 line 2368 of gtk2proc.inc [TMainIDE.Destroy] A Program received signal SIGSEGV, Segmentation fault. 0x0000000000c8bf1d in SETCUSTOMFORM (this=0x3009b35f0)     at ../designer/controlselection.pp:1163 1163      if FForm is FormEditingHook.NonFormProxyDesignerForm[NonCont rolProxyDesignerFormId] then Current language:  auto; currently minimal (gdb) backtrace #0  0x0000000000c8bf1d in SETCUSTOMFORM (this=0x3009b35f0)     at ../designer/controlselection.pp:1163 #1  0x0000000000c8f8f1 in DELETE (this=0x3009b35f0, INDEX=0)     at ../designer/controlselection.pp:2278 #2  0x0000000000c8f818 in REMOVE (this=0x3009b35f0, APERSISTENT=0x2ad6e3a50)     at ../designer/controlselection.pp:2260 #3  0x0000000000c7a1cb in DODELETEPERSISTENT (this=0x2042ae130,     APERSISTENT=0x2ad6e3a50, FREEIT=false) at ../designer/designer.pp:2905 #4  0x0000000000c7aa0b in NOTIFICATION (this=0x2042ae130,     ACOMPONENT=0x2ad6e3a50, OPERATION=OPREMOVE) at ../designer/designer.pp:3076 #5  0x000000000079fdcc in NOTIFICATION (this=0x2ad6e3a50,     ACOMPONENT=0x2ad6e3a50, OPERATION=OPREMOVE) at customform.inc:283 #6  0x00000000008290be in CLASSES$_$TCOMPONENT_$__$$_DESTROY () #7  0x00000002b0a081c0 in ?? () #8  0x00007f7ffffd2040 in ?? () #9  0x000000026c74a6f0 in ?? () #10 0x0000000000a14c30 in GTK2PROC_$$_GTKMAP$PGTKWIDGET$POINTER$$BOOLEAN32 () #11 0x000000000098e675 in DESTROY (this=0x2ad6e3a50, vmt=0x0)     at control.inc:4855 #12 0x000000000097cc22 in DESTROY (this=0x2ad6e3a50, vmt=0x0)     at wincontrol.inc:6569 #13 0x0000000000990ec1 in DESTROY (this=0x2ad6e3a50, vmt=0x0)     at customcontrol.inc:54 #14 0x000000000079e921 in DESTROY (this=0x2ad6e3a50, vmt=0x0)     at scrollingwincontrol.inc:338 #15 0x000000000079fb11 in DESTROY (this=0x2ad6e3a50, vmt=0x1)     at customform.inc:207 #16 0x00000000007615a0 in SYSTEM$_$TOBJECT_$__$$_FREE () #17 0x00000002b0a081c0 in ?? () #18 0x0000000000c5fdce in DESTROYJITCOMPONENT (this=0x288ddbe80, INDEX=0)     at ../designer/jitforms.pp:765 #19 0x0000000000c5fafb in DESTROY (this=0x288ddbe80, vmt=0x1)     at ../designer/jitforms.pp:716 #20 0x00000000007615a0 in SYSTEM$_$TOBJECT_$__$$_FREE () #21 0x00000002b0a081c0 in ?? () #22 0x0000000000792d47 in SYSUTILS_$$_FREEANDNIL$formal () #23 0x0000000204267ff0 in ?? () #24 0x0000000000c80b49 in DESTROY (this=0x2df740d00, vmt=0x1)     at customformeditor.pp:483 #25 0x00000000007615a0 in SYSTEM$_$TOBJECT_$__$$_FREE () #26 0x00000002fc4bf040 in ?? () #27 0x0000000000c7f8c2 in FREEFORMEDITOR () at formeditor.pp:79 #28 0x00000000007c8f86 in DESTROY (this=0x29ad686b0, vmt=0x1) at main.pp:1644 #29 0x00000000007615a0 in SYSTEM$_$TOBJECT_$__$$_FREE () #30 0x00000002886a9050 in ?? () #31 0x00000000007ae2a7 in DOBEFOREFINALIZATION (this=0x287f612b0)     at application.inc:1081 #32 0x000000000079ba86 in BEFOREFINALIZATION () at forms.pp:1848 #33 0x0000000000765c49 in SYSTEM_$$_INTERNALEXIT () #34 0x00007f7ffffd1850 in ?? () #35 0x0000000206afbe58 in pthread_getspecific (key=Variable "key" is not available. )     at /usr/src/lib/librthread/rthread_tls.c:132 #36 0x0000000289436518 in ?? () #37 0x0000000000000000 in ?? () ---------------------------------------------------------------------- Bart · 2016-01-01 22:23 I keep pestering you: Please open a ticket about this in the bugtracker. Not all devels read the forum. Issues on the bugtracker won't be forgotten. Attach the backtrace there also. You can add a link to this forum thread in the description. If you dare: can you try to reproduce the issue with Lazarus trunk as well? Bart ---------------------------------------------------------------------- marcov · 2016-01-01 22:45 That line seems to refer to fileagetostr which uses datetimetostr. That uses system  locale (and afaik that is not related to IDE language which is gettext?) It's a pity that there are no tracebacks into  the FPC rtl. ---------------------------------------------------------------------- crsc · 2016-01-02 08:41 Quote from: Bart on January 01, 2016, 11:23:02 pm I keep pestering you: Please open a ticket about this in the bugtracker. Not all devels read the forum. Issues on the bugtracker won't be forgotten. Attach the backtrace there also. You can add a link to this forum thread in the description. Hello Bart, thank you. I'll open a ticket in the bugtracker soon. First I have to check, how to do it correctly. ;-) Quote from: Bart on January 01, 2016, 11:23:02 pm If you dare: can you try to reproduce the issue with Lazarus trunk as well? The same with Lazarus trunk: Quote (gdb) run Starting program: /home/cr/mystuff/workspace/src/lazarus/lazarus/lazarus Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/cr/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-openbsd-gtk2 New=x86_64-openbsd-gtk2 FPC=True LCL=False TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/cr/mystuff/workspace/src/lazarus/projects/project1/unit1.pas TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner Hint: (lazarus) [TMainIDE.DoRunProject] INIT Hint: [TFPCTargetConfigCache.NeedsUpdate] TargetOS="" TargetCPU="" Opt ions="- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus/components/codetools/ fpc.errore.msg" compiler file changed "/usr/local/bin/fpc" FileAge=1451348368 StoredAge=0 Hint: [TFPCTargetConfigCache.NeedsUpdate] /usr/local/bin/fpc TargetOS= TargetCPU= CompilerOptions=- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus/components/codetools/ fpc.errore.msg ExtraOptions=- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus/components/codetools/ fpc.errore.msg PATH=/home/cr/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X1 1R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.:/home/cr/mystuff/w orkspace/bin Hint: (lazarus) [RunTool] /usr/local/bin/fpc "-iWTOTP" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus/components/codetools/ fpc.errore.msg" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus/components/codetools/ fpc.errore.msg" [New process 18413] Hint: (lazarus) [RunTool] /usr/local/bin/fpc "-va" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus/components/codetools/ fpc.errore.msg" "- Fr/home/cr/mystuff/workspace/src/lazarus/lazarus/components/codetools/ fpc.errore.msg" "compilertest.pas" Hint: [TFPCTargetConfigCache.Update] has changed Hint: (lazarus) State file of LCL 1.7 is newer than state file of Project: project1 TApplication.HandleException Illegal character in format string   Stack trace:   $00000000008A232A   $00000000008A2BC7   $00000000008A1EF7   $0000000000E028B6 line 3352 of ../packager/packagesystem.pas   $0000000000F69DDD line 1257 of buildmanager.pas   $00000000008F7C79 line 6542 of main.pp   $00000000008F9368 line 6845 of main.pp   $00000000008F95A9 line 6872 of main.pp   $00000000008E9F6C line 3233 of main.pp   $0000000000D9320A line 1568 of ../designer/designer.pp   $0000000000D96AC9 line 2735 of ../designer/designer.pp   $0000000000D9799B line 2965 of ../designer/designer.pp   $0000000000AA0B22 line 2038 of include/control.inc   $0000000000A93C74 line 5383 of include/wincontrol.inc   $0000000000B66892 line 112 of lclmessageglue.pas   $0000000000B21965 line 3628 of gtk2proc.inc   $0000000000B1F385 line 1962 of gtk2proc.inc Program received signal SIGSEGV, Segmentation fault. 0x0000000000914384 in BEGINCODETOOL (this=0x228fa4650, ADESIGNER=0x23bdb9b10,     ACTIVESRCEDIT=0x0, ACTIVEUNITINFO=0x0, FLAGS=1) at mainbase.pas:754 754       if (not (ctfSourceEditorNotNeeded in Flags)) and (SourceEditorManager.SourceEditorCount=0) Current language:  auto; currently minimal (gdb) backtrace #0  0x0000000000914384 in BEGINCODETOOL (this=0x228fa4650,     ADESIGNER=0x23bdb9b10, ACTIVESRCEDIT=0x0, ACTIVEUNITINFO=0x0, FLAGS=1)     at mainbase.pas:754 #1  0x000000000090073f in ONPROPHOOKPERSISTENTDELETING (this=0x228fa4650,     APERSISTENT=0x23bdbbbd0) at main.pp:8728 #2  0x0000000000cceb15 in PERSISTENTDELETING (this=0x211370860,     APERSISTENT=0x23bdbbbd0) at propedits.pp:5892 #3  0x0000000000d976a3 in DODELETEPERSISTENT (this=0x23bdb9b10,     APERSISTENT=0x23bdbbbd0, FREEIT=false) at ../designer/designer.pp:2924 #4  0x0000000000d97e5b in NOTIFICATION (this=0x23bdb9b10,     ACOMPONENT=0x23bdbbbd0, OPERATION=OPREMOVE) at ../designer/designer.pp:3076 #5  0x00000000008b8b3c in NOTIFICATION (this=0x23bdbbbd0,     ACOMPONENT=0x23bdbbbd0, OPERATION=OPREMOVE) at customform.inc:283 #6  0x00000000009425ce in CLASSES$_$TCOMPONENT_$__$$_DESTROY () #7  0x0000000228fa4650 in ?? () #8  0x00007f7ffffed2d0 in ?? () #9  0x00000002da6aa5e0 in ?? () #10 0x0000000000b2eb70 in GTK2PROC_$$_GTKMAP$PGTKWIDGET$POINTER$$BOOLEAN32 () #11 0x0000000000aa8035 in DESTROY (this=0x23bdbbbd0, vmt=0x0)     at control.inc:4857 #12 0x0000000000a965a2 in DESTROY (this=0x23bdbbbd0, vmt=0x0)     at wincontrol.inc:6569 #13 0x0000000000aaa881 in DESTROY (this=0x23bdbbbd0, vmt=0x0)     at customcontrol.inc:54 #14 0x00000000008b7691 in DESTROY (this=0x23bdbbbd0, vmt=0x0)     at scrollingwincontrol.inc:338 #15 0x00000000008b8881 in DESTROY (this=0x23bdbbbd0, vmt=0x1)     at customform.inc:207 #16 0x000000000087a310 in SYSTEM$_$TOBJECT_$__$$_FREE () #17 0x0000000228fa4650 in ?? () #18 0x0000000000d7d21e in DESTROYJITCOMPONENT (this=0x27eb1c940, INDEX=0)     at ../designer/jitforms.pp:765 #19 0x0000000000d7cf4b in DESTROY (this=0x27eb1c940, vmt=0x1)     at ../designer/jitforms.pp:716 #20 0x000000000087a310 in SYSTEM$_$TOBJECT_$__$$_FREE () #21 0x0000000228fa4650 in ?? () #22 0x00000000008abab7 in SYSUTILS_$$_FREEANDNIL$formal () #23 0x00000002df6d4a50 in ?? () #24 0x0000000000d9df99 in DESTROY (this=0x29e1f5ba0, vmt=0x1)     at customformeditor.pp:483 #25 0x000000000087a310 in SYSTEM$_$TOBJECT_$__$$_FREE () #26 0x0000000214276040 in ?? () #27 0x0000000000d9cd12 in FREEFORMEDITOR () at formeditor.pp:79 #28 0x00000000008e1d44 in DESTROY (this=0x228fa4650, vmt=0x1) at main.pp:1646 #29 0x000000000087a310 in SYSTEM$_$TOBJECT_$__$$_FREE () #30 0x00000002de0eb710 in ?? () #31 0x00000000008c70d7 in DOBEFOREFINALIZATION (this=0x24cd472b0)     at application.inc:1081 #32 0x00000000008b47f6 in BEFOREFINALIZATION () at forms.pp:1850 #33 0x000000000087e9b9 in SYSTEM_$$_INTERNALEXIT () #34 0x00007f7ffffecae0 in ?? () #35 0x00000002d059ce58 in pthread_getspecific (key=Variable "key" is not available. )     at /usr/src/lib/librthread/rthread_tls.c:132 #36 0x00000002e1300778 in ?? () ---Type to continue, or q to quit--- #37 0x0000000000000000 in ?? () Quote from: marcov on January 01, 2016, 11:45:23 pm That line seems to refer to fileagetostr which uses datetimetostr. That uses system  locale (and afaik that is not related to IDE language which is gettext?) It's a pity that there are no tracebacks into  the FPC rtl. Hello marcov, the default system locale on OpenBSD is: Quote $ locale                                                                    LANG= LC_COLLATE="C" LC_CTYPE="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_MESSAGES="C" LC_ALL= Not sure it this is okay for Lazarus. The installed gettext version is ``gettext-0.19.6'' and ``gettext-tools-0.19.6''. ---------------------------------------------------------------------- marcov · 2016-01-02 14:08 Write a small program that imports "clocale" and sysutils and write out all fields of the formatsettings variable. ---------------------------------------------------------------------- crsc · 2016-01-02 18:38 Hello marcov, thank you for your help. I've written a small console fpc program with following output: Quote CurrencyFormat = "1" NegCurrFormat = "5" Ord(ThousandSeparator) = "0" Ord(DecimalSeparator) = "0" CurrencyDecimals = "127" DateSeparator = ":" TimeSeparator = ":" ListSeparator = "," CurrencyString = "" ShortDateFormat = "hh:nn:ss" LongDateFormat = "hh:nn:ss" TimeAMString = "PM" TimePMString = "Sunday" ShortTimeFormat = "hh:nn:ss ampm" LongTimeFormat = "AM" ShortMonthNames[1] = "Feb" LongMonthNames[1] = "February" ShortDayNames[1] = "Mon" LongDayNames[1] = "Monday" TwoDigitYearCenturyWindow = "50" ---------------------------------------------------------------------- Bart · 2016-01-03 12:48 DecimalSeparator is what? Can you write Ord(DecimalSeparator) as well? Bart ---------------------------------------------------------------------- marcov · 2016-01-03 13:06 Quote from: crsc on January 02, 2016, 07:38:33 pmHello marcov, thank you for your help. I've written a small console fpc program with following output: QuoteTimeAMString = "PM" TimePMString = "Sunday" ShortTimeFormat = "hh:nn:ss ampm" LongTimeFormat = "AM" Seems longtimeformat and AM/PM strings are corrupt. You might workaround this by setting it to something ('yyyy-mm-dd ' +shorttimeformat or so) in the first line of your mainprogram. Debugging what goes wrong in clocale would even be better. ---------------------------------------------------------------------- crsc · 2016-01-03 14:10 Hello marcov, thank you for your support and help. It seems that you have detected the bug. I made my first bugreport. ;-) http://bugs.freepascal.org/view.php?id=29317 ---------------------------------------------------------------------- marcov · 2016-01-03 14:39 Thanks. I added the output of the locale command in a comment. (edited: New direct gitlab link of the report: https://gitlab.com/freepascal.org/fpc/source/-/issues/29317 ) ---------------------------------------------------------------------- crsc · 2016-01-03 15:09 marcov, thank you. Bart, I updated the table above. The outputs are: Ord(ThousandSeparator) = "0" Ord(DecimalSeparator) = "0" ---------------------------------------------------------------------- Bart · 2016-01-03 15:35 Rather odd. Having no thousandseparator, OK, but having no DecimalSeparator? (Pascal does not mind having a #0 in a string, no WS is going to display it). Out of curiousity, what is the output of FloatToStr(1.23) (using sysutils+clocale unit)? Bart ---------------------------------------------------------------------- crsc · 2016-01-03 15:41 Bart, you found the next bug in clocale. Very strange. The output is: FloatToStr(1.23) = "123" ---------------------------------------------------------------------- Bart · 2016-01-03 15:46 I added a note in the bugtracker. Bart ---------------------------------------------------------------------- crsc · 2016-01-20 10:20 I was busy for a while but today I tried to fix some things. It's impossible to build fpc on OpenBSD. How are the OpenBSD-packages build? Via cross compiling? In the attached file you will find the build error, if you are interested. Any idea, what the problem can be? ---------------------------------------------------------------------- marcov · 2016-01-20 11:18 QuoteError: Path "./" does not exist Sounds like something goes wrong with expanding paths. (expandfilename/fexpand and everything it depends on (readdir*) and one very special routine). To avoid shell problems, use bash as shell. The release has the following warning in the readme: Quote The release has been generated on a virtual machine running OpenBSD release 4   It may not work on more recent OpenBSD releases.   WARNING: on a 5.4 vmware virtual machine, installation produces a kernel erro   Due to changes in system structure layouts like dirent and stat structures this release is not working on any system post-5.4 either.   Any help in maintaining OpenBSD target for Free Pascal would be most welcome! See Free Pascal website: http://www.freepascal.org Pierre Muller In short, it is for openBSD 4, and not 5, and that could explain the locale issues too, as well as the expandfile problems (which are dirent dependent) ---------------------------------------------------------------------- crsc · 2016-01-20 13:03 Thank you for your answer. I'll do some test builds with an old version of OpenBSD and do tests with the clocale / formatsettings functions. ---------------------------------------------------------------------- ab1jx · 2016-02-04 05:20 I just wanted to say that OpenBSD does NOT have a working locale, the problem crops up with other things too. ---------------------------------------------------------------------- Superdisk · 2022-03-05 15:39 I'm running into this same issue now. It affects Lazarus, since in Lazarus 2.2.0, there are 3 instances of clocale: Code: [Select]➜  lazarus-lazarus_2_2_0 grep -nirI "clocale" . ./components/datetimectrls/datetimepicker.pas:46:  { clocale, // needed to initialize default locale settings on Linux. } ./components/lazreport/source/lr_class.pas:20:{ CLocale, } ./ide/lazarus.pp:54:  { clocale, } I hacked around it by just commenting them out for now. ---------------------------------------------------------------------- Thaddy · 2022-03-05 16:26 If you feel obliged to answer on a six+ years old thread, plz give a compilable example, because OpenBSD has no issues in this particular field I am aware of. Otherwise someone would have complained in the mean time.... OpenBSD is well maintained, although not very mainstream. (Users tend to be network pro's) Marco has a lot of knowledge about the BSD flavors, as well as some others on the forum. ---------------------------------------------------------------------- Superdisk · 2022-03-05 16:35 I don't see anything wrong with bumping an old thread, especially if it's still relevant today. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program asdf;uses clocale, sysutils; begin   writeln('yeah', floattostr(1.23));        with FormatSettings do begin     writeln(CurrencyFormat);     writeln(NegCurrFormat);     writeln(Ord(ThousandSeparator));     writeln(Ord(DecimalSeparator));     writeln(CurrencyDecimals);     writeln(DateSeparator);     writeln(TimeSeparator);     writeln(ListSeparator);     writeln(CurrencyString);     writeln(ShortDateFormat);     writeln(LongDateFormat);     writeln(TimeAMString);     writeln(TimePMString);     writeln(ShortTimeFormat);     writeln(LongTimeFormat);     writeln(ShortMonthNames[1]);     writeln(LongMonthNames[1]);     writeln(ShortDayNames[1]);     writeln(LongDayNames[1]);     writeln(TwoDigitYearCenturyWindow);      end;end. Here's the compilable code-- note that DecimalSeparator and the date formats are still screwed up and show the same output as in the previous post in this thread. ---------------------------------------------------------------------- Bart · 2022-03-05 17:38 Why would you think this was fixed, when the bugreport is not closed? Bart ---------------------------------------------------------------------- Thaddy · 2022-03-05 19:42 I grepped my answer. Could not find "fixed" BTW you do not take the time to open up a BSD of any flavor... ---------------------------------------------------------------------- AlexTP · 2022-03-06 07:58 I wrote a small (micro) idea to the GitLab issue linked above. ---------------------------------------------------------------------- Bart · 2022-03-06 17:10 Quote from: AlexTP on March 06, 2022, 08:58:57 amI wrote a small (micro) idea to the GitLab issue linked above. Curiously this issue at hand did not move to the first page of the bugtracker, even though ATM 9 hours ago you added a note? Bart ---------------------------------------------------------------------- AlexTP · 2022-03-06 17:24 I don't see this issue at the top, as well. ---------------------------------------------------------------------- simonm · 2022-08-21 06:39 I've just posted a fix back on issue tracker on GitLab linked above. I'm surprised it's taken this long for a fix. I added patches to the port and did a test build and works as expected. ---------------------------------------------------------------------- marcov · 2022-08-21 12:21 I blended your fix into the original file and I'll put it on my merge fixes list if confirmed working.