Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread Felipe Monteiro de Carvalho

On 5/19/06, A.J. Venter <[EMAIL PROTECTED]> wrote:

I am looking at the notification window but it's slow going, I have never
tried to do a tform descendent component before. I may have to leave it
halfway and just create one built-in for my program with hookups where
needed, and then later do an abstract component.


Are you having difficulties with anything specific? It should look like this:

unit myunit;

type
 MyClass = class(TCustomForm)
 private
   lblTitle: TLabel;
   lblText: TLabel;
   imgIcon: TImage;
   btnX: TButton;
 public
   constructor Create(AOwner: TComponent); override;
   destructor Destroy; override;
 published
   // publish some properties, others not
 end;

then on create you have to create the components:

constructor TMainWindow.Create(AOwner: TComponent);
begin
 inherited Create(AOwner);

 BorderStyle := bsNone;

 lblTitle := TLabel.Create(Self);

 lblTitle .Left := 0;
 lblTitle .Top := 0;
 lblTitle .Width := ?;
 lblTitle .Height :=?;

 // Initializes the Glass component
 lblTitle.Align := alClient;
 lblTitle.Parent := Self;

 // Connects the methods to events
 vGlass.OnClick := HideWindow;
end;

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread A.J. Venter
>
> I see now why it works for me, and not for you. I use trayicon
> directly, from code and I add the directory where it is to my project,
> so it´s really part of my software. The package needed some fixes
> Mattias pointed.
Mmm, okay, that is indeed an option - will you be fixing the package ?

I am looking at the notification window but it's slow going, I have never 
tried to do a tform descendent component before. I may have to leave it 
halfway and just create one built-in for my program with hookups where 
needed, and then later do an abstract component.

A.J.
-- 
"80% Of a hardware engineer's job is application of the uncertainty principle.
80% of a software engineer's job is pretending this isn't so."
A.J. Venter
Chief Software Architect
OpenLab International
http://www.getopenlab.com   | +27 82 726 5103 (South Africa)
http://www.silentcoder.co.za| +55 118 162 2079 (Brazil)

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


Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread Mattias Gaertner
On Fri, 19 May 2006 13:03:23 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> > >
> > > Heh, fair enough - though technically I was offering to debug this one
> > > for you  - all I need is a hint on where to look.
> >
> > If I understood correct, you should first fix the gtk warnings about the
> > theme.
> Well no other GTK apps are affected by the missing bits, nonetheless I had
> 
> done the test (easy way -just change to the GTK2 standard theme which
> ships  with the library) , with or without the warnings however the bug
> persists.  Even if it was theme related however, it would still constitute
> a bug - the  code ought to fall-back if the theme has a problem. 
> 
> Since I know that it is in pango that the crash occurs, although the stack
> 
> won't show me the exact place - I can from how much appears on the screen
> get  a fairly safe guess that the crash is being caused by a font-change
> call from  inside TSynEdit -so the question is , how do I determine which
> one so I can  fix the code...

The stack is corrupted and the pango use in the gtk2 interface is
incomplete. It could be anything.
I didn't implement the gtk2 intf pango code, so I don't know, what should
already work. I would start some simple gtk2 test apps and see what is
working and what not.


Mattias

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


Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread Felipe Monteiro de Carvalho

On 5/19/06, A.J. Venter <[EMAIL PROTECTED]> wrote:

>
> What doesn't work?
TrayIcon gets compiled with wsgtktrayicon instead of wsgtk2trayicon if the
project is set to use gtk2 while the IDE is running gtk1.


I see now why it works for me, and not for you. I use trayicon
directly, from code and I add the directory where it is to my project,
so it´s really part of my software. The package needed some fixes
Mattias pointed.

