[Lazarus] OpenBSD 5.8 64bit - lazarus - exception

Tomaž Žveglič tomaz.zveglic at gmail.com
Wed Oct 28 13:36:12 CET 2015


On 28.10.2015 11:41, Zeljko wrote:
> ...

> Seem that nil params kills openbsd 64. Go to 
> FontIsDoubleByteCharsFont() in gtk2proc.inc and add dummy integers to 
> null params.
> var
>   SingleCharLen, DoubleCharLen, DummyCharHeight {added}: integer;
> begin
>   pango_layout_set_single_paragraph_mode(TheFont, TRUE);
>   pango_layout_set_width(TheFont, -1);
>   pango_layout_set_text(TheFont, 'A', 1);
>   pango_layout_get_pixel_size(TheFont, @SingleCharLen, @DummyCharHeight);
>   pango_layout_set_text(TheFont, #0'A', 2);
>   pango_layout_get_pixel_size(TheFont, @DoubleCharLen, 
> @DummmyCharHeight);
>   Result:=(SingleCharLen=0) and (DoubleCharLen>0);
> end;
>
> now test
>
> zeljko
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Hi Željko,

Thanks for reply.

I did as you suggest and I also did similar changes to FontIsMonoSpaceFont.

Result:
-----------------------------------------------------------
# ./lazarus
TMainIDE.ParseCmdLineOptions:
   PrimaryConfigPath="/root/.lazarus"
   SecondaryConfigPath="/etc/lazarus"
TApplication.HandleException Access violation
   Stack trace:
   $000000020CAC901D line 1083 of 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c
[TGtk2WidgetSet.Destroy] WARNING: There are 4 unreleased DCs, a detailed 
dump follows:
[TGtk2WidgetSet.Destroy]  DCs:   00000002FE9C9840 00000002FE9C9640 
00000002FE9C9440 00000002FE9C9240
[TGtk2WidgetSet.Destroy] WARNING: There are 6 unreleased GDIObjects, a 
detailed dump follows:
[TGtk2WidgetSet.Destroy]   GDIOs: 000000025E4998C0 000000025E4996C0 
000000025E499740 000000025E4997C0 000000025E499640 000000025E4995C0
[TGtk2WidgetSet.Destroy]   gdiBitmap: 2
[TGtk2WidgetSet.Destroy]   gdiBrush: 1
[TGtk2WidgetSet.Destroy]   gdiFont: 2
[TGtk2WidgetSet.Destroy]   gdiRegion: 1
-----------------------------------------------------------

-----------------------------------------------------------
# gdb ./lazarus
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd5.8"...
(gdb) run
Starting program: /root/lazarus/lazarus
TMainIDE.ParseCmdLineOptions:
   PrimaryConfigPath="/root/.lazarus"
   SecondaryConfigPath="/etc/lazarus"

Program received signal SIGBUS, Bus error.
0x000000023a9a301d in IA__FcPatternBuild (p=0x0)
     at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083
1083 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c: 
No such file or directory.
         in 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c
Current language:  auto; currently c
(gdb) bt
#0  0x000000023a9a301d in IA__FcPatternBuild (p=0x0)
     at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083
#1  0x00000002b48e4306 in pango_fc_font_map_load_fontset ()
    from /usr/local/lib/libpangoft2-1.0.so.3600.0
#2  0x000000029ebecb7b in itemize_state_process_run ()
    from /usr/local/lib/libpango-1.0.so.3600.0
#3  0x000000029ebed338 in pango_itemize_with_base_dir ()
    from /usr/local/lib/libpango-1.0.so.3600.0
#4  0x000000029ebf6884 in pango_layout_check_lines ()
    from /usr/local/lib/libpango-1.0.so.3600.0
#5  0x000000029ebf7b06 in pango_layout_get_extents_internal ()
    from /usr/local/lib/libpango-1.0.so.3600.0
#6  0x000000029ebf8cf0 in pango_layout_get_pixel_extents ()
    from /usr/local/lib/libpango-1.0.so.3600.0
#7  0x000000029ebf8d7c in pango_layout_get_pixel_size ()
    from /usr/local/lib/libpango-1.0.so.3600.0
#8  0x0000000000b2ec49 in FONTISDOUBLEBYTECHARSFONT (THEFONT=0x2fcf18af0)
     at gtk2proc.inc:9221
#9  0x0000000000a306b2 in UPDATEDCTEXTMETRIC (this=0x26c167650, 
DC=0x268ee8240)
     at gtk2widgetset.inc:5913
#10 0x0000000000a3fd21 in GETTEXTMETRICS (this=0x26c167650, 
DC=10350395968, TM=
       {TMHEIGHT = 0, TMASCENT = 2, TMDESCENT = -210960, 
TMINTERNALLEADING = 32639, TMEXTERNALLEADING = 11774176, TMAVECHARWIDTH 
= 0, TMMAXCHARWIDTH = 0, TMWEIGHT = 0, TMOVERHANG = 5, 
TMDIGITIZEDASPECTX = 1, TMDIGITIZEDASPECTY = 1760462912, TMFIRSTCHAR = 2 
'\002', TMLASTCHAR = 0 '\0', TMDEFAULTCHAR = 0 '\0', TMBREAKCHAR = 0 
'\0', TMITALIC = 0 '\0', TMUNDERLINED = 199 'Ç', TMSTRUCKOUT = 252 'ü', 
TMPITCHANDFAMILY = 255 '˙', TMCHARSET = 127 '\177'}) at gtk2winapi.inc:5988
#11 0x0000000000a36e87 in DRAWTEXT (this=0x26c167650, DC=10350395968,
     STR=0x1cc4c80 "1.4.4", COUNT=5, RECT=
         {LEFT = 0, TOP = 281, RIGHT = 450, BOTTOM = 300, TOPLEFT = {X = 
0, Y = 281}, BOTTOMRIGHT = {X = 450, Y = 300}}, FLAGS=3109) at 
gtk2winapi.inc:2717
#12 0x00000000009c9c13 in DRAWTEXT (DC=10350395968, STR=0x1cc4c80 "1.4.4",
     COUNT=5, RECT=
         {LEFT = 0, TOP = 281, RIGHT = 450, BOTTOM = 300, TOPLEFT = {X = 
0, Y = 281}, BOTTOMRIGHT = {X = 450, Y = 300}}, FLAGS=3109) at 
winapi.inc:210
#13 0x00000000009bd87f in TEXTRECT (this=0x2f0e02f40, ARECT=
         {LEFT = 0, TOP = 281, RIGHT = 450, BOTTOM = 300, TOPLEFT = {X = 
0, Y = 281}, BOTTOMRIGHT = {X = 450, Y = 300}}, X=0, Y=281, 
TEXT=0x1cc4c80 "1.4.4",
     STYLE=
---Type <return> to continue, or q <return> to quit---
       {ALIGNMENT = TACENTER, LAYOUT = TLCENTER, SINGLELINE = true, 
CLIPPING = true, EXPANDTABS = false, SHOWPREFIX = false, WORDBREAK = 
false, OPAQUE = false, SYSTEMFONT = false, RIGHTTOLEFT = false, 
ENDELLIPSIS = false})
     at canvas.inc:1302
#14 0x00000000008aad8b in IMAGEPAINT (this=0x2c4590e10, SENDER=0x2c4593c90)
     at splash.pp:118
#15 0x0000000000aa3761 in PAINT (this=0x2c4593c90) at graphiccontrol.inc:90
#16 0x0000000000b0e469 in PAINT (this=0x2c4593c90) at customimage.inc:226
#17 0x0000000000aa363f in WMPAINT (this=0x2c4593c90, MESSAGE=
       {MSG = 15, UNUSEDMSG = 2, DC = 10350395968, PAINTSTRUCT = 0x0, 
RESULT = 0}) at graphiccontrol.inc:58
#18 0x0000000000849589 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#19 0x0000000000aa3568 in CONTROLS_TGRAPHICCONTROL_$__DESTROY ()
     at customcontrol.inc:22
#20 0x0000000000a9649d in PERFORM (this=0x2c4593c90, MSG=15,
     WPARAM=10350395968, LPARAM=0) at control.inc:1451
#21 0x0000000000a86f67 in PAINTCONTROLS (this=0x2c4590e10, DC=10350395968,
     FIRST=0x0) at wincontrol.inc:4867
#22 0x0000000000a86d1e in PAINTHANDLER (this=0x2c4590e10, THEMESSAGE=
       {MSG = 15, UNUSEDMSG = 0, DC = 10350395968, PAINTSTRUCT = 
0x2a4447300, RESULT = 0}) at wincontrol.inc:4779
#23 0x0000000000a8b5d5 in WMPAINT (this=0x2c4590e10, MSG=
       {MSG = 15, UNUSEDMSG = 0, DC = 10350395968, PAINTSTRUCT = 
0x2a4447300, RESULT = 0}) at wincontrol.inc:6684
#24 0x0000000000aa3cab in WMPAINT (this=0x2c4590e10, MESSAGE=
       {MSG = 15, UNUSEDMSG = 0, DC = 10350395968, PAINTSTRUCT = 
0x2a4447300, RESULT = 0}) at customcontrol.inc:106
#25 0x0000000000849589 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#26 0x0000000000aa3c60 in CONTROLS_TCUSTOMCONTROL_$__WSREGISTERCLASS ()
     at dockzone.inc:16
