Re: [Lazarus] ComboBox bug?

2011-09-22 Thread Hans-Peter Diettrich

Mattias Gaertner schrieb:


procedure TCustomComboBox.UpdateSorted;
var
  lText: string;
  lIndex: integer;
begin
  if HandleAllocated then
TWSCustomComboBoxClass(WidgetSetClass).Sort(Self, Items, FSorted)
  else if FItems is TStringList then
  begin
// remember text
lText := Text;
TStringList(FItems).Sorted := FSorted;

When not FSorted then items are not sorted.


You're right.

But the following then is also evitable (but does no harm):


lIndex := FItems.IndexOf(lText);
if lIndex >= 0 then
  ItemIndex := lIndex;


What if lIndex=-1?


  end;
end;



I stumbled across more such near-wrong code and comments, not worth bug 
reports (in customcombobox.inc):


line 55:
  if FSelStart <> FSelLength then
Why not: if FSelLength > 0?

line 183:
{--
  Method: TCustomComboBox.DoChange
Not followed by DoChange - should be moved, removed or corrected

line 675:
  // ToDo
Looks like Done (in InitializeWnd)

line 737:
{--
  function TCustomComboBox.GetDroppedDown: Boolean;
Should read "SetDroppedDown" - complete or remove

line 1064:
Result := FReadOnly <> false;
Should read: Result := FReadOnly;


Another (general) one:

I found sometimes wrong descriptions for ...Length of strings, 
mentioning *byte* count instead of count in *logical* UTF-8 chars. How 
should such descriptions finally read?


1) Should a logical character count be implied, so that only really 
different (byte/AnsiChar) counts should be mentioned explicitly?


2) Should count in [logical?] [UTF-8?] characters be mentioned wherever 
applicable? [what about possible future change to Unicode/UTF-16?]


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Fw: help to obtain the FPC 2.4.4

2011-09-22 Thread Ing . Héctor F . Fiandor Rosario


Dear Mattias, thanks very much.

Ing. Héctor F. Fiandor Rosario
hfian...@infomed.sld.cu


--

Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] help to obtain the FPC 2.4.4

2011-09-22 Thread Ing . Héctor F . Fiandor Rosario

Dear Mattias, thanks very much.

Ing. Héctor F. Fiandor Rosario
hfian...@infomed.sld.cu


--

Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] help to obtain the FPC 2.4.4

2011-09-22 Thread Mattias Gaertner
On Thu, 22 Sep 2011 17:42:34 -0500
Ing. Héctor F. Fiandor Rosario  wrote:

> Dear colleagues:
> 
> i have downloaded from http://www.freepascal.org/download.var the file 
> fpc-2.4.4.i386-win32.exe and the file fpc-2.4.4.i386-win64.exe
> and when installed the win32 version, i obtained an icon in the desktop and 
> a folder in C:\FPC\2.4.4
> but when i execute, i dont obtain the interface of Lazarus, i obtain the 
> Compiler interface.

FPC is the Free Pascal Compiler.
Lazarus is an IDE for FPC. Both projects are closely related but not
the same.

http://www.lazarus.freepascal.org/

See Downloads or daily snapshots.
The Lazarus Windows installer comes bundled with FPC.

 
> i will appreciate very much if somebody can furnish me the url to obtain the 
> correct version. Now i was using the 2.2.3 version.


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] help to obtain the FPC 2.4.4

2011-09-22 Thread Ing . Héctor F . Fiandor Rosario

Dear colleagues:

i have downloaded from http://www.freepascal.org/download.var the file 
fpc-2.4.4.i386-win32.exe and the file fpc-2.4.4.i386-win64.exe
and when installed the win32 version, i obtained an icon in the desktop and 
a folder in C:\FPC\2.4.4
but when i execute, i dont obtain the interface of Lazarus, i obtain the 
Compiler interface.


i will appreciate very much if somebody can furnish me the url to obtain the 
correct version. Now i was using the 2.2.3 version.


thanks in advance,

Ing. Héctor F. Fiandor Rosario
hfian...@infomed.sld.cu



--

Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Implementing COM interfaces

2011-09-22 Thread Sven Barth

On 22.09.2011 19:45, Hans-Peter Diettrich wrote:

Lubos Pintes schrieb:

Hi,
Concerning accessibility, I heard that the best thing one can do is to
implement IAccessible2 for application/controls.


What about CORBA? At least it's not so Windows centric...


Here a discussion about CORBA vs. COM or platform specific vs. platform 
independant is completely at the wrong place: He wants to integrate 
accessibilty features into Lazarus so he needs to use the features that 
the widgetsets provide. In case of Windows this is IAccessible2.


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ComboBox bug?

2011-09-22 Thread Mattias Gaertner
On Thu, 22 Sep 2011 22:48:52 +0200
Hans-Peter Diettrich  wrote:

> Mattias Gaertner schrieb:
> 
> >> Whenever the Sorted property is changed (SetSorted), UpdateSorted is 
> >> called. It looks like UpdateSorted *always* sorts the list, as long as 
> >> no handle (widget) has been created. This misbehaviour should affect at 
> >> least the list items in design mode.
> > 
> > What would be the right behavior?
> 
> When Sorted is False, the items should not be sorted.


procedure TCustomComboBox.UpdateSorted;
var
  lText: string;
  lIndex: integer;
begin
  if HandleAllocated then
TWSCustomComboBoxClass(WidgetSetClass).Sort(Self, Items, FSorted)
  else if FItems is TStringList then
  begin
// remember text
lText := Text;
TStringList(FItems).Sorted := FSorted;

When not FSorted then items are not sorted.

lIndex := FItems.IndexOf(lText);
if lIndex >= 0 then
  ItemIndex := lIndex;
  end;
end;


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ComboBox bug?

2011-09-22 Thread Hans-Peter Diettrich

Mattias Gaertner schrieb:

Whenever the Sorted property is changed (SetSorted), UpdateSorted is 
called. It looks like UpdateSorted *always* sorts the list, as long as 
no handle (widget) has been created. This misbehaviour should affect at 
least the list items in design mode.