thanks,
--
Felipe Monteiro de Carvalho

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


Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread A.J. Venter
> >
> > Heh, fair enough - though technically I was offering to debug this one
> > for you  - all I need is a hint on where to look.
>
> If I understood correct, you should first fix the gtk warnings about the
> theme.
Well no other GTK apps are affected by the missing bits, nonetheless I had 
done the test (easy way -just change to the GTK2 standard theme which ships 
with the library) , with or without the warnings however the bug persists. 
Even if it was theme related however, it would still constitute a bug - the 
code ought to fall-back if the theme has a problem. 

Since I know that it is in pango that the crash occurs, although the stack 
won't show me the exact place - I can from how much appears on the screen get 
a fairly safe guess that the crash is being caused by a font-change call from 
inside TSynEdit -so the question is , how do I determine which one so I can 
fix the code...

A.J.
-- 
"80% Of a hardware engineer's job is application of the uncertainty principle.
80% of a software engineer's job is pretending this isn't so."
A.J. Venter
Chief Software Architect
OpenLab International
http://www.getopenlab.com   | +27 82 726 5103 (South Africa)
http://www.silentcoder.co.za| +55 118 162 2079 (Brazil)

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


Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread Mattias Gaertner
On Fri, 19 May 2006 12:32:13 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> 
> > Gtk-WARNING **: Unable to locate theme engine in module_path: "smooth",
> >
> > This means: your theme uses abilities you don't have. Either install
> > another theme, or install the smooth engine.
> Yep, I know that one, though it should just skip them - either way, I also
> 
> tested with the gtk2 standard theme - this had no impact.
> >
> >
> > Can you give exact steps how to reproduce that?
> Exact steps I follow:
> svn co $LAZARUSSVNURL
> cd lazarus
> make 
> ./lazarus
> 
> Go to Tools|Configure Build Lazarus, click build all, set LCL to gtk2
> Click ok.
> Go to Tools|Build Lazarus  -problem occurs on the restart.
> 
> This happens even on a fresh user with pretty much no settings at all for 
> anything.
> >
> > Because I don't have the time to debug the gtk2 interface, my only
> > advice is to use gtk1 for the IDE.
> Heh, fair enough - though technically I was offering to debug this one for
> you  - all I need is a hint on where to look.

If I understood correct, you should first fix the gtk warnings about the
theme.

Mattias

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


Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread A.J. Venter

> Gtk-WARNING **: Unable to locate theme engine in module_path: "smooth",
>
> This means: your theme uses abilities you don't have. Either install
> another theme, or install the smooth engine.
Yep, I know that one, though it should just skip them - either way, I also 
tested with the gtk2 standard theme - this had no impact.
>
>
> Can you give exact steps how to reproduce that?
Exact steps I follow:
svn co $LAZARUSSVNURL
cd lazarus
make 
./lazarus

Go to Tools|Configure Build Lazarus, click build all, set LCL to gtk2
Click ok.
Go to Tools|Build Lazarus  -problem occurs on the restart.

This happens even on a fresh user with pretty much no settings at all for 
anything.
>
> Because I don't have the time to debug the gtk2 interface, my only advice
> is to use gtk1 for the IDE.
Heh, fair enough - though technically I was offering to debug this one for you 
- all I need is a hint on where to look.


A.J.
-- 
"80% Of a hardware engineer's job is application of the uncertainty principle.
80% of a software engineer's job is pretending this isn't so."
A.J. Venter
Chief Software Architect
OpenLab International
http://www.getopenlab.com   | +27 82 726 5103 (South Africa)
http://www.silentcoder.co.za| +55 118 162 2079 (Brazil)

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


Re: [lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread Mattias Gaertner
On Fri, 19 May 2006 11:53:19 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> > >
> > > Doesn't work here.
> >
> > What doesn't work?
> TrayIcon gets compiled with wsgtktrayicon instead of wsgtk2trayicon if the
> project is set to use gtk2 while the IDE is running gtk1.

When the project is set to gtk2 and you compile it, the IDE checks all
packages. The package should be compiled with LCLWidgetSet macro set to the
value of the project (gtk2). If not, then you spotted a bug.

In case of TTrayIcon: 
This component differs between gtk1 and gtk2. But the output directory is
the same.
I added the LCLWidgetSet macro to the path of the trayicon package, so it
won't be recompiled everytime you switch the widgetset.


> > > > Next I recompiled only LCL for Gtk2 (from the IDE), and it worked.
> > >
> > > My lazarus hangs when I do that,
> >
> > Can you reproduce that? If yes, please start the IDE in gdb and create a
> > backtrace.
> Reproduce ? I cannot get avoid it :) but we are talking about two
> sepperate  bugs here - we shouldn't ASSUME a relationnship
> Backtrace attached.
> 
> This happens on every machine I have access to and has been for about 2
> weeks  now. .

Gtk-WARNING **: Unable to locate theme engine in module_path: "smooth",

This means: your theme uses abilities you don't have. Either install another
theme, or install the smooth engine.


> > > I have to rerun make, then rebuild with
> > > gtk1,  gives me enough gtk2 for my apps to be compiled - but it might
> > > prevent the  GTK2 def from being passed to trayicon ? If so that's a
> > > bug either in lazarus  or in ttrayicon, I'm not sure.
> > > On a hunch I opened the ttrayicon.lpk file, changed it's compiler
> > > options to  use gtk2, reinstalled, rebuilt wole for gtk2 - same
> > > result. Same stack trace  as well. So it doesn't matter what the
> > > component's compiler options say -  which makes sense, it ought to
> > > receive it from the parent app. But it also  ought to do so regardless
> > > of whether the LCL is using the same widget set as  the project
> > > target.
> >
> > When the IDE compiles itself (LCL + IDE + installed packages) it
> > compiles for the target set in the configure build lazarus dialog
> > (Target cpu, os, widgetset). Even if the project has another target.
> > This has been fixed a few weeks ago, so it does not always work with
> > 0.9.14.
> I always run up to date SVN.
> Either way - this is the other bug - I am happy to work on both but the
> gtk2  ide  bug is much more severe.

Can you give exact steps how to reproduce that?


> > > I reckon I should fix the lazarus issue first but I am stumped as to
> > > what could be causing it. Even a gdb backtrace didn't tell me anything
> > > usefull,
> > >
> > Where are the crashes? In the IDE? Which widgetset? Which components
> > installed?
> IDE starts up, splash screen shows. Then the lazarus editor window comes
> up,  then the source editor window appears - and then the whole thing
> freezes  solid - have to xkill it.
> 1) This only happens with GTK2 as the IDE widgetset
> 2) This happens REGARDLESS of what components are installed - even on a
> brand  new fresh install with no .lazarus in existence yet.
> I also attach an LDD on the lazarus executable.
> 
> GTK2 version is: gtk+2-2.8.7 
> But I have the same problem on other versions both older and newer.

Because I don't have the time to debug the gtk2 interface, my only advice is
to use gtk1 for the IDE.


Mattias

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


[lazarus] GTK2 Bug - was Show hint from code

2006-05-19 Thread A.J. Venter
> >
> > Doesn't work here.
>
> What doesn't work?
TrayIcon gets compiled with wsgtktrayicon instead of wsgtk2trayicon if the 
project is set to use gtk2 while the IDE is running gtk1.
>
> > > Next I recompiled only LCL for Gtk2 (from the IDE), and it worked.
> >
> > My lazarus hangs when I do that,
>
> Can you reproduce that? If yes, please start the IDE in gdb and create a
> backtrace.
Reproduce ? I cannot get avoid it :) but we are talking about two sepperate 
bugs here - we shouldn't ASSUME a relationnship
Backtrace attached.

This happens on every machine I have access to and has been for about 2 weeks 
now. .
>
> > I have to rerun make, then rebuild with
> > gtk1,  gives me enough gtk2 for my apps to be compiled - but it might
> > prevent the  GTK2 def from being passed to trayicon ? If so that's a bug
> > either in lazarus  or in ttrayicon, I'm not sure.
> > On a hunch I opened the ttrayicon.lpk file, changed it's compiler options
> > to  use gtk2, reinstalled, rebuilt wole for gtk2 - same result. Same
> > stack trace  as well. So it doesn't matter what the component's compiler
> > options say -  which makes sense, it ought to receive it from the parent
> > app. But it also  ought to do so regardless of whether the LCL is using
> > the same widget set as  the project target.
>
> When the IDE compiles itself (LCL + IDE + installed packages) it compiles
> for the target set in the configure build lazarus dialog (Target cpu, os,
> widgetset). Even if the project has another target. This has been fixed a
> few weeks ago, so it does not always work with 0.9.14.
I always run up to date SVN.
Either way - this is the other bug - I am happy to work on both but the gtk2 
ide  bug is much more severe.

>
> > I reckon I should fix the lazarus issue first but I am stumped as to what
> > could be causing it. Even a gdb backtrace didn't tell me anything
> > usefull,
> >
> Where are the crashes? In the IDE? Which widgetset? Which components
> installed?
IDE starts up, splash screen shows. Then the lazarus editor window comes up, 
then the source editor window appears - and then the whole thing freezes 
solid - have to xkill it.
1) This only happens with GTK2 as the IDE widgetset
2) This happens REGARDLESS of what components are installed - even on a brand 
new fresh install with no .lazarus in existence yet.
I also attach an LDD on the lazarus executable.

GTK2 version is: gtk+2-2.8.7 
But I have the same problem on other versions both older and newer.

Ciao
A.J.

-- 
"80% Of a hardware engineer's job is application of the uncertainty principle.
80% of a software engineer's job is pretending this isn't so."
A.J. Venter
Chief Software Architect
OpenLab International
http://www.getopenlab.com   | +27 82 726 5103 (South Africa)
http://www.silentcoder.co.za| +55 118 162 2079 (Brazil)
bash-3.00$ 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 "i486-slackware-linux"...Using host libthread_db 
library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /home/silentcoder/lazarus/lazarus
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 10199)]

(lazarus:10199): Gtk-WARNING **: Unable to locate theme engine in module_path: 
"smooth",

(lazarus:10199): Gtk-WARNING **: Unable to locate theme engine in module_path: 
"smooth",

(lazarus:10199): Gtk-WARNING **: Unable to locate theme engine in module_path: 
"smooth",

(lazarus:10199): Gtk-WARNING **: Unable to locate theme engine in module_path: 
"smooth",

(lazarus:10199): Gtk-WARNING **: Unable to locate theme engine in module_path: 
"smooth",

(lazarus:10199): Gtk-WARNING **: Unable to locate theme engine in module_path: 
"smooth",
TApplication.IconChanged - TODO: convert this message...no implementation in 
gtk or win32
NOTE: editor options config file not found - using defaults
NOTE: codetools config file not found - using defaults
NOTE: help options config file not found - using defaults
TMainIDE.DoNewProject A
TMainIDE.DoNewEditorFile A NewFilename=
TPascalParserTool.BuildTree B OnlyIntf=False  project1.lpr

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 10199)]
0x405f83b2 in memset () from /lib/libc.so.6
(gdb) backtrace
#0  0x405f83b2 in memset () from /lib/libc.so.6
#1  0x40838f47 in gray_render_span () from /usr/lib/libfreetype.so.6
#2  0x40839022 in gray_hline () from /usr/lib/libfreetype.so.6
#3  0x408391c0 in gray_sweep () from /usr/lib/libfreetype.so.6
#4  0x408396d7 in gray_convert_glyph () from /usr/lib/libfreetype.so.6
#5  0x408055b0 in FT_Outline_Render () from /usr/lib/libfreetype.so.6
#6  0x40805663 in FT_Outline_Get_Bitmap () from /usr/lib/libfreetype.so.6
#7  0x406e1e9a in