On Sat, 28 Jan 2006 18:35:05 +0100
darekm <[EMAIL PROTECTED]> wrote:

> Patrick Chevalley wrote:
> 
> > > Can you update and try compiling lazarus with -dDisableWidgetColor?
> >
> > This not change the problem.
> > I add a few DebugLn in SetWidgetColor, just before your ifdef.
> > By comparison of the trace with a working theme the segfault occur 
> > after the last passage to SetWidgetColor.
> >
> > Starting program: /home/pch/lazarus/lazarus
> > Reading symbols from shared object read from target memory...done.
> > .....
> > SetWidgetColor Start
> > SetWidgetColor ChangeFGColor:=FALSE
> > SetWidgetColor ChangeBGColor:=TRUE
> > SetWidgetColor DisableWidgetColor exit
> > .....
> > SetWidgetColor Start
> > SetWidgetColor ChangeFGColor:=FALSE
> > SetWidgetColor ChangeBGColor:=FALSE
> > SetWidgetColor exit
> > SetWidgetColor Start
> > SetWidgetColor ChangeFGColor:=FALSE
> > SetWidgetColor ChangeBGColor:=FALSE
> > SetWidgetColor exit
> >
> > Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkWidget'
> 
> can You disable setWidgetColor
> for tWinControl

I will do it, if we can't find a fix for this. We want to release 0.9.12.

 
>  procedure TGtkWSWinControl.SetColor(const AWinControl: TWinControl);
>  begin
> //  if  ((csOpaque in AWinControl.ControlStyle)and 
> GtkWidgetIsA(pGtkWidget(AWinControl.handle),GTKAPIWidget_GetType)) then 
> exit;
> //    GtkWidgetSet.SetWidgetColor(pGtkWidget(AWinControl.handle), 
> AWinControl.font.color, 
> AWinControl.color,[GTK_STATE_NORMAL,GTK_STATE_ACTIVE,GTK_STATE_PRELIGHT,G
> TK_STATE_SELECTED]);
>    UpdateWidgetStyleOfControl(AWinControl);

Maybe this is the offending line. Can you comment this line too and test?


>  end;
> 
> 
> and for tBitBtn:
> 
> 
> 
> procedure TGtkWSBitBtn.SetColor(const AWinControl: TWinControl);
> 
> begin
>   {$IFDEF DisableWidgetColor}
>   exit;                                                             
>   //<-add {$ENDIF}
>   Widget:= PGtkWidget(AWinControl.Handle);
>   WidgetInfo := GetWidgetInfo(Widget);
>   BitBtnInfo := WidgetInfo^.UserData;
>   GtkWidgetSet.SetWidgetColor(Widget, AWinControl.font.color, 
> AWinControl.color,[GTK_STATE_NORMAL,GTK_STATE_ACTIVE,GTK_STATE_PRELIGHT,G
> TK_STATE_SELECTED]);
> 
> 
>   if BitBtnInfo^.LabelWidget = nil then Exit;
>   GtkWidgetSet.SetWidgetColor(BitBtnInfo^.LabelWidget, 
> AWinControl.font.color, 
> AWinControl.color,[GTK_STATE_NORMAL,GTK_STATE_ACTIVE,GTK_STATE_PRELIGHT,G
> TK_STATE_SELECTED]);
> 
> Maybe problem is with AWinControl.font.color

I don't think so. It only reads a variable. There is no property read access
method called.

Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to