What would be the right behavior?


When Sorted is False, the items should not be sorted.

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Building the documentation

2011-09-22 Thread Hans-Peter Diettrich

Lubos Pintes schrieb:

Hi,
My goal is to build docs in txt format. I quite don't understand fpdoc 
e.g. what the --input option needs. I am on windows xp. Can you help?


--input is the source unit, eventually a complete compiler command line 
(with include path...). FPDoc parses this unit, before it writes any 
documentation.


There exists a nice FPDoc.html documentation, perhaps as part of the FPC 
documentation (SVN source)? Does somebody know the URL?



Also see docs\html\readme.txt, and my notes in docs\xml\StyleGuide.txt, 
available in SVN trunk.


For building docs for a single unit, you can use something like 
mkhtml.bat, by changing the output format etc.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Hans-Peter Diettrich

Lukasz Sokol schrieb:


And that driver is the vendor driver for touchpad (did I mention the system is 
a laptop?)


I usually disble the touchpad, because it can get into the way when 
typing text on the keyboard. Perhaps the error results from an 
inadvertent touch of the touchpad, not from typing?


Can you reproduce the error by using the touchpad only, not typing?

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Implementing COM interfaces

2011-09-22 Thread Hans-Peter Diettrich

Lubos Pintes schrieb:

Hi,
Concerning accessibility, I heard that the best thing one can do is to 
implement IAccessible2 for application/controls.


What about CORBA? At least it's not so Windows centric...

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread Mark Morgan Lloyd

Martin wrote:

On 22/09/2011 18:46, Mark Morgan Lloyd wrote:

Martin wrote:

On 22/09/2011 17:16, Mattias Gaertner wrote:

On Thu, 22 Sep 2011 14:02:05 +
Mark Morgan Lloyd  wrote:


[...]
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Compiler custom 
params

changed for FCL 1.0.1
Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"

Either use lazbuild to build the packages.
Or remove the options from the 'Configure build lazarus' dialog to
compile the same as 'make'.



Actually this is a temporary problem.

The makefiles will need to be updated, as soon as the current work on 
the compiler option dialog is finished.
Every package uses the compileroption dialog. And that has changed 
the default


Thanks Martin and Mattias, so in effect it's something best tolerated 
for the moment.


Are the options used when compiling FPC itself relevant?



I don't think so.

Actually to be noted that your diffs seem more than just the change of 
compiler-options-dialog


Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl 
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"


the first "-gl" versus "-gw -godwarfset" is the option dialog. The rest 
is something you must have put in somewhere.


Also seeing the -gw -godwarsets twice => I guess you already had that in 
there before?


Not as far as I know. The compiler was built with NOGDB=1 OPT='-O- -gl 
-vt', Lazarus with LCL_PLATFORM=gtk2 bigide, ~/.lazarus was wiped before 
the run and I've not intentionally changed anything in the project 
options except for a couple of -d settings.


Grepping in the project directory for dwarfsets gives me only

HeavyWethers.compiled:  


with the omitted bit being -Fi options etc.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread cobines
2011/9/22 Martin :
> Open the package, look at the compileroptions of the package.
> It will be in there.
>
> The problem is:it is yet missing in the Makefiles.

Ah, I see. It is not explicitly stated in lclbase.lpk because it is
the default value now. But I open lclbase.lpk in IDE, in Linking page
the debugging info is set to "Automatic (Dwarf with Sets(-gw
-godwarfsets))". So that must be it.

--
cobines

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread Martin

Open the package, look at the compileroptions of the package.
It will be in there.

The problem is:it is yet missing in the Makefiles.



On 22/09/2011 19:19, cobines wrote:

2011/9/22 Martin:

Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"

the first "-gl" versus "-gw -godwarfset" is the option dialog. The rest is
something you must have put in somewhere.

I have the same. Somehow "-gw2 -godwarfsets" is added automatically. I
searched everywhere, only Makefiles from some components in Lazarus
have this, I have no other files containing it.

I have "-gs -gl" in build lazarus options. I don't have "-gw2
-godwarfsets" there or in fpc.cfg. I checked with clean profile too.

"make lcl" builds LCL with "-gl" only (as per lcl/Makefile). I checked
LCLBase.compiled.

Then I start IDE, new project, build it, and it rebuilds FCL, LCL:

   Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
   Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gs -gl 
fcllaz.pas"

As you see it put in "-gs -gl" from my build lazarus options box but
"-gw2 -godwarfsets" I don't know where it comes from.

--
cobines

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread cobines
2011/9/22 Martin :
>    Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
>    Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl
> -godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"
>
> the first "-gl" versus "-gw -godwarfset" is the option dialog. The rest is
> something you must have put in somewhere.

I have the same. Somehow "-gw2 -godwarfsets" is added automatically. I
searched everywhere, only Makefiles from some components in Lazarus
have this, I have no other files containing it.

I have "-gs -gl" in build lazarus options. I don't have "-gw2
-godwarfsets" there or in fpc.cfg. I checked with clean profile too.

"make lcl" builds LCL with "-gl" only (as per lcl/Makefile). I checked
LCLBase.compiled.

Then I start IDE, new project, build it, and it rebuilds FCL, LCL:

  Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
  Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gs -gl fcllaz.pas"

As you see it put in "-gs -gl" from my build lazarus options box but
"-gw2 -godwarfsets" I don't know where it comes from.

--
cobines

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread Martin

On 22/09/2011 18:46, Mark Morgan Lloyd wrote:

Martin wrote:

On 22/09/2011 17:16, Mattias Gaertner wrote:

On Thu, 22 Sep 2011 14:02:05 +
Mark Morgan Lloyd  wrote:


[...]
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Compiler custom 
params

changed for FCL 1.0.1
Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"

Either use lazbuild to build the packages.
Or remove the options from the 'Configure build lazarus' dialog to
compile the same as 'make'.



Actually this is a temporary problem.

The makefiles will need to be updated, as soon as the current work on 
the compiler option dialog is finished.
Every package uses the compileroption dialog. And that has changed 
the default


Thanks Martin and Mattias, so in effect it's something best tolerated 
for the moment.


Are the options used when compiling FPC itself relevant?



I don't think so.

Actually to be noted that your diffs seem more than just the change of 
compiler-options-dialog


Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl 
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"


the first "-gl" versus "-gw -godwarfset" is the option dialog. The rest 
is something you must have put in somewhere.


Also seeing the -gw -godwarsets twice => I guess you already had that in 
there before?






--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread Mark Morgan Lloyd

Martin wrote:

On 22/09/2011 17:16, Mattias Gaertner wrote:

On Thu, 22 Sep 2011 14:02:05 +
Mark Morgan Lloyd  wrote:


[...]
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Compiler custom params
changed for FCL 1.0.1
Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"

Either use lazbuild to build the packages.
Or remove the options from the 'Configure build lazarus' dialog to
compile the same as 'make'.



Actually this is a temporary problem.

The makefiles will need to be updated, as soon as the current work on 
the compiler option dialog is finished.
Every package uses the compileroption dialog. And that has changed the 
default


Thanks Martin and Mattias, so in effect it's something best tolerated 
for the moment.


Are the options used when compiling FPC itself relevant?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ComboBox bug?

2011-09-22 Thread Mattias Gaertner
On Thu, 22 Sep 2011 19:26:25 +0200
Hans-Peter Diettrich  wrote:

> During the revision of the StdCtrls documentation I came across an 
> possible bug in TCustomComboBox.
> 
> Whenever the Sorted property is changed (SetSorted), UpdateSorted is 
> called. It looks like UpdateSorted *always* sorts the list, as long as 
> no handle (widget) has been created. This misbehaviour should affect at 
> least the list items in design mode.

What would be the right behavior?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread Martin

On 22/09/2011 17:16, Mattias Gaertner wrote:

On Thu, 22 Sep 2011 14:02:05 +
Mark Morgan Lloyd  wrote:


[...]
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Compiler custom params
changed for FCL 1.0.1
Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"

Either use lazbuild to build the packages.
Or remove the options from the 'Configure build lazarus' dialog to
compile the same as 'make'.



Actually this is a temporary problem.

The makefiles will need to be updated, as soon as the current work on 
the compiler option dialog is finished.
Every package uses the compileroption dialog. And that has changed the 
default


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] ComboBox bug?

2011-09-22 Thread Hans-Peter Diettrich
During the revision of the StdCtrls documentation I came across an 
possible bug in TCustomComboBox.


Whenever the Sorted property is changed (SetSorted), UpdateSorted is 
called. It looks like UpdateSorted *always* sorts the list, as long as 
no handle (widget) has been created. This misbehaviour should affect at 
least the list items in design mode.


Can somebody confirm?

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread Mattias Gaertner
On Thu, 22 Sep 2011 14:02:05 +
Mark Morgan Lloyd  wrote:

>[...]
> TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Compiler custom params 
> changed for FCL 1.0.1
>Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
>Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl 
> -godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"

Either use lazbuild to build the packages.
Or remove the options from the 'Configure build lazarus' dialog to
compile the same as 'make'.

Mattias


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [resolved!!!] Re: (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
On 22/09/2011 16:36, Martin wrote:
[...]
> Good to hear.
> 
> The best is probably to check on the mingw site, if they have
> feedback/bugtracker. But it may be a lot of work, they will need a
> lot of information...
> 
> Since it is resolved for you, i don't know if you want to go that
> way. And also, I would not be able to assist n that.
> 

And not sure if they take this seriously since it was my system's fault.

And since I'm not willing to reproduce this error again... 

Thanks again, anyhoo ;)

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [resolved!!!] Re: (Still googling for it) GDB error 31 ?

2011-09-22 Thread Martin

On 22/09/2011 14:23, Lukasz Sokol wrote:

Had a brainwave,

uninstalled the ALPS Touchpad driver...

Now the gdb still spews error 31 but...
on a different library (c:\Program Files\Dell\QuickSet\dadkeyb.dll)

AND

DOES NOT bail out any more - continues to run seemingly with no problems as
of yet.

Thanks everybody ! :)



Good to hear.

The best is probably to check on the mingw site, if they have 
feedback/bugtracker.

But it may be a lot of work, they will need a lot of information...

Since it is resolved for you, i don't know if you want to go that way. 
And also, I would not be able to assist n that.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Application.QueueAsyncCall and checking if object still exists

2011-09-22 Thread Krzysztof
Details. This is only draft:

TMyThread = class(TThread)
protected
  procedure Execute; override;
end;

TMyObject = class
private
  FHttpThread: TMyThread;
  procedure ProgressProc(Data: PtrInt);
end;

TProgressObj = class
  Status: String;
  Id: Integer;
end;

procedure TMyThread.Execute;
var
  i: Integer;
  prg: TProgressObj;
begin
  for i:=1 to 10 do
  begin
prg := TProgressObj.Create;
prg.Status := 'Step ' + inttostr(i);
prg.Id := i;
Application.QueueAsyncCall(MyObj.ProgressProc, prg);
  end;
end;

procedure TMyObject.ProgressProc(Data: PtrInt);
var
  prg: TProgressObj;
begin
  Memo1.Append(prg.Status);
  prg.Free;
end;

So, when MyObj is destroyed, Queue list have nonexistent pointer to
ProgressProc
and I must clear it because I created object and don't want memory leaks.
Main problem is: I don't know how to tell thread (which is locked in
QueueAsyncCall critical section), that method pointer which he trying to
post, doesn't exists anymore.

2011/9/22 Michael Schnell 

> On 09/22/2011 02:56 PM, Michael Schnell wrote:
>
>>
>>
>> IMHO the better way is to check if the object exists in the main thread
>> when called.
>>
> Obviously you need to use a procedure of some other object (e.g. the thread
> itself) and (if necessary) provide the object i9n question (that might be
> destroyed and NILled) as a parameter.
>
> (BTW if the user programmer does not care for it there is no way to detect
> if an object is destroyed. It would need to be NILled by same.So a library
> function can't check this.)
>
>
> -Michael
>
> --
> __**_
> Lazarus mailing list
> Lazarus@lists.lazarus.**freepascal.org
> http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus
>
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [Long and partially OT] Database (OOP) programming: beginners manual?

2011-09-22 Thread Lukasz Sokol
On 20/09/2011 16:21, Lukasz Sokol wrote:
> On 20/09/2011 16:11, Joost van der Sluis wrote:
> 
[...]
>> IIRC, this has been solved in fpc 2.4.4.
>>
>> Joost
> 
> OK, one more reason to upgrade... :)
> 
> But then, after that it is enough that I ODBCConnection1.Close just, yes ?


For the record - it works in Lazarus 0.9.30 r29749 FPC 2.4.2 
i386-win32-win32/win64,
and it's enough to ODBCConnection1.Close ;)

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Building the documentation

2011-09-22 Thread Lubos Pintes

Hi,
My goal is to build docs in txt format. I quite don't understand fpdoc 
e.g. what the --input option needs. I am on windows xp. Can you help?

Thank


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Implementing COM interfaces

2011-09-22 Thread Sven Barth
I've looked at the link you mentioned, but the interesting documents 
seem to be not accessable currently...


Nevertheless on Linux the topic would be handled by using the stuff 
provided by the widgetset. E.g. for the GTK2 widgetset there is the ATK 
(Accessibilty ToolKit). I don't know what is needed to implement it or 
the equivalent for Qt.


Regards,
Sven

Am 22.09.2011 14:36, schrieb Lubos Pintes:

Oh I was a bit wrong when I told that IA2 is suported on Linux. Maybe it
is, but I am not totally sure. Read about it briefly here:
http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2


The open-source screen reader Nvda supports this standard. For example
Firefox and Eclipse are perfectly usable.
So I think that it would be suitable enough for Lazarus also, if that is
possible.
Dňa 22.9.2011 13:46, Sven Barth wrote / napísal(a):

Am 22.09.2011 12:38, schrieb Lubos Pintes:

It is also supported on Linux.


How is that done?


IAccessible2 interfaces are exposed as .IDL file /type library. So my
questions are:
Is it possible to implement such interfaces in free pascal?


The compiler got many improvements regarding COM compatibility in the
last years, so yes one can implement such interfaces.


What about importing type library / converting .IDL to pascal?


As far as I know you'll need to use Delphi to convert the type library
to a Pascal unit. There is no converter for FPC (yet).

Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Spurious package rebuild

2011-09-22 Thread Mark Morgan Lloyd

Mark Morgan Lloyd wrote:
I'm in the habit of building Lazarus from clean using  make bigide 
rather than rebuilding from inside the IDE. Part of the reason for that 
is that until recently a couple of the platforms I use here (SPARC and 
ARM) did not have a functional IDE due to alignment issues.


Over the last few weeks I've noticed that the first project I build 
inside the IDE also (re)builds a number of packages before it gets onto 
the project, this takes a significant amount of time on a tight system 
and is particularly inefficient since a chunk of RAM is occupied by the 
IDE.


If these packages are being rebuilt, what can be done to force them to 
be built correctly during the initial make?


If they are not being rebuilt, what needs to be done to force them to be 
built during the initial make?


I missed a bit. This is Lazarus trunk on FPC 2.7.1, and at the start of 
the project build (i.e. the point at which I tell it to build an app) 
the console shows


[TMainIDE.DoRunProject] A
TMainIDE.DoInitProjectRun A True 0
TMainIDE.DoInitProjectRun B
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Compiler custom params 
changed for FCL 1.0.1

  Old=" -MObjFPC -Scghi -O1 -gl -vewnhi -l fcllaz.pas"
  Now=" -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -vewnhi -l -gw -gl 
-godwarfsets -gh -gt -Co -Cr -Ci -Sa fcllaz.pas"


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Spurious package rebuild

2011-09-22 Thread Mark Morgan Lloyd
I'm in the habit of building Lazarus from clean using  make bigide 
rather than rebuilding from inside the IDE. Part of the reason for that 
is that until recently a couple of the platforms I use here (SPARC and 
ARM) did not have a functional IDE due to alignment issues.


Over the last few weeks I've noticed that the first project I build 
inside the IDE also (re)builds a number of packages before it gets onto 
the project, this takes a significant amount of time on a tight system 
and is particularly inefficient since a chunk of RAM is occupied by the IDE.


If these packages are being rebuilt, what can be done to force them to 
be built correctly during the initial make?


If they are not being rebuilt, what needs to be done to force them to be 
built during the initial make?


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
On 22/09/2011 13:53, Flávio Etrusco wrote:

> 
>> Error: 31=library-loaded,id="c:\\Program Files\\Apoint\\Apoint.dll" [snip 
>> rest of line]
> 
> I guess having the whole line might be of use. AFAICG (Google ;-)
> this DLL is part of touchpad driver (utility), is that right?
> Have you installed it recently? Is this a new Lazarus installation?
> 
> -Flávio
> 

It was /the/ culprit - I've uninstalled it and gdb does not crash any more...

