[Lazarus] OpenBSD 5.8 64bit - lazarus - exception

Zeljko zeljko at holobit.net
Tue Oct 27 09:46:02 CET 2015




> gdb ./lazarus
> GNU gdb 6.3 ...
> (gdb) run
> Starting program: /root/lazarus/lazarus
>
> Program received signal SIGBUS, Bus error.
> 0x00000002954fe2fa in g_object_new ()
>     from /usr/local/lib/libgobject-2.0.so.4200.1
> Current language:  auto; currently c
> (gdb) bt
> #0  0x00000002954fe2fa in g_object_new ()
>     from /usr/local/lib/libgobject-2.0.so.4200.1
> #1  0x00000002f2a1a195 in gtk_adjustment_new ()
>     from /usr/local/lib/libgtk-x11-2.0.so.2400.0
> #2  0x00000002f2b2071f in gtk_range_set_adjustment ()
>     from /usr/local/lib/libgtk-x11-2.0.so.2400.0
> #3  0x00000002954fd46d in g_object_new_internal ()
>     from /usr/local/lib/libgobject-2.0.so.4200.1
> #4  0x00000002954fdd45 in g_object_new_valist ()
>     from /usr/local/lib/libgobject-2.0.so.4200.1
> #5  0x00000002954fe364 in g_object_new ()
>     from /usr/local/lib/libgobject-2.0.so.4200.1
> #6  0x0000000000a1ca0e in GETSTYLEWITHNAME (
>      WNAME=0x19b6d08 "vertical scrollbar") at gtk2proc.inc:7860
> #7  0x0000000000a1c3d7 in GETSTYLE (ASTYLE=LGSVERTICALSCROLLBAR)
>      at gtk2proc.inc:7665

This is not trunk lazaruz according to line info .... so try next and 
give feedback (I'll try to install OpenBSD 5.8 64bit in vmware next days 
and see what happens)....
in lcl/widgetset/gtk2/gtk2proc.inc
find lines (around line 7665) and add gtkadjustment:

       If CompareText(WName,LazGtkStyleNames[lgsVerticalScrollbar])=0 
then begin
         lgs:=lgsVerticalScrollbar;
         StyleObject^.Widget := gtk_vscrollbar_new( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)); // add gtkAdjustment instead 
of nil
       end
     else
       If CompareText(WName,LazGtkStyleNames[lgsHorizontalScrollbar])=0 
then begin
         lgs:=lgsHorizontalScrollbar;
         StyleObject^.Widget := gtk_hscrollbar_new( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)); // add gtkAdjustment instead 
of nil
       end


I know that this will create memleak, but just want to know if it will 
crash when gtkAdjustment is added as param to gtk_vscrollbar_new()

Thanks

zeljko




More information about the Lazarus mailing list