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
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,GTK_STATE_SELECTED]);
UpdateWidgetStyleOfControl(AWinControl);
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,GTK_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,GTK_STATE_SELECTED]);
Maybe problem is with AWinControl.font.color
Darek
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213147456 (LWP 8596)]
0xb79ad411 in gdk_rgb_find_color () from
/usr/lib/gtk/themes/engines/libgalaxy.so
Current language: auto; currently c
(gdb) bt
#0 0xb79ad411 in gdk_rgb_find_color () from
/usr/lib/gtk/themes/engines/libgalaxy.so
#1 0x00000000 in ?? ()
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives