Recent

Author Topic: OpenBSD error: Illegal character in format string.  (Read 23031 times)

crsc

  • New Member
  • *
  • Posts: 14
OpenBSD error: Illegal character in format string.
« on: January 01, 2016, 09:08:36 am »
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:

Quote
Illegal 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

  • Hero Member
  • *****
  • Posts: 5469
    • Bart en Mariska's Webstek
Re: OpenBSD error: Illegal character in format string.
« Reply #1 on: January 01, 2016, 12:14:31 pm »
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

  • New Member
  • *
  • Posts: 14
Re: OpenBSD error: Illegal character in format string.
« Reply #2 on: January 01, 2016, 02:08:53 pm »
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;widgetset;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= CompilerOptions=-Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg ExtraOptions=-Fr/usr/local/share/lazarus/components/codetools/fpc.errore.msg PATH=/home/cr/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/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 ?? ()

« Last Edit: January 01, 2016, 02:28:02 pm by crsc »

Bart

  • Hero Member
  • *****
  • Posts: 5469
    • Bart en Mariska's Webstek
Re: OpenBSD error: Illegal character in format string.
« Reply #3 on: January 01, 2016, 06:03:56 pm »
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
« Last Edit: January 01, 2016, 06:05:53 pm by Bart »

crsc

  • New Member
  • *
  • Posts: 14
Re: OpenBSD error: Illegal character in format string.
« Reply #4 on: January 01, 2016, 07:31:06 pm »
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="" Options="-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:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.:/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[NonControlProxyDesignerFormId] 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 ?? ()

« Last Edit: January 01, 2016, 11:19:31 pm by crsc »

Bart

  • Hero Member
  • *****
  • Posts: 5469
    • Bart en Mariska's Webstek
Re: OpenBSD error: Illegal character in format string.
« Reply #5 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.

If you dare: can you try to reproduce the issue with Lazarus trunk as well?

Bart

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11945
  • FPC developer.
Re: OpenBSD error: Illegal character in format string.
« Reply #6 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.

crsc

  • New Member
  • *
  • Posts: 14
Re: OpenBSD error: Illegal character in format string.
« Reply #7 on: January 02, 2016, 09:41:18 am »

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. ;-)



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="" Options="-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/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.:/home/cr/mystuff/workspace/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 <return> to continue, or q <return> to quit---
#37 0x0000000000000000 in ?? ()




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''.
« Last Edit: January 02, 2016, 09:46:39 am by crsc »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11945
  • FPC developer.
Re: OpenBSD error: Illegal character in format string.
« Reply #8 on: January 02, 2016, 03:08:55 pm »
Write a small program that imports "clocale" and sysutils and write out all fields of the formatsettings variable.

crsc

  • New Member
  • *
  • Posts: 14
Re: OpenBSD error: Illegal character in format string.
« Reply #9 on: January 02, 2016, 07:38:33 pm »
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"

« Last Edit: January 03, 2016, 04:08:39 pm by crsc »

Bart

  • Hero Member
  • *****
  • Posts: 5469
    • Bart en Mariska's Webstek
Re: OpenBSD error: Illegal character in format string.
« Reply #10 on: January 03, 2016, 01:48:27 pm »
DecimalSeparator is what?
Can you write Ord(DecimalSeparator) as well?

Bart

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11945
  • FPC developer.
Re: OpenBSD error: Illegal character in format string.
« Reply #11 on: January 03, 2016, 02:06:53 pm »
Hello marcov,

thank you for your help. I've written a small console fpc program with following output:

Quote
TimeAMString = "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

  • New Member
  • *
  • Posts: 14
Re: OpenBSD error: Illegal character in format string.
« Reply #12 on: January 03, 2016, 03:10:14 pm »
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
« Last Edit: January 03, 2016, 03:30:35 pm by crsc »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11945
  • FPC developer.
Re: OpenBSD error: Illegal character in format string.
« Reply #13 on: January 03, 2016, 03:39:45 pm »
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 )
« Last Edit: March 05, 2022, 07:15:16 pm by marcov »

crsc

  • New Member
  • *
  • Posts: 14
Re: OpenBSD error: Illegal character in format string.
« Reply #14 on: January 03, 2016, 04:09:48 pm »
marcov, thank you.

Bart, I updated the table above. The outputs are:

Ord(ThousandSeparator) = "0"
Ord(DecimalSeparator) = "0"

 

TinyPortal © 2005-2018