#27 0x0000000000a887e1 in WNDPROC (this=0x2c4590e10, MESSAGE=
       {MSG = 15, UNUSEDMSG = 0, WPARAM = 10350395968, LPARAM = 
11345883904, RESULT = 0}) at wincontrol.inc:5341
#28 0x0000000000884a10 in WNDPROC (this=0x2c4590e10, THEMESSAGE=
       {MSG = 15, UNUSEDMSG = 0, WPARAM = 10350395968, LPARAM = 
11345883904, RESULT = 0}) at customform.inc:1443
#29 0x0000000000b6fc35 in DELIVERMESSAGE (TARGET=0x2c4590e10, AMESSAGE=0)
     at lclmessageglue.pas:112
#30 0x0000000000b21789 in DELIVERMESSAGE (TARGET=0x2c4590e10, AMESSAGE=0)
     at gtk2proc.inc:3628
---Type <return> to continue, or q <return> to quit---
#31 0x0000000000b2f3b9 in DODELIVERPAINTMESSAGE (TARGET=0x2c4590e10, 
PAINTMSG=
       {MSG = 15, UNUSEDMSG = 0, DC = 10350395968, PAINTSTRUCT = 
0x2a4447300, RESULT = 0}) at gtk2callback.inc:26
#32 0x0000000000b2f4a3 in DELIVERPAINTMESSAGE (TARGET=0x2c4590e10,
     THEMESSAGE=0) at gtk2callback.inc:44
#33 0x0000000000b2f685 in DELIVERGTKPAINTMESSAGE (TARGET=0x2c4590e10,
     WIDGET=0x2fcf18990, AREA=0x7f7ffffcdab4, REPAINTALL=false,
     ISAFTERGTK=false) at gtk2callback.inc:102
#34 0x0000000000b30a6f in GTKEXPOSEEVENT (WIDGET=0x2fcf18990,
     EVENT=0x7f7ffffcdaa0, DATA=0x2c4590e10) at gtk2callback.inc:704
#35 0x0000000209c36c9f in _gtk_marshal_BOOLEAN__BOXED ()
    from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#36 0x00000002590b74d3 in g_closure_invoke ()
    from /usr/local/lib/libgobject-2.0.so.4200.1
#37 0x00000002590cd344 in signal_emit_unlocked_R ()
    from /usr/local/lib/libgobject-2.0.so.4200.1
#38 0x00000002590cf133 in g_signal_emit_valist ()
    from /usr/local/lib/libgobject-2.0.so.4200.1
#39 0x00000002590cfd61 in g_signal_emit ()
    from /usr/local/lib/libgobject-2.0.so.4200.1
#40 0x0000000209d549cf in gtk_widget_event_internal ()
    from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#41 0x0000000209c30a90 in gtk_main_do_event ()
    from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#42 0x000000026c2d28d3 in _gdk_window_process_updates_recurse ()
    from /usr/local/lib/libgdk-x11-2.0.so.2400.0
#43 0x000000026c2d2913 in _gdk_window_process_updates_recurse ()
    from /usr/local/lib/libgdk-x11-2.0.so.2400.0
#44 0x000000026c2d2913 in _gdk_window_process_updates_recurse ()
    from /usr/local/lib/libgdk-x11-2.0.so.2400.0
#45 0x000000026c2ce815 in gdk_window_process_updates_internal ()
    from /usr/local/lib/libgdk-x11-2.0.so.2400.0
#46 0x000000026c2d0911 in gdk_window_process_all_updates ()
    from /usr/local/lib/libgdk-x11-2.0.so.2400.0
#47 0x0000000209badd12 in gtk_container_idle_sizer ()
    from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#48 0x000000026c2ab7ae in gdk_threads_dispatch ()
    from /usr/local/lib/libgdk-x11-2.0.so.2400.0
#49 0x00000002783670a2 in g_main_context_dispatch ()
    from /usr/local/lib/libglib-2.0.so.4200.1
---Type <return> to continue, or q <return> to quit---
#50 0x000000027836922b in g_main_context_iterate ()
    from /usr/local/lib/libglib-2.0.so.4200.1
#51 0x00000002783692f7 in g_main_context_iteration ()
    from /usr/local/lib/libglib-2.0.so.4200.1
#52 0x0000000000a27938 in APPPROCESSMESSAGES (this=0x26c167650)
     at gtk2widgetset.inc:2326
#53 0x000000000089035b in PROCESSMESSAGES (this=0x26c167050)
     at application.inc:381
#54 0x0000000000838e91 in main () at lazarus.pp:113
(gdb)
-----------------------------------------------------------


Regards,
Tomaž Žveglič




More information about the Lazarus mailing list