(Hint: my laptop probably has a Synaptic touchpad... don't know who installed
alps driver on it (I've inherited it))

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] [resolved!!!] Re: (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
Had a brainwave,

uninstalled the ALPS Touchpad driver...

Now the gdb still spews error 31 but...
on a different library (c:\Program Files\Dell\QuickSet\dadkeyb.dll)

AND

DOES NOT bail out any more - continues to run seemingly with no problems as
of yet.

Thanks everybody ! :)

Lukasz



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
On 22/09/2011 13:53, Flávio Etrusco wrote:

> 
>> Error: 31=library-loaded,id="c:\\Program Files\\Apoint\\Apoint.dll" [snip 
>> rest of line]
> 
> I guess having the whole line might be of use. AFAICG (Google ;-)
> this DLL is part of touchpad driver (utility), is that right?
> Have you installed it recently? Is this a new Lazarus installation?
> 
> -Flávio
> 

Yes it's a new installation, from installer provided on lazarus webpage :)
And that driver is the vendor driver for touchpad (did I mention the system is 
a laptop?)

When using gdb 6.8 the =library-loaded line does not show in debug output...

When using gdb 7.3 again :

(last lines of debug output)
^running
*running,thread-id="all"
(gdb) 
=library-loaded,id="C:\\WINDOWS\\system32\\msimg32.dll",target-name="C:\\WINDOWS\\system32\\msimg32.dll",host-name="C:\\WINDOWS\\system32\\msimg32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\uxtheme.dll",target-name="C:\\WINDOWS\\system32\\uxtheme.dll",host-name="C:\\WINDOWS\\system32\\uxtheme.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\msctf.dll",target-name="C:\\WINDOWS\\system32\\msctf.dll",host-name="C:\\WINDOWS\\system32\\msctf.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\msctfime.ime",target-name="C:\\WINDOWS\\system32\\msctfime.ime",host-name="C:\\WINDOWS\\system32\\msctfime.ime",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\mpusbapi.dll",target-name="C:\\WINDOWS\\system32\\mpusbapi.dll",host-name="C:\\WINDOWS\\system32\\mpusbapi.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\setupapi.dll",target-name="C:\\WINDOWS\\system32\\setupapi.dll",host-name="C:\\WINDOWS\\system32\\setupapi.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\wintrust.dll",target-name="C:\\WINDOWS\\system32\\wintrust.dll",host-name="C:\\WINDOWS\\system32\\wintrust.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\crypt32.dll",target-name="C:\\WINDOWS\\system32\\crypt32.dll",host-name="C:\\WINDOWS\\system32\\crypt32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\msasn1.dll",target-name="C:\\WINDOWS\\system32\\msasn1.dll",host-name="C:\\WINDOWS\\system32\\msasn1.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\imagehlp.dll",target-name="C:\\WINDOWS\\system32\\imagehlp.dll",host-name="C:\\WINDOWS\\system32\\imagehlp.dll",symbols-loaded="0",thread-group="i1"
Error: 31=library-loaded,id="C:\\Program 
Files\\Apoint\\Apoint.dll",target-name="C:\\Program 
Files\\Apoint\\Apoint.dll",host-name="C:\\Program 
Files\\Apoint\\Apoint.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\comdlg32.dll",target-name="C:\\WINDOWS\\system32\\comdlg32.dll",host-name="C:\\WINDOWS\\system32\\comdlg32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\Vxdif.dll",target-name="C:\\WINDOWS\\system32\\Vxdif.dll",host-name="C:\\WINDOWS\\system32\\Vxdif.dll",symbols-loaded="0",thread-group="i1"

Hope this helps

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Martin

On 22/09/2011 13:39, Lukasz Sokol wrote:

Which revision of that binaries svn contains the gdb version 6.8 (2008) ?



http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GDB/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Application.QueueAsyncCall and checking if object still exists

2011-09-22 Thread Michael Schnell

On 09/22/2011 02:56 PM, Michael Schnell wrote:



IMHO the better way is to check if the object exists in the main 
thread when called.
Obviously you need to use a procedure of some other object (e.g. the 
thread itself) and (if necessary) provide the object i9n question (that 
might be destroyed and NILled) as a parameter.


(BTW if the user programmer does not care for it there is no way to 
detect if an object is destroyed. It would need to be NILled by same.So 
a library function can't check this.)


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Flávio Etrusco
On Thu, Sep 22, 2011 at 9:45 AM, Lukasz Sokol  wrote:
> On 22/09/2011 13:39, Lukasz Sokol wrote:
>
>> (p.s. haven't tried to just copy the 6.8 gdb from one computer to the other, 
>> will try)
>>
>
> Just tried that,
>
> still the same. (copied only the gdb.exe, left the dll's as from svn)
>
> Lukasz


> Error: 31=library-loaded,id="c:\\Program Files\\Apoint\\Apoint.dll" [snip 
> rest of line]

I guess having the whole line might be of use. AFAICG (Google ;-)
this DLL is part of touchpad driver (utility), is that right?
Have you installed it recently? Is this a new Lazarus installation?

-Flávio

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Application.QueueAsyncCall and checking if object still exists

2011-09-22 Thread Michael Schnell

Why clear the queue ?

IMHO the better way is to check if the object exists in the main thread 
when called.


-.Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
On 22/09/2011 13:39, Lukasz Sokol wrote:

> (p.s. haven't tried to just copy the 6.8 gdb from one computer to the other, 
> will try)
> 

Just tried that,

still the same. (copied only the gdb.exe, left the dll's as from svn)

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Application.QueueAsyncCall and checking if object still exists

2011-09-22 Thread Flávio Etrusco
2011/9/22 Krzysztof :
> Hi,
>
> I have some object which create and execute thread. This thread do some http
> requests (synapse) and send progress to the object by
> Application.QueueAsyncCall(MyObject.MyHandleProc, AProgress), it is designed
> for multithread - have critical section, so I can call it from thread to
> main thread. But I have problem which occurs some times. In object
> destructor I clear async queue by calling Application.RemoveAsyncCalls
> (which is thread safe too). But if thread waiting in critical section
> (because main thread block it with RemoveAsyncCalls) then after main thread
> leave critical section, thread post progress but should not because object
> is going to destroy. This occurs Access violation in ProcessAsyncCallQueue
> because method MyObject.MyHandleProc doesn't exists any more, this is only
> pointer to that method. Can ProcessAsyncCallQueue some how check if target
> still exists?
>
> Regards
>

Why not destroy it with Queued call too?

-Flávio

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
On 22/09/2011 13:09, Lukasz Sokol wrote:

With new GDB 7.3 (svn checkout then copy to c:\lazarus\mingw\bin : gdb.exe, 
libintf-8, libexpat-1 libiconv-2 (*.dll) is enough ?)

still the same happens.

Log output exactly the same (error 109 (broken pipe)).

Which revision of that binaries svn contains the gdb version 6.8 (2008) ?

Thank you for helping so far,
I hope this can be resolved...

Lukasz

(p.s. haven't tried to just copy the 6.8 gdb from one computer to the other, 
will try)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Implementing COM interfaces

2011-09-22 Thread Lubos Pintes
Oh I was a bit wrong when I told that IA2 is suported on Linux. Maybe it 
is, but I am not totally sure. Read about it briefly here:

http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2

The open-source screen reader Nvda supports this standard. For example 
Firefox and Eclipse are perfectly usable.
So I think that it would be suitable enough for Lazarus also, if that is 
possible.

Dňa 22.9.2011 13:46, Sven Barth wrote / napísal(a):

Am 22.09.2011 12:38, schrieb Lubos Pintes:

It is also supported on Linux.


How is that done?


IAccessible2 interfaces are exposed as .IDL file /type library. So my
questions are:
Is it possible to implement such interfaces in free pascal?


The compiler got many improvements regarding COM compatibility in the 
last years, so yes one can implement such interfaces.



What about importing type library / converting .IDL to pascal?


As far as I know you'll need to use Delphi to convert the type library 
to a Pascal unit. There is no converter for FPC (yet).


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
On 22/09/2011 12:50, Martin wrote:
> On 22/09/2011 12:49, Martin wrote:
>> On 22/09/2011 12:34, Lukasz Sokol wrote:
>>> I shall mention:
>>>
>>> The other (XP Pro) machine is a laptop and on my project, (as opposed to the
>>> test project, dunno why) the Error: 31 code appears just before line where
>>> one of the libraries is loaded :
>> I don't think it is the spaces in this case
>> the text to google is "library load error 31", but doesn't get to much info 
>> either.
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx
> 

No so it's not that.

(old joke)
Who the hell is General Failure and why is he reading my disk...?
(/old joke)

Lukasz



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
Ooops ommited this question:

> On 22/09/2011 12:41, Martin wrote:
>> On 22/09/2011 12:16, Lukasz Sokol wrote:

>>> I did what http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips
>>> suggested, i.e. no -Xs, no -XX, no optimization or -O1.
>> With or without "dwarf (-gw)" ? Does dwarf make a difference
>> (probably not).
>>
>>>

I tried with all (-g, -gl, -gw) enabled.

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
Hello Martin,
On 22/09/2011 12:41, Martin wrote:
> On 22/09/2011 12:16, Lukasz Sokol wrote:
>> Hi,
>> 
>> I have installed 0.9.30 (2011-03-08), FPC 2.4.2 rev. 29749 
>> (i386-win32-win32/win64) on another machine with Windows XP Prof.
>> SP3,
> 
> 32 Bit CPU? or 64 bit?

32bit (Dell Lattitude D600 Intel(R) Pentium(R) M)

> 
> If 32, then please download latest GDB from
> http://svn.freepascal.org/svn/lazarus/binaries (include libraries)
> and try with that.

OK will try.
> 
>> It compiles, and runs OK, but for some reason at some point (when I
>> press a key on my keyboard when caret is in a TMemo), the GDB bails
>> out with Error: 31 (found in debug log) at which time Lazarus 
>> panics and pulls a plug...
> I don't currently have my XP test environment ready, so I'll ask
> questions.
> 
> The 32 one must have some context (even if you can't see it currently
> (Signal, OS error, File-system error)
> 
> The latest 0.9.31 (trunk / unstable snapshot) displays added info in
> the "oops debugger" message. You might try the 0.9.30.1 (fixes branch
> / usually quite stable), though I am not sure it does have the extra
> info.
> 
> In any case, you do not need to upgrade, but  you should at least run
> with --debug-log (NO need to recompile with the extra define) and
> also provide the output from the "debug output" window, as described
> on the wiki.
> 

>> 
>> I did what http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips
>> suggested, i.e. no -Xs, no -XX, no optimization or -O1.
> With or without "dwarf (-gw)" ? Does dwarf make a difference
> (probably not).
> 
>> 
>> I can replicate it with a small test project, this is so small it's
>> pointless to write code here : - start a new project - put a TMemo
>> on it - save&compile&run - click on the Memo1 when running - type
>> any alphanumeric character on the keyboard ->  GDB crashes, this
>> time not even reporting an Error number.
> Exact text, of the output of GDB or the Lazarus IDE?
> 
First the 
gdb.exe  lazarus window appears.


Excerpt from the log file (of the test project):

[TCompiler.Compile] end
TMainIDE.DoInitProjectRun 
ProgramFilename=C:\Products\test_project\testproject.exe[TCmdLineDebugger] 
Debug PID: 288
[Debugger] Running GDB version: GDB
[TDebugger.SetFileName] "C:\Products\test_project\testproject.exe"
TGDBMIDebugger.StartDebugging WorkingDir="C:\Products\test_project\"
TGDBMIDebugger.ProcessResult Error: ,msg="No symbol 
\"FPC_THREADVAR_RELOCATE_PROC\" in current context."
[Debugger] Log output: &"info functions FPC_CPUINIT\n"
[Debugger] Log output: &"set width 5\n"
[Debugger] Log output: &"info address main\n"
[Debugger] Log output: &"ptype TObject\n"
[Debugger] Log output: &"info address FPC_RAISEEXCEPTION\n"
[Debugger] Log output: &"info address FPC_BREAK_ERROR\n"
[Debugger] Log output: &"info address FPC_RUNERROR\n"
[Debugger] Log output: &"info file\n"
[Debugger] File type: pei-i386
[Debugger] Entry point: 0x521940
[Debugger] Log output: &"Function \"foo\" not defined.\n"
[WARNING] Debugger: Unexpected async-record: 
=thread-group-started,id="i1",pid="2464"
[Debugger] Log output: &"info program\n"
[Debugger] Target PID: 2464
PeekNamedPipe failed, GetLastError is 109
[TCmdLineDebugger.Getoutput] Error waiting 
[TCmdLineDebugger.SendCmdLn] Unable to send <-gdb-exit>. No process running.
PeekNamedPipe failed, GetLastError is 109
[TCmdLineDebugger.Getoutput] Error waiting 
[WARNING] TGDBMIDebugger:  ExecuteCommand "-gdb-exit" failed.
LAZARUS END - cleaning up ...
[TCmdLineDebugger.SendCmdLn] Unable to send <-gdb-exit>. No process running.
PeekNamedPipe failed, GetLastError is 109
[TCmdLineDebugger.Getoutput] Error waiting 
[WARNING] TGDBMIDebugger:  ExecuteCommand "-gdb-exit" failed.

Hope this helps ?

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Martin

On 22/09/2011 12:49, Martin wrote:

On 22/09/2011 12:34, Lukasz Sokol wrote:

I shall mention:

The other (XP Pro) machine is a laptop and on my project, (as opposed 
to the
test project, dunno why) the Error: 31 code appears just before line 
where

one of the libraries is loaded :

I don't think it is the spaces in this case
the text to google is "library load error 31", but doesn't get to much 
info either.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Martin

On 22/09/2011 12:34, Lukasz Sokol wrote:

I shall mention:

The other (XP Pro) machine is a laptop and on my project, (as opposed to the
test project, dunno why) the Error: 31 code appears just before line where
one of the libraries is loaded :

Error: 31=library-loaded,id="c:\\Program Files\\Apoint\\Apoint.dll" [snip rest 
of line]
_
^ This does however /NOT/ appear when I run my test project, only the rest of 
the
line;

But I gather now, this may be due to spaces in the path of the DLL...?
(the infamous Program Files...)

The Apoint.dll is the part of the pointing device driver on this laptop so I 
guess
disabling it is out of question...




I don't think it is the spaces in this case
the text to google is "library load error 31", but doesn't get to much 
info either.


Some libraries do indeed "not behave" if run under gdb (I suspect some 
libraries do that intentionally others by accident), and if it is a 
library misbehaving, then there is nothing that can be fixed in the IDE.


The best approach is to try different versions of GDB => try the link I 
posted first, it has the latest released windows 32 bit gdb.
Otherwise go to the mingw website, and find older gdb (I recommand to 
try 6.8.3 or 6.7.5 first, then any 7.x.x) those are known to work fine 
in Lazarus. Anything older I wouldn't try.


Another thing to try, is to disable (or if available try "game mode") 
your anti-virus solution. While I have not seen the specific case you 
reported, it is known that some AV solutions do interfere with gdb.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Implementing COM interfaces

2011-09-22 Thread Sven Barth

Am 22.09.2011 12:38, schrieb Lubos Pintes:

It is also supported on Linux.


How is that done?


IAccessible2 interfaces are exposed as .IDL file /type library. So my
questions are:
Is it possible to implement such interfaces in free pascal?


The compiler got many improvements regarding COM compatibility in the 
last years, so yes one can implement such interfaces.



What about importing type library / converting .IDL to pascal?


As far as I know you'll need to use Delphi to convert the type library 
to a Pascal unit. There is no converter for FPC (yet).


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Martin

On 22/09/2011 12:16, Lukasz Sokol wrote:

Hi,

I have installed 0.9.30 (2011-03-08), FPC 2.4.2 rev. 29749
(i386-win32-win32/win64) on another machine with Windows XP Prof. SP3,


32 Bit CPU? or 64 bit?

If 32, then please download latest GDB from 
http://svn.freepascal.org/svn/lazarus/binaries (include libraries) and 
try with that.



It compiles, and runs OK, but for some reason at some point
(when I press a key on my keyboard when caret is in a TMemo),
the GDB bails out with Error: 31 (found in debug log) at which time Lazarus
panics and pulls a plug...

I don't currently have my XP test environment ready, so I'll ask questions.

The 32 one must have some context (even if you can't see it currently 
(Signal, OS error, File-system error)


The latest 0.9.31 (trunk / unstable snapshot) displays added info in the 
"oops debugger" message.
You might try the 0.9.30.1 (fixes branch / usually quite stable), though 
I am not sure it does have the extra info.


In any case, you do not need to upgrade, but  you should at least run 
with --debug-log (NO need to recompile with the extra define) and also 
provide the output from the "debug output" window, as described on the wiki.





I did what http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips suggested,
i.e. no -Xs, no -XX, no optimization or -O1.

With or without "dwarf (-gw)" ? Does dwarf make a difference (probably not).



I can replicate it with a small test project,
this is so small it's pointless to write code here :
- start a new project
- put a TMemo on it
- save&compile&run
- click on the Memo1 when running
- type any alphanumeric character on the keyboard
  ->  GDB crashes, this time not even reporting an Error number.

Exact text, of the output of GDB or the Lazarus IDE?



Still googling for what the Error: 31 means.

This does not happen on Lazarus 0.9.28.2 r22279 FPC 2.2.4 
i386-win32-win32/win64.

Shall I report to bugtracker ?



I would advice first to update gdb (or even try with the old gdb from 
0.9.28), and also provide the info I indicated above.


Maybe it will be solved with the new gdb => which will already be part 
of the next Lazarus.

If not, reporting it as a bug, will raise the same questions...



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lubos Pintes

I cannot confirm this.
I put TMemo on form, run, the "Memo1" text is in. I can do what I want 
and everything seems to work.

Dňa 22.9.2011 13:16, Lukasz Sokol wrote / napísal(a):

Hi,

I have installed 0.9.30 (2011-03-08), FPC 2.4.2 rev. 29749
(i386-win32-win32/win64) on another machine with Windows XP Prof. SP3,
from the installer download, then used SVN to copy a project onto it
and run with Lazarus;

It compiles, and runs OK, but for some reason at some point
(when I press a key on my keyboard when caret is in a TMemo),
the GDB bails out with Error: 31 (found in debug log) at which time Lazarus
panics and pulls a plug...

I did what http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips suggested,
i.e. no -Xs, no -XX, no optimization or -O1.

I can replicate it with a small test project,
this is so small it's pointless to write code here :
- start a new project
- put a TMemo on it
- save&compile&run
- click on the Memo1 when running
- type any alphanumeric character on the keyboard
  ->  GDB crashes, this time not even reporting an Error number.

Still googling for what the Error: 31 means.

This does not happen on Lazarus 0.9.28.2 r22279 FPC 2.2.4 
i386-win32-win32/win64.

Shall I report to bugtracker ?

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
I shall mention:

The other (XP Pro) machine is a laptop and on my project, (as opposed to the
test project, dunno why) the Error: 31 code appears just before line where
one of the libraries is loaded :

Error: 31=library-loaded,id="c:\\Program Files\\Apoint\\Apoint.dll" [snip rest 
of line]
_
^ This does however /NOT/ appear when I run my test project, only the rest of 
the
line;

But I gather now, this may be due to spaces in the path of the DLL...?
(the infamous Program Files...)

The Apoint.dll is the part of the pointing device driver on this laptop so I 
guess
disabling it is out of question...

?
Lukasz




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] (Still googling for it) GDB error 31 ?

2011-09-22 Thread Lukasz Sokol
Hi,

I have installed 0.9.30 (2011-03-08), FPC 2.4.2 rev. 29749
(i386-win32-win32/win64) on another machine with Windows XP Prof. SP3,
from the installer download, then used SVN to copy a project onto it 
and run with Lazarus;

It compiles, and runs OK, but for some reason at some point
(when I press a key on my keyboard when caret is in a TMemo),
the GDB bails out with Error: 31 (found in debug log) at which time Lazarus
panics and pulls a plug...

I did what http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips suggested,
i.e. no -Xs, no -XX, no optimization or -O1.

I can replicate it with a small test project, 
this is so small it's pointless to write code here :
- start a new project
- put a TMemo on it
- save&compile&run
- click on the Memo1 when running
- type any alphanumeric character on the keyboard
 -> GDB crashes, this time not even reporting an Error number.

Still googling for what the Error: 31 means.

This does not happen on Lazarus 0.9.28.2 r22279 FPC 2.2.4 
i386-win32-win32/win64.

Shall I report to bugtracker ?

Lukasz


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Implementing COM interfaces

2011-09-22 Thread Lubos Pintes

Hi,
Concerning accessibility, I heard that the best thing one can do is to 
implement IAccessible2 for application/controls.
IAccessible2 is an extension of MSAA. It was created to support things 
like open document format etc. It is also supported on Linux.
IAccessible2 interfaces are exposed as .IDL file /type library. So my 
questions are:

Is it possible to implement such interfaces in free pascal?
What about importing type library / converting .IDL to pascal?
What about LCL compatibility? Perhaps IAccessible2 implementation could 
go on lower level...

Thank


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] About Threads

2011-09-22 Thread Michael Schnell

On 09/22/2011 12:17 PM, Kjow wrote:

I'll try to investigate :)
If you really desperately need "something more powerful" I suppose the 
only way is to introduce a second GUI Window. This will might if you are 
using a multi-Core System.


Obviously it is possible to create a second GUI Windows by starting a 
second executable (and have same communicate with the main executable by 
means such as Windows Messages, Pipes and/or shared RAM.


It might (or might not) be possible to create a second GUI Windows by 
using the second copy of the LCL that is created by a DLL / *.so and 
create a second application with same in a thread. Bus as nobody did 
decently try this yet, you are on your own evaluating this. (See the 
recent  thread on DLL in this forum) Let us know where you get.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Application.QueueAsyncCall and checking if object still exists

2011-09-22 Thread Krzysztof
Hi,

I have some object which create and execute thread. This thread do some http
requests (synapse) and send progress to the object by
Application.QueueAsyncCall(MyObject.MyHandleProc, AProgress), it is designed
for multithread - have critical section, so I can call it from thread to
main thread. But I have problem which occurs some times. In object
destructor I clear async queue by calling Application.RemoveAsyncCalls
(which is thread safe too). But if thread waiting in critical section
(because main thread block it with RemoveAsyncCalls) then after main thread
leave critical section, thread post progress but should not because object
is going to destroy. This occurs Access violation in ProcessAsyncCallQueue
because method MyObject.MyHandleProc doesn't exists any more, this is only
pointer to that method. Can ProcessAsyncCallQueue some how check if target
still exists?

Regards
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] About Threads

2011-09-22 Thread Michael Schnell

On 09/22/2011 11:40 AM, Kjow wrote:

2011/9/22 Michael Schnell:

QueuAsyncCall() does not considerably impact the Worker-Thread, so obviously
you mean that the main (GU-)I thread gets slow.

Here of course the correct way is to do the QueuAsyncCall() not too often.
(e.g. only when e.g.  5 % in the progress bar value is overrun)

-Michael

I'm using a real-time 3D graphics on my project and while it loading I
would generate some smooth animations, this is why I need something
more "powerfull" :)

Kjow
There is nothing more powerful. You just need to use the stuff provided 
in a decent way or give up.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] About Threads

2011-09-22 Thread Michael Schnell

On 09/22/2011 10:52 AM, Kjow wrote:


Thank you for hint, but trying it the Form is too slow and
semi-freezed.
QueuAsyncCall() does not considerably impact the Worker-Thread, so 
obviously you mean that the main (GU-)I thread gets slow.


Here of course the correct way is to do the QueuAsyncCall() not too 
often. (e.g. only when e.g.  5 % in the progress bar value is overrun)


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] About Threads

2011-09-22 Thread Michael Schnell
The best (portable and avoiding "Windowish" stuff) way to notify the 
main thread about the state of a thread (so that the main thread can 
e.g. advance a progress bar without temporarily stall the worker thread  
is "Application. QueuAsyncCall()".


Same fires a procedure in the main thread and provides it with a parameter.

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus