Re: [Lazarus] GDB is not good, any tricks to improve it?

2016-05-26 Thread Martin Frb

On 26/05/2016 06:31, Dennis wrote:

I am using Lazarus 1.7 (2016-04-20) with FPC 3.1.1

Great Work guys!

However, the gdb that comes with it is not as good.  I know debugger 
is hard to write so I am not blaming it.
I just hope someone can share some tips or settings tricks that I can, 
perhaps, make it work better?


e.g. it is very slow and its speed is not stable.
Sometimes, it is extremely slow or even stall the execution of the 
main program.  But when I delete all breakpoints and restart it and 
add back the breakpoints, it runs faster.


OS, bitness?

For windows we have alternative gdb versions on our Source forge site. 
They might improve stability.


try dwarf (ensure you also do that for all packages).
My tests (on windows) show that gdb 7.11 has massive issues with stabs.

Also on windows, 7.7 was the most stable. All above becomes less stable. 
More crashes
7.7 has one bug mixing records and classes there is a list of some 
gdb issuse on http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips


Speed (for watch evaluation): Use fpdebug (install the package). But it 
is still early beta, maybe alpha. And it does not work with generics.


Antivirus:
I run AVG and have no issues. I did exclude gdb and my lazarus project 
directory.



As for what watches can be evaluated That problem is much deeper 
than gdb.


correct scoping. (unit order for globals, if several used units have a 
global var of the same name).
dwarf (2 and 3, not sure about newer) do not support that. so fpc doesnt 
even include the info in the exe.


properties
same dwarf (2 and 3, not sure about newer) do not support that.

function calls. that is gdb. so fpdebug could learn that. but it still 
would not know what function a property maps to.


properties/functions that return string or dyn-array(managed type) or 
take them as argument.
dwarf (2 and 3, not sure about newer) do not support that. There is on 
spec how to get/discard the managed type, so leak and crashes would happen.


All in all, even with a debugger written for pascal, there would be many 
issues left.
Newer dwarf might have solved some, or fpc could add custom tags only 
for the "custom fpc debugger"




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


Re: [Lazarus] Source Editor font size

2016-04-22 Thread Martin Frb

On 22/04/2016 13:04, Graeme Geldenhuys wrote:

Hi,

1) I remember years back you could specify the editor font as a
positive value (point size) and a negative value (pixel size). This
doesn't seem possible with v1.7 any more. Why was that removed?
EditerOpts has not changed. Not sure why if fails now, maybe spinedit 
changed.

Its supposed to still work, please report.



2) Why can't I specify point sizes with a decimal? eg: 10.5pt
For example: I just switched my editor to DejaVu Sans Mono (from
Raize) because I needed to work with unicode text. The font size
changed drastically between to the two fonts. DejaVu Sans Mono 10pt
is now too small, and 11pt is too big. I would like 10.5 (like I've
done in other text editors I use). Or better yet, specify the font
size in pixels.



Well even if font.height or size would accept them, it would be a 
problem. In fact the problem exists on some OS, even without this.
SynEdit requires not only monospace, but at current it also requires 
that each char a width of a full int. If that is not the case SynEdit 
enforces it, but that causes very slow drawing. (and other side effects)


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


[Lazarus] Need feedback from Windows 64 users about GDB

2016-04-18 Thread Martin Frb
Since I only can test on a rather old w64 system, I would appreciate 
some feedback.


First of all, nothing of this affects the issues listed here 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Inspecting_data_types_.28Watch.2FHint.29
On any issues listed on this page, or present in both GDB versions, do 
*NOT* reply to this mail, open a new mail thread if you want to mail 
about them.


Currently Lazarus w64 ships with GDB 7.3.50. This is rather old, and I 
do not know how it performs on newer versions of windows.


I did run some test with several newer versions and uploaded GDB 7.7
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/

The page (in the folder GDB7.7) describes some issues that I found.
If any one likes to test this, it would be good to hear, if you find any 
differences to 7.3.50. Anything that only works in 7.7? Or anything that 
no longer works in 7.7


Why 7.7? Its not very new either?
Well I also tested some other versions (7.8, 7.9 and 7.11)

7.11 (at least the build I obtained / on my test platform) kept 
crashing/hanging in my tests (i.e. gdb crashes, taking the entire debug 
session down), so it is not usable with fpc generated exe.


7.8 and 7.9 may work, but they failed more of my tests than 7.7.  I 
didnt spent the time to analyse in details what failed. (32 bit gdb have 
similar issues).



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


Re: [Lazarus] *** GMX Spamverdacht *** help writing help [was: Re: Re: Suggestion for TRadioGroup documentation]

2016-04-09 Thread Martin Frb

On 09/04/2016 13:05, Jürgen Hestermann wrote:

Am 2016-04-08 um 20:36 schrieb Martin Frb:
> On VirtualTreeView: I dont know if the Author is around, and if he 
could/would answer questions, or even proof read contributed docs. But 
if he was, then the question  "How long do you think would it take to 
(fully) understand" is just the wrong question. The question should 
be: how much time do you have? Is there a chance, that in that time 
you can document at least one property or method? If yes, well then 
start. If you get more done (now or later), then even better.


Okay.
Then please find the bug that you cannot collapse/expand nodes with the
mouse if the main column is not the most left one.

Absolutely off topic, what is the point off that?

Proving that docs can be useful? No need, no one ever said that they 
were not. This mail is not about what you can or can not do with docs, 
but who can contribute to them.
Fixing a bug, will not contribute a single word to documentation. (a bug 
fixer may choose to add doc in addition to the fix, but that is 
unrelated to the fix.





And believe me, I have already spend a lot of time on reading the code of
the VirtualTreeView unit (and many other units too) but it is impossible
to dig that deep into each to fully understand them.
I cannot do the documentation for every single function and concept in 
Free Pascal/Lazarus.
Is that a reason that I am not allowed to complain about missing 
documentation?
No one said you have to document ALL of them, start with just one. That 
was the big point of my last mail. If you ignore that then there was no 
point in any answer at all.


If indeed you studied that much, and can not yet specify for one single 
function what it does, then that is really just unlucky. That said, I do 
not claim that the docs you may be able to add at that point, are of any 
help to your current problem, they may document functions you are not 
interested in, but that would still be documentation.


Worst case you could add docs that leaves certain questions open, and 
document only what you were able to find (advertising that they miss out 
some effects.) this would still be something the next person could build on.





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


[Lazarus] help writing help [was: Re: Re: Suggestion for TRadioGroup documentation]

2016-04-08 Thread Martin Frb

On 08/04/2016 19:24, Jürgen Hestermann wrote:

Am 2016-04-08 um 18:18 schrieb Martin Frb:
Or the person reading the code with the intend of documentation, is 
more clever than this. They could report any suspicious parts, and 
clarify the intend. That way the code would be additionally be 
checked for bugs.
Bugs where the original implementer may have had a wrong 
understanding of what he was doing. In which case had the original 
coder documented it, the bug would have gone into docs.
Assuming the original coder is available for comment, then a person 
different from that coder can often write much better documentation. 
(simple because then 2 (or more) people will have though about what 
it should be)


I aggree  that this can happen.
But it requires that the reader has at least the same skills
regarding the topic of what has been coded.
How long do you think would it take to (fully) understand the code for 
VirtualTreeView?

I have already found bugs in it but never understood why they occur
because I do not understand how the whole unit is coded.
So how should I even write documentation for it?



I have maintained SynEdit for nearly a decade now. Yet there is code in 
SynEdit I never looked at, and consequently I have not understood yet. 
According to you, it is a good thing I have not tried to add any docs. 
(Actually I should delete the parts I added to the wiki)


On the other hand according to me, anyone could have investigated a 
single property, or method. To do so would not require an understanding 
of everything. Yet that person could have documented the one 
method/property.

If so then at least some parts would have docs.

On VirtualTreeView: I dont know if the Author is around, and if he 
could/would answer questions, or even proof read contributed docs. But 
if he was, then the question  "How long do you think would it take to 
(fully) understand" is just the wrong question. The question should be: 
how much time do you have? Is there a chance, that in that time you can 
document at least one property or method? If yes, well then start. If 
you get more done (now or later), then even better.


The problem is, everyone (including me) is very good at pointing out why 
someone else should do it. And everyone just keeps pointing out it needs 
to be done.
Well that is fine. Lobbying for a cause is great. But the expectations 
in that case must be set correct. Someone else may also have a reason 
not to do it.


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


Re: [Lazarus] *** GMX Spamverdacht *** Re: Suggestion for TRadioGroup documentation

2016-04-08 Thread Martin Frb

On 08/04/2016 18:10, Jürgen Hestermann wrote:


Not only that it would take a lot of (unneccessary) additional time to 
wade through
foreign code (while the original coder already knew this after writing 
it).
Also, every bug would become part of the documentation as it is "how 
it is coded".


Or the person reading the code with the intend of documentation, is more 
clever than this. They could report any suspicious parts, and clarify 
the intend. That way the code would be additionally be checked for bugs.


Bugs where the original implementer may have had a wrong understanding 
of what he was doing. In which case had the original coder documented 
it, the bug would have gone into docs.


Assuming the original coder is available for comment, then a person 
different from that coder can often write much better documentation. 
(simple because then 2 (or more) people will have though about what it 
should be)


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


Re: [Lazarus] Class & Method info line at top of editor

2016-04-06 Thread Martin Frb

On 06/04/2016 12:03, Graeme Geldenhuys wrote:

Hi,

I don't really know what it is called, but when I'm in a method of a
class, the top line of my editor (I call it "info line"), tells me what
class and method I am in. This is very useful information.

I have noticed today that if I work with Object types (not Class types),
then I don't see that info line. And yes, the method is longer that the
editor is high (what triggers the info line).

Is there some place where I need to activate when that info line is
displayed, or is support for Object types not implemented?


It works for me. It all depends on the HL recognizing them. Can you test 
with a simple example? Maybe there is something else that prevents it.


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


Re: [Lazarus] Feature Request: Disable/clear the "Recent files" and "Recent projects" lists

2016-03-29 Thread Martin Frb

On 29/03/2016 17:19, Dmitry Boyarintsev wrote:
On Tue, Mar 29, 2016 at 12:15 PM, Martin Frb <laza...@mfriebe.de 
<mailto:laza...@mfriebe.de>> wrote:


If 0 currently means unlimited, then:
1) a new value is needed for unlimited
2) the configfile version must be increased, so the config reader
knows according to the version what 0 means.


So why to change IDE instead of an IDE plugin?

This question bothers me all the time. Despite of the fact there's a 
decent plugin API (IDEIntf), a lot of changes are making into IDE itself.



In general I agree, many thinks can be done as plugin.

In this case, I think:

part 1 is an actual bug in the current implementation. If I reduce "max 
recent procject" from 10 to 1, then the list will still display 10. That 
is wrong. It should be cut to 1. But it will only be cut, if I open a 
new project (via the open dialog).


part 2 is a feature. It could go in a plugin (assuming IdeIntf allows 
access to all needed functions).
And then it can not use the current spin edit, but instead must have a 
checkbox. Or always active if installed.


Not sure how practical that is in this case. A plugin could probably 
hide the menu entry. So that would be possible. Not sure if it can (with 
current IdeIntf) prevent the values from being written to the config file.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request: Disable/clear the "Recent files" and "Recent projects" lists

2016-03-29 Thread Martin Frb

On 29/03/2016 17:11, Martin Frb wrote:

On 29/03/2016 16:59, Dmitry Boyarintsev wrote:
On Mon, Mar 28, 2016 at 2:25 PM, Ondrej Pokorny <laza...@kluug.net> 
wrote:


On 28.03.2016 18:14, max.lemradt2 wrote:

I'd like to be able to disable or clear the "Recent files"
and "Recent projects" lists, e. g. for privacy reasons.



2) make it work with 0.

If 0 currently means unlimited, then:
1) a new value is needed for unlimited
2) the configfile version must be increased, so the config reader knows 
according to the version what 0 means.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request: Disable/clear the "Recent files" and "Recent projects" lists

2016-03-29 Thread Martin Frb

On 29/03/2016 16:59, Dmitry Boyarintsev wrote:
On Mon, Mar 28, 2016 at 2:25 PM, Ondrej Pokorny > wrote:


On 28.03.2016 18:14, max.lemradt2 wrote:

I'd like to be able to disable or clear the "Recent files" and
"Recent projects" lists, e. g. for privacy reasons.


I will probably never use it but if you need it, feel free to
create such a function and send a patch to mantis. A good place
would be to create a button in Options -> Environment -> Files.


Why a patch instead of an IDE plugin?


I dont think it needs a button.

There already is "Max recent files". If this is set to a lower value, 
then it should cut the existing list. So 2 steps:

1) fix this setting to cut old entries if the value was reduced
2) make it work with 0.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Having multiple Lazarus like GetLazarus version

2016-03-24 Thread Martin Frb

On 24/03/2016 20:36, Aradeonas wrote:

Aha!
If found the problem!
I have a config folder in my Lazarus directory that has every config 
xml files like default Lazarus have in Appdata.
When I open Lazarus forms shortcut like I said there was no problem 
but when I add that path to cfg it has problem until I changed the 
address to this : --primary-config-path=C:\Trunk\lazarus\config and 
now it solved and no problem.
What did you use before? --pcp? If that works on commandline but not in 
.cfg, then report a bug please.
But Im still curios about how GetLazarus version works without a cfg 
file and it will be very good if any one can check that.




You need to ask them.

Just to understand, you can download getlazarus, install the same 
version into 2 different folders, and run them and they have separate 
config?


Maybe they changed the code to use a folder inside the install dir?
The problem with the install dir is that on Linux you can not always 
find it easily. E.g. if the lazarus exe is linked (hard linked) to 
another location. (In that case the lazarus.cfg can not be found 
either). On Windows that is on problem.


Lazarus stores the config files by default in the location that is 
typical for the OS (each OS has guidelines for that). Storing inside the 
exe folder is against that rules. It can cause problems if:
- the install folder is read only to the user (the lazarus.cfg file is 
part of the install, it does not get changed by lazarus, so no problem)
- the folder can not be found, because the exe is outside the folder 
(hard link on linux). In this case lazarus.cfg will not work either, but 
at least a normal install will still work. lazarus.cfg is optional.


If the folder can not be found, lazarus will find the install folder, 
once it has the config, because the config contains the location where 
the lazarus sources are installed.
(Obviously if you get the install folder only from the config, then it 
is to late for --pcp)


And yes an install folder can be write protected (default on many linux 
installs), if you rebuild the IDE, then all the new ppu files are 
created inside the config folder.


So there are good reasons why Lazarus does it the way it does.

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


Re: [Lazarus] Having multiple Lazarus like GetLazarus version

2016-03-24 Thread Martin Frb

On 24/03/2016 19:48, Aradeonas wrote:


The same as when you specified --pcp
If you copied the lazarus.exe from another install, then you need
to rebuild it once. And add or remove packages if needed.

unfortunately I cant understand you.

well using a lazarus.cfg file (with --pcp inside) is exactly the same as 
specifying --pcp on the commandline or in a shortcutp


If you get warnings with --pcp in one case, you get them in the other 
case too.

Otherwise you made some mistake and the --pcp was not regocnized at all.

lazarus.cfg is internally handled as part of the commandline.

The advantage of lazarus.cfg is, that you can create as many shortcuts 
(or pin it) as you like. They all go to the same lazarus.exe, and then 
the lazarus.cfg is loaded.

So you do not need to add --pcp to all the shorcuts.

My lazarus.cfg contains one line
--primary-config-path=B:\laz_configs\lazarus_latest

And one the first start that path (must exist) will be populated with 
default config. And since them it is an independend installation.


---
As for the warnings about packages.
I do not know what you did.
But lets say you got trunk from svn. Then copied the lazarus.exe from 
your 1.6 install into that folder. Added the --pcp (in lazarus.cfg). And 
then run it. This exe will give warnings, as it now no longer has its conf.

You can ignore them. Menu Tools, build ide. And all is fine.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Having multiple Lazarus like GetLazarus version

2016-03-24 Thread Martin Frb

On 24/03/2016 15:44, Aradeonas wrote:


I understood your remark as
"getlazarus offers this functionality already".

Yes and I want to know how.



Lazarus itself only offers --pcp
that can be given
- on the commandline
- in a bat file
- in a shortcut
- in the lazarus.cfg

If GetLazarus does it in another way, then they added that. And you need 
to ask them.


I dont see a need for another way. The lazarus.cfg should be good. (it 
was created for that purpose only)


If you install different versions of Lazarus (1.4 up, when this was 
added), using the installer, then there is a checkbox, and it will set 
it all up for you.

Independent installs.
No missing package error.

Of course there is no installer for trunk. So when you get the sources, 
you need do build your first lazarus.exe (you can use make and the 
makefile, I never tried).
If you copy a lazarus.exe from another install, that is when you get 
warnings. But rebuild it once, and that is it.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Having multiple Lazarus like GetLazarus version

2016-03-24 Thread Martin Frb

On 24/03/2016 15:23, Aradeonas wrote:


And with that you can start c:\laz_trunk\lazarus.exe anyway you
want, it will use the pcp given in the cfg file.

I done that but it will be the reason of many errors about installing 
packages. and again I cant find any cfg file about this config with 
GetLazarus version.

The same as when you specified --pcp

If you copied the lazarus.exe from another install, then you need to 
rebuild it once. And add or remove packages if needed.



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


Re: [Lazarus] Having multiple Lazarus like GetLazarus version

2016-03-24 Thread Martin Frb

On 24/03/2016 14:35, Aradeonas wrote:


The recommende way is and has always been to use the
--pcp=path/to/config commandline parameter.
Why do you insist that it must be done in another way?
Why can you simpy use the mechanismes we have provided for just that?

If you don want a shortcut (why???) then just start it from the
console (as i do with lazarus fixes branch).

Ok. One simple reason I dont like to make shortcut with custom 
parameter with my apps and one good reason for that is, Windows 
Taskbar that you can pin apps dont accept parameters so if you pin you 
Lazarus that runs with parameters and next time click on icon on 
taskbar it will open but keep another shortcut on Taskabr.

It is annoying for someone likes me that like to keep my stuff organized.
Second reason is Im curious, everytime I saw shortcut way for running 
multiple reason and it seems there is a better reason out there and Im 
a programmer I like to find a better way and when I cant I ask from 
others.
Originally I should ask @Anthony about his works but it seems he 
refuse answering or supporting about his works so I ask here for 
future needs of others like me.




That is what the lazarus.cfg file is for.

Instead of supplying the parameters fer --pcp, you put them into the cfg 
file.


lazarus.exe, when started, looks for a lazarus.cfg file in the same 
folder as the exe. If found it adds the content to its command line 
params. (one per line).


so if you have
c:\lazarus   installation of 1.6, should use config in the default location
c:\laz_trunk   needs different config

then you add
c:\laz_trunk\lazarus.cfg
with the --pcp param you need.

And with that you can start c:\laz_trunk\lazarus.exe anyway you want, it 
will use the pcp given in the cfg file.



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


Re: [Lazarus] Strange behaviour of TCustomEditButton ancesters

2016-03-12 Thread Martin Frb

On 12/03/2016 20:20, Frans wrote:

I do understand what you mean, but I do not think that is th case.
I send my test program, it's very simple.

Did a quick test.
When first time hit TForm1.TabSheet2Show
FileNameEdit1.FEDIT.FBOUNDSREALIZED : record RECT {  LEFT = 0, TOP 
= 0,   RIGHT = 80,   BOTTOM = 23 }

TabSheet2.FAUTOSIZINGLOCKCOUNT : 1

The Tab has the correct Size (and it has a handle too), the edit does 
not yet have the final size.


The 2nd time
FileNameEdit1.FEDIT.FBOUNDSREALIZED : record RECT {  LEFT = 0, TOP 
= 0,   RIGHT = 406,   BOTTOM = 21 }


This is because sizes (such as in result of anchors, align, ...) are 
only applied when it makes sense (not sure, parent visible, handle 
created, ). In fact they probably need a handle, for the proper 
clientrect. And the tab-page only gets a handle when first shown.


I dont know at which time AUTOSIZINGLOCKCOUNT  is set (this avoids doing 
the resize multiple times). Maybe it should be cleared by the time of 
the event. But it is not.





Op 12-03-2016 om 20:59 schreef Martin Frb:


I dont have the "how to fix", but it looks like the first time you 
call SetFocus is before the tab got created, (or at least before it 
gets its true size). At that time the tab will have a dummy size 
(maybe 200 pixel width).
The SetFocus may or may not create those handles, but the size is 
likely not yet set. So the content of the edit is "scrolled".


It could also be, that it is created, but the autosize lock is still 
on, deferring the initial resize.



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


Re: [Lazarus] Strange behaviour of TCustomEditButton ancesters

2016-03-12 Thread Martin Frb

On 12/03/2016 19:38, Frans wrote:

Hi

I use TFileNameEdit (but TDirectoryEdit acts the same) on the second 
tabsheet of a PageControl where it's the first control to receive 
focus. I set the focus manually in the method form.tabshow for the 
event OnShow.
The first time I activate that tab, SetFocus has the effect as shown 
in FirstTime.png. When I select the tab another time, the effect is 
normal, as shown in Second time.png.

Is can't find out why. Is this a bug? I use Lazarus 1.6 and FCP 3.0.0.


I dont have the "how to fix", but it looks like the first time you call 
SetFocus is before the tab got created, (or at least before it gets its 
true size). At that time the tab will have a dummy size (maybe 200 pixel 
width).
The SetFocus may or may not create those handles, but the size is likely 
not yet set. So the content of the edit is "scrolled".


It could also be, that it is created, but the autosize lock is still on, 
deferring the initial resize.


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


Re: [Lazarus] how to search in files but skip commented text

2016-03-08 Thread Martin Frb

On 08/03/2016 10:28, Dennis wrote:

When source files become big, the search function becomes very important.
Does anyone share my desire for the Search function in Lazarus to be 
smart enough to skip those commented out texts?


I often comment out a portion of the source files before permanently 
deleting it (after I am really sure the new code is better than the 
old ones).


I hope the IDE will one day be smart enough to skip those commented text.

Also, sometimes I use meaningful english words as my routine and 
variable names. A search on those names will then also return those 
words in my commented txt.


You can use find identifier references. IIRC that can skip comments. But 
it also skips identifiers of the same name, if they are not the same 
(e.g a field of equal name defined in a different class, or local var)


Another method with similar results, is to add "deprecated 'find me';" 
to the identifier you are interested, and compile.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Martin Frb

On 24/02/2016 15:33, Bo Berglund wrote:

On Wed, 24 Feb 2016 15:00:42 +, Martin Frb <laza...@mfriebe.de>
wrote:


On 24/02/2016 13:10, Bo Berglund wrote:

When I connect via VNC from my Windows7 PC I can not enter the
characters < or + via the keyboard keys into the Lazarus code editor.

http://bugs.freepascal.org/view.php?id=17820

I dont know if the issue is in the LCL, or in VNC.
Apparently the data received from VNC does only occur with VNC. Other
app may not have the issue, may simply mean that they do not check this
particular part of the data, independent of its correctness

Too bad then


It doesnt mean that it cant be fixed (or if broken in vnc: worked 
around) in lazarus. But no one has the time to work on it


And the time check IIRC is there for a reason.
I believe (from what I heard) there are cases where the event for the 
same keystroke can be received again, leading to duplicate input. The 
time field is a way to identify this. The key code can not be used, 
since event handlers can change it, and it would then be received with 
the new value.

I am not sure if the origin of the 2nd event would be the OS or LCL.

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


Re: [Lazarus] Keys not recognized by Lazarus 1.6 code editor

2016-02-24 Thread Martin Frb

On 24/02/2016 13:10, Bo Berglund wrote:

I have discovered a strange problem with my Lazarus 1.6 release
installation on RPi2 (Raspbian Jessie) concerning keyboard entries.

When I connect via VNC from my Windows7 PC I can not enter the
characters < or + via the keyboard keys into the Lazarus code editor.


http://bugs.freepascal.org/view.php?id=17820

I dont know if the issue is in the LCL, or in VNC.
Apparently the data received from VNC does only occur with VNC. Other 
app may not have the issue, may simply mean that they do not check this 
particular part of the data, independent of its correctness


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


Re: [Lazarus] Lazarus 1.6 EditorMacroScript error on startup

2016-02-19 Thread Martin Frb

On 19/02/2016 14:10, Bo Berglund wrote:

I have retrieved 1.6 from SVN and built it using make bigide.
When I strat for the first time a dialog pops up saying:

Error in EditorMacroScript
The package EditorMacroScript (pascalscript macros)
has detected a problem and was deactivatyed.
The package filed its selftest with the message:
"Failed getstr2 [Exp: "456" / Got: "abc"]"
If you clear the error (options, editor macro, test again), does the 
error happen again?


What platform/OS, what cpu? Which optimization settings?
Pascal script has to emulate function calls, so it builds (or attempts 
to build) the stack for that call. That stack differs between OS and CPU.




I have seen this before but thought it would be fixed in the release
version...
It does not matter much because it will be shown only once on first
start, however it is pretty strange.
Once failed Editor Macro deactivates pascal script. That is why it does 
not warn again.



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


Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Martin Frb

On 12/02/2016 12:45, Michael Van Canneyt wrote:


Well, if it is on the todo list, I don't need to file a feature 
request ;)


Not really on todo, only remembered as being wanted.

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


Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Martin Frb

On 12/02/2016 16:10, Michael Van Canneyt wrote:


On Fri, 12 Feb 2016, Martin Frb wrote:



Not really on todo, only remembered as being wanted.


Should I file a request anyway or has memory been sufficiently 
refreshed ?


I had not yet read Mattias will go for a different approach solving it.

The problem for me is, that I will not have the time to look at it any 
time soon.


Also my approach would have more been "editing includes inline" rather 
than a cleaned source.


If I surprisingly will get time, then we can still have both one day in 
the future.


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


Re: [Lazarus] Guess the problem with Heap

2016-02-12 Thread Martin Frb

On 12/02/2016 19:04, Aradeonas wrote:

Hi,
Im working on one of my projects and tried to make a release version, 
so I used shortcut button in build modes and add release mode but when 
I compile and run I get SIGSEGV error when main form want to be create.
After many tries I found out that if I check "Use Heaptrc unit" in 
project debugging option program will run correctly even it is release 
mode so there is no debug info.

So simple :
If I check that option and use Heaptrc, no problem and if I unchecked 
it, error .
Its a old project and I dont remind any code I write about heap so I 
cant find the problem so I want to ask anyone can guess what code can 
make such problem?




Common candidates are any code that
1) accesses memory behind or before allocatien
  dynArray[-10]  := x
  dynArray[length(dynArray)+10] := x

  foo := TObject.create;
  TChildClass(foo).something 

  getmem, and then access outside the bounds
  pointer 

2) any code accessing memory that was freed (any of the above)

---
and worst of all, the error may or may not be triggered at the time of 
accessing the invalid mem. Sometimes it fails at some other completely 
valid code.


heaptrc changes memory layout as it stores the leaktrace info, and that 
means that by pure luck, the invalid memory access you do, does not 
affect the rest of your data. (or not anything that you detected yet)


A)
compile with heaptrc
and -Criot  and any other flag you can find. Note the LCL does not work 
with -CR (upper R)


set the HEAPTRC environment to "keepreleased"

B)
If you can compile an Linux and run with valgrind.




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


Re: [Lazarus] RFC : "Resolved View"

2016-02-11 Thread Martin Frb

On 11/02/2016 23:54, Michael Van Canneyt wrote:



By this I mean a view of a unit as the compiler will see it:
- Correct include files included


This has been long on the list. But still no in the doing.

Ignoring:
- any high/low-light or other markup to indicate the fact that the text 
comes from a different file

- probably also ignoring line numbering

this should actually be relatively easy.

There are already "views" wrapped around the textbuffer. All that it 
needs is to wrap another view around it, that combines 2 real textbuffers.


This could even be editable. Except it needs to prevent joining lines 
accross file bound.


There is work on the IDE side (outside SynEdit) to ensure it knows the 
file is open. Could be resolved by pretending it is open in its own 
editor (which is simply hidden)


- IFDefs properly resolved. 

lowlight exists.

Actual hiding is more work, because it needs to shift x positions in 
some line. Probably needs big changes. Though readonly may be doable.



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


Re: [Lazarus] Is there tool for testing class methods speed?

2016-01-20 Thread Martin Frb

On 20/01/2016 19:17, Krzysztof wrote:
Almost 10 years ago I worked in company where they used tool (Delphi 
5) which automatically added "checkpoints" after BEGIN and before END 
of each method of pointed class / pascal unit. Then after run, it 
reported (as extension for IDE) what was execution time of each method 
and how many times it was called. With the same easy way we could 
clean up unit from checkpoints. Totally forgot name of this tool but 
do we have something similar for Lazarus / FPC?

If you are on linux: valgrind + kcachegrind

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


Re: [Lazarus] Debugging in Libraries.

2016-01-18 Thread Martin Frb

On 18/01/2016 18:34, Donald Ziesig wrote:

Hi All:

I have encountered a problem doing things that used to work. (Using 
Lazarus 1.4.4 on Linux and 1.4.2 on Raspbian)


Specifically, I can no longer step into subprograms in library units, 
and when I set a breakpoint in the library code it is colored dull 
green as opposed to bright red in the main program. Some, but not all, 
of the library code is implemented using generics.


I can't see anything I am doing differently than before (except that I 
copied the entire source for the program and library from a Raspberry 
PI, including the configurations.  The PI also had this problem).


Dull green, usually (check debug output window) means that gdb returned, 
that there is on code on the requested line/number.


With generics, usually the oposite is the case, there are several blocks 
of code containing the location (and on windows, I have seen gdb 
handling that, at least in some cases).


The question then is, if fpc did generate sufficient debug info or if 
gdb has an issue.  (try stabs and dwarf)


ensure you disable "inlining"

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


Re: [Lazarus] Debugging in Libraries.

2016-01-18 Thread Martin Frb

On 18/01/2016 20:51, Donald Ziesig wrote:




ensure you disable "inlining"


where?

there may be an option to fpc

I place {$INLINE OFF}(IIRC) in units that need it

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


Re: [Lazarus] Elastic Tabstop - what would the bounty be worth?

2016-01-12 Thread Martin Frb

Just a tech note.

All that should be needed is one new unit, that replaces 
"SynEditTextTabExpander" (and then in SynEdit an option to use it 
(synedit.create does that)).


Must be based on TSynEditStringsLinked like the existing.

It has access to all lines, so it can calculate each tab. It also can 
(and has to) trigger line invalidation if tabs change.


DoGetPhysicalCharWidths retunrs how many "cells" a tab/char occupies.
For other chars is is
- 1 (first byte of utf8 char)
- 0 (2nd or later byte)
- 2 (first byte of FULL WIDTH utf8 char (Chinese and some other))

there is a locking mechanism as well, so if a line is inserted (with 
text), it can skip notifications on the temp empty line.


On 12/01/2016 15:47, Graeme Geldenhuys wrote:

Hi,

If I was to create a bounty to have this implemented in Lazarus (and
hopefully somebody has the skill and time to implement it), what would
the cost be? I'll be funding this personally as Elastic Tabstop support
has been on my Lazarus wishlist for years. The algorithm of Elastic
Tabstops is pretty simple, I just don't know what would be involved in
modifying Lazarus's TSynEdit component to support this.


Some Elastic Tabstops (ET for short) background:

Elastic Tabstops homepage:
   http://nickgravgaard.com/elastic-tabstops/

Visual Studio add-on:
   https://www.alwaysaligned.net/
   This also shows a nice animated image of what ET does to source code

jEdit, Gnome's gEdit etc also support ET.

ET is a replacement for TAB and Space indentation. It is a age old
argument which I don't want to go into here... All I can say is that ET
is in my personal opinion by far the best option of the lot. jEdit has
been supporting it for years, and it is immensely useful with source
code, CSV files, SQL, XML etc. I've personally used jEdit with ET
enabled for almost a year now, and it rocks!

Basically ET's representation of a tabstop is similar to that found in a
word processor (eg: MS Office, LibreOffice). The size of the Tab can
vary. On the flip side, programmer editors and IDE's often hard-code a
Tab size to a set number of spaces, and this size is applied everywhere.
Programmer editors in turn also limit you to only using monospace fonts.
With ET, the code is grouped into columns and each column can have a
variable Tab size (normally defined in pixels).

It has many benefits like using variable width fonts and still keeping
code perfectly aligned or indented. It makes reading column data like
CSV or SQL files very easy. Because it normally uses a single Tab to
indent or align code, the file size is reduced too - not sure if this
helps with compiler parsing speed. End-users can configure the threshold
and the amount of indentation (in pixels) so if you are a 2-space indent
guy, with ET you can still make your code look identical to what it was
before. If you like a bigger indentation, configure it with a larger
indent - the source code number of TAB characters will still stay the
same regardless, so different settings per developer doesn't cause
source code repository whitespace diffs (unlike Space or static TAB
indentation does).

More feature complete ET implementations also support converting Space
indentation files to/from ET. But I'm not really interested in this
ability for the bounty. Gnome's gEdit had ET plugins that showed this
ability and it actually worked pretty well though. I'll be doing a once
off conversion of my source code to ET style indentation and then keep
it like that.

You are welcome to read the ET homepage for further information (I
suggestion you do, if you are interested in this bounty). I even
recommend you download the Java .jar file which implements a mini editor
with ET support so you can try it yourself, or run jEdit and enable ET
support in the settings.


So for those knowledgeable of TSynEdit, how much effort would it be to
implement Elastic Tabstop support in Lazarus IDE, and what would be your
estimated cost? Hopefully I can afford the cost, because I would really
love ET support in Lazarus. ;-) The resulting implementation would
obviously be shared back to the Lazarus project and hopefully get
accepted in the repository.

You can reply here in the mailing list, or reply in private if you want.
If you need any more information, just let me know.

Regards,
   - Graeme -




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


Re: [Lazarus] IDE extension and Debug Output window

2015-12-31 Thread Martin Frb

On 31/12/15 12:25, Ondrej Pokorny wrote:

On 28.12.2015 07:49, Dmitry Boyarintsev wrote:
What's the correct IDEIntf APIs to show "Debug Output" window as well 
as populate with some debugging output?


Nobody has more information about this issue? I am interested as well.

My intention is: Open "Debug Output" window in the IDE that will catch 
DebugLn output from the debugged application.


"Debug Output" has nothing todo with debugln.  It displays the ide <> 
gdb communications. It is only useful for diagnostics of the ide or gdb.


If and only if the debugged apps stdout goes to gdb, then it will appear 
in that window. (that may (still) be the case on Mac).


On Linux there is a console window, on windows an app has its own 
console window (or if not, it has no stdout)



the window is somewhere defined in the debugger package or the IDE (but 
not ideintf) (afaik)


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


Re: [Lazarus] Lazarus versions in git

2015-12-17 Thread Martin Frb

On 17/12/2015 16:35, Graeme Geldenhuys wrote:

On 2015-12-17 16:19, Vincent Snijders wrote:

Maybe you should convert the svn to a git branch instead of a git tag.

I tried that it the past - tracking svn branches (seeing as svn tags are
just like svn branches), at it inflated the Git repository size
massively, because each branch was a 100% copy of all files. Branching
is not as "cheap" in SVN like they are in Git. So I gave up on that idea
too.



Actually there are only 2 or 3 branches that do the 100% copy thing.

That are branches which branch only a subdirectory (or in the last case 
parent dir) of trunk. (that is the one svn feature git does not have 
changing the root folder in a branch)


The first 1 or 2 where just the lcl folder. To clone those it the 
duplication is needed. (at least I found no better way).


The there is an 1.4.x branch, that was based on the parent of trunk, and 
has no content. It is possible to skip this, and automatically follow 
all other branches.


And that will work, as long as no accidental or intentional svn branch 
of just one folder is created in future.


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


Re: [Lazarus] lazarus 1.6 rc1 fpc 3.0 opendialog

2015-12-16 Thread Martin Frb

On 16/12/2015 19:57, Sven Barth wrote:


What about fpdebug? Does it work for Win64?


Not tested recently, but a year ago it did.

It is missing many features though. Even breakpoints do not always work 
(e.g. generics, where the same pascal code has more than one address in 
memory.


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


Re: [Lazarus] lazarus 1.6 rc1 fpc 3.0 opendialog

2015-12-16 Thread Martin Frb

On 16/12/2015 16:52, Andrea Mauri wrote:

Dear all,
windows 10, lazarus 1.6 rc1 fpc 3.0

32 or 64 bit?


I put a button and an opendialog on a form
Onclick button I put
opendialog.execute
clicking button lazarus stop workin with message debugger error
gdb stop working


Does it work outside the IDE? (without gdb).

If 64 bit: We currently have no maintainer for 64 bit gdb, so the gdb 
exe for 64 bit is rather old. It may not work well on modern windows.


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


Re: [Lazarus] lazarus 1.6 rc1 fpc 3.0 opendialog

2015-12-16 Thread Martin Frb

On 16/12/2015 17:26, Ondrej Pokorny wrote:

On 16.12.2015 18:20, Bart wrote:

On 12/16/15, Ondrej Pokorny  wrote:


>I had the same issue on Windows 10 and was advised to check
>DisableLoadSymbolsForLibraries (I don't remember who advised me, 
sorry).

Yoe beat me to it.
(And I was the one.)


:)

Is it possible/reasonable to check the settings by default? Maybe more 
people will be affected by the Win10 issue and not by disabling load 
symbols by default?


If we could get a more uptodate gdb for 64 bit that should solve it 
(providing it passes the gdbmi test case without crash)


If the option is active and you develop a library project, then you can 
not debug it.


-
In the past 64 bit did not work because of SEH, so the error was 
encountered with 32 bit. For 32 bit gdb was updated to 7.7.1 and that 
should (afaik) fix the issue. (On 32 bit gdb > 7.7.1, tested up do gdb 
10 are less stable, they crash in the testcase)


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


Re: [Lazarus] [offtopic] Debugger is not working...

2015-12-16 Thread Martin Frb

On 16/12/2015 10:41, William Ferreira wrote:

Hi,

I got a problem that seems more related to Windows than Lazarus itself.

I simply can debug an application.

I'm using a notebook that cames with Windows 8. I've updated to W8.1 
and to W10. After updating to W8.1, if I run a project via F9 key, I 
always get that message ('Hit stop and hope the best, we're pulling 
the plug', 'Failed to load application executable')


I thought updating lazarus should help but I got no success.

It heappens with all projects.

Is there a way check what is heappening?


1) Antivirus. I ve seen it before, the AV removes the exe before it can 
run. (some av do that without asking, even if they are set to ask 
first). The list of AV is always changing, as they get updated and may 
stop doing so.


2) Can you find and run the exe outside the IDE?

3) which lazarus? 1.4 (32bit ?).x or 1.6 (32 or 64 bit?)
For 1.4 (32 bit) try download the alternative gdb 7.7.1 from our 
sourceforge site. 1.6 already has that.


4) name of directory in which you saved the project, and where the exe 
is. For testing use a folder without spaces or accents (in the 
entire path, so no "documents and settings". Use C:\mytest



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


Re: [Lazarus] Release Candidate 1 of Lazarus 1.6

2015-12-09 Thread Martin Frb

On 09/12/2015 15:27, Mattias Gaertner wrote:

On Wed, 09 Dec 2015 14:31:20 +
Mark Morgan Lloyd  wrote:

[...]
How about a stable Lazarus v2.0.x, with as many bugs and development
quirks as possible worked out of it, based on FPC 3.0.x and with a
support commitment from both teams?

...

If you want to maintain a third branch with longer life, you can
volunteer to maintain it. Note that building all release binaries and
uploading them takes some hours. If you have a build farm
you can automate a lot of things. I can help you set it up.


+1
man power is the main issue. Building and testing.

Then a set of rules how to decide what to merge to lts.

As for the version number, I dont see any relation between 2.0 and lts. 
it can same as good be based on 1.4 (if you want 2.6.4 continued), or on 
1.6 (once 1.8 or 2.0 is out).



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


Re: [Lazarus] Release Candidate 1 of Lazarus 1.6

2015-12-08 Thread Martin Frb

On 08/12/2015 15:19, Mattias Gaertner wrote:

The Lazarus team is glad to announce the first release candidate of Lazarus 1.6.

This release was built with FPC 3.0.0.
The previous release Lazarus 1.4.4 was built with FPC 2.6.4.



checksums on our website 
http://www.lazarus-ide.org/index.php?page=checksums#1_6_0RC1


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


Re: [Lazarus] Detecting when decompiler is running

2015-12-04 Thread Martin Frb

On 04/12/2015 08:29, Richard Mace wrote:

Hi All,
I was wondering if there was a way where an application, written in 
Lazarus, could detect when a compiler is running, perhaps by it's mutex?
My idea was, in my application, I could periodically check to see if a 
decompiler was running and then my app could perform an operation, 
such as maybe closing.


Well there is no 100% protection.
Even if you make it so hard, that it is financially not interesting for 
a cracker, there will be someone who does the job to make him self a 
name, add it to their trophy list.
Hence my opinion: if you spent to much time/money on protection, then 
thats already your loss.


Anyway, there are 2 ways your app can be hacked.
1) a key can be distributed.
  1a) Either stolen, or bought with wrong credentials
  1b) a key generator can be written
2) a patch can be written to modify your exe.

(2) is always possible, and will happen unless (1) is really simple. But 
(2) is not so attractive to the users, as the risk is that they download 
a virus with it. IMHO attempting to protect against (2) is a waste of time.


(1) is important. Because downloading a key (usually a bit of text) is 
easy. Sign licenses with a private key. That should stop (1b).


(1a) can IMHO only be solved by phoning home. That in itself can loose 
you a small number of potential buyers.
Download a revocation list: hashes of keys no longer allowed, the 
overall list is signed, and it is issued with a time stamp, updated 
every minute. Your app will only run, if it can get a list not olden 
than x days.  Downside if your server is down, longer that this . 
Also the user needs internet.
Alternatively you can try to bind the license key to the hardware 
signature of the users pc. Allowing to reactivate a few times, then 
having to phone you I remember some big company did that in the past.


The other option is a dongle. Then you do not need to phone home. Again 
some hacker will create a patch to your software. But hopefully enough 
users will pay, rather than risking a virus.



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


Re: [Lazarus] Finding memory leaks

2015-10-24 Thread Martin Frb

On 24/10/2015 13:51, Aradeonas wrote:
Is there any way to count objects or whatever so I can find what 
object will not free?
I cant gett much of help from report becuase its very big (about 
100,000 line) and it have many items like this :


Call trace for block $0030EEC8 size 88
  $0049664B  TFONTHANDLECACHE__ADD,  line 104 of ./include/font.inc
  $00497F37  TFONT__REFERENCENEEDED,  line 1157 of ./include/font.inc
  $00498275  TFONT__GETREFERENCE,  line 1277 of ./include/font.inc
  $0041FE77  SCREENGETSYSTEMFONT,  line 51 of ./include/screen.inc
  $0049A6B1  TCANVAS__TEXTRECT,  line 1290 of ./include/canvas.inc
  $00520133  TCUSTOMPANEL__PAINT,  line 127 of
./include/custompanel.inc
  $004FF413  TCUSTOMCONTROL__PAINTWINDOW,  line 126 of
./include/customcontrol.inc
  $BAADF00D

Or it address end of procedures or ... .
So how can I find out what is the problem?



 look at http://wiki.freepascal.org/leakview
If you redirect above to a file ( set environment HEAPTRC to log=file / 
on windows setting environment requires a newer gdb, see the Lazarus 
sourceforge site), then you can load them.


Search for those that include your code.
The ide shows how often each leak recurred "(n times)",  find the ones 
with low count


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


Re: [Lazarus] annoying *SPAM* (attn: Michael Schnell)

2015-10-23 Thread Martin Frb

On 23/10/2015 19:34, Dmitry Boyarintsev wrote:


That's why I'm asking the participant to adjust his email client, 
rather than doing anything on my end.




Well my email client does sort them correct.
Yet I find it (personal opinion) annoying to have a SPAM keyword in 
those mails.


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


Re: [Lazarus] The GDB command: "-gdb-set confirm off" did not return any result

2015-10-22 Thread Martin Frb

On 22/10/2015 22:04, Bo Berglund wrote:
What I really wonder about next is the fact that it is different from 
in Delphi when one starts a command line program while developing. In 
Delphi the black terminal window shows up and one can see the progress 
of the execution there. In this case there was nothing, not even a 
single message in the messages window. It was as if the program did 
not run at all. But it might be intended to be like this on Linux, 
this is my first try really. 


On Windows you should get a terminal, if your app was compiled as console.

On linux the terminal is just a device /dev/pty,  and the terminal in 
which the command is running does the display.


Lazarus on linux has a debug window (menu view) to show the console output

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


Re: [Lazarus] Working on big units

2015-10-21 Thread Martin Frb

On 21/10/2015 20:53, Aradeonas wrote:
But I remember I read somewhere Its good too have minimum count of 
units and also its easier to use and also I saw many units that have 
thousands of code and its interesting that how they work on these codes?
These classes are in a subject like controls and I didnt want to have 
Edit,Label,List,Panel ... units .



Code tools (read the entire page, it is useful not just for navigation)
  http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools
  Method_Jumping   and Find_Declaration

Code explorer  (try it, the description is not that good))
  http://wiki.lazarus.freepascal.org/IDE_Window:_Code_Explorer

bookmarks

folding (if that is your thing)

find next/previous occurrence of word at caret

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


Re: [Lazarus] Working on big units

2015-10-21 Thread Martin Frb

On 21/10/2015 21:58, Aradeonas wrote:

Thanks, Im using all of these tools except folding (I just use JCF and
it is very good at losing the point that where you was!) and still hard
to maintain, so it seems its just my problem.

If you used "find declaration", that adds a jump point, and you can go 
back ctrl-h (I recommend you put that on a key you like)

You can also add your own jump points. (search the menu, or keymapping)

Also look at the overview gutter (next to scrollbar), it shows where 
interface and implementation are. That can be helpful.
You can also set inactive breakpoints (ctrl click on gutter), they show 
in the overview gutter too. If you have a limited number of them they 
can help finding things.


I dont know about jcf, and how well it keeps any line info (bookmarks, 
breakpoints,...)


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


Re: [Lazarus] Working on big units

2015-10-21 Thread Martin Frb

On 21/10/2015 21:02, Martin Frb wrote:


folding (if that is your thing)

There are shortcuts to fold ALL nodes at a specific level.
alt-shift-1  (or 2, 3 4 ... for level)
alt-shift-0 unfold

depending on what you have configured as fold-able try alt-shift-3 
(maybe 4) and you just see function headers.


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


Re: [Lazarus] GB18030 support in Lazarus

2015-10-16 Thread Martin Frb

On 16/10/2015 10:19, Tony Whyman wrote:


In terms of "work", if I use functions such as UTF8Length and 
ValidUTF8String on a GB18030 string should they always work, or are 
there exceptions?


IIRC ... UTF8Length counts codepoints, not chars. So if the chars you 
are interested in have chars that need more than one codepoint then this 
is not the  length in char.
This can even happen with some western languages, but it is not likely 
with them.


The same is for char accessing function (NextUtf8CharByteLen or 
similar). They only get codepoints.


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


Re: [Lazarus] Lazarus eats comment characters using Swedish keyboard

2015-10-11 Thread Martin Frb

On 10/10/2015 23:33, Bo Berglund wrote:

I wanted to comment out a number of lines so I hit the key combination
to produce the { } pair. But nothing was printed in the Lazarus
editor.
If I switched to the text editor in the GUI the keys produced the
wanted characters.

So something in Lazarus eats the key presses needed in Sweden to
produce the braces (RightAlt-7 and RightAlt-0).
Is there a configuration somewhere to stop this from happening so one
can enter comments in Lazarus?

This sometimes happens, if the key combo matches a configured shortcut. 
You can check this in tools > options> editor > keyboard


Right Alt = AltGr ? that is usually seen as equal to ctrl-alt.

Though I am not aware of anything an ctrl-alt 7 or 0 by default. 
Bookmarks are on ctrl-0 to 9. Maybe test this, set bookmark 7 and see if 
your key combo jumps there.


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


Re: [Lazarus] Lazarus eats comment characters using Swedish keyboard

2015-10-11 Thread Martin Frb

On 11/10/2015 17:33, Bo Berglund wrote:

I have investigated further now and when I use the Pi directly
(monitor connected to Pi and keyboard/mouse too) then the {} keys do
work.
When I noticed the problem I was using TightVNC to remotely access the
GUI. So somehow VNC might be involved here.



http://bugs.freepascal.org/view.php?id=17820

Never had time to work on it, and probably wont have anytime soon.

See note in bug. I dont know if same timestamp is allowed or if that is 
an issue in VNC. But in the LCL (for any custom control) it is 
interpreted as, this is the same keystroke, therefore it was already 
handled.


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


Re: [Lazarus] Lazarus Release 1.4.4

2015-10-07 Thread Martin Frb

On 06/10/2015 12:56, Mattias Gaertner wrote:

The Lazarus team is glad to announce the release of Lazarus 1.4.4.

This release was built with FPC 2.6.4, same as the previous
release Lazarus 1.4.2.

Forgot to mention, checksums of the original files are on our website: 
http://www.lazarus-ide.org/index.php?page=checksums


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


Re: [Lazarus] Lazarus Release 1.4.4 (debugging on some versions of Windows )

2015-10-06 Thread Martin Frb

On 06/10/2015 15:56, Mattias Gaertner wrote:

On Tue, 6 Oct 2015 13:44:54 +0100
Martin Frb <laza...@mfriebe.de> wrote:


On 06/10/2015 12:56, Mattias Gaertner wrote:

The Lazarus team is glad to announce the release of Lazarus 1.4.4.

This release was built with FPC 2.6.4, same as the previous
release Lazarus 1.4.2.


Windows users with Windows 7 or up may in some cases need to change the
debugger:

You may try the following setting:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working

Or (32 bit) download an alternative GDB:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/

Is this new?

Its been around for a while.

It seems that it depends on other software installed on those systems 
(mainly shell extensions => usually problems happen when debugging 
Open/Save-dialog)



Should it be added to the announcement?

Maybe

It is in the sourceforge Readme. But feedback indicates that it is not 
getting noticed there.


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


Re: [Lazarus] Lazarus Release 1.4.4 (debugging on some versions of Windows )

2015-10-06 Thread Martin Frb

On 06/10/2015 12:56, Mattias Gaertner wrote:

The Lazarus team is glad to announce the release of Lazarus 1.4.4.

This release was built with FPC 2.6.4, same as the previous
release Lazarus 1.4.2.



Windows users with Windows 7 or up may in some cases need to change the 
debugger:


You may try the following setting: 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working


Or (32 bit) download an alternative GDB:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/

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


[Lazarus] test

2015-09-12 Thread Martin Frb

test

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


Re: [Lazarus] Desktops and multiple source editors

2015-09-09 Thread Martin Frb

On 09/09/2015 11:58, Juha Manninen wrote:

Martin Friebe noticed a problem with desktops and multiple source
editor windows.
In fact I also noticed that a second source editor is not restored
correctly when changing desktops.
Now I realized the 2nd, 3rd etc. editor windows are project specific,
while other layout settings are global. This is not very logical. How
to solve it?
I think all layout settings should be global for the sake of consistency.



IMHO global is ok. Maybe an option to add project specific layouts?

In any case SourceEditors. The layout should store the positions and 
sizes. The project defines which of them to use.
But that needs decision what to do, if a layout was created with 2 
editors, but a project has 3 open. Where to get the initial pos for the 
new source editor?

- default pos
- pos from global "default" layout  (if it specifies such a pos)
- pos from hidden layout "last pos of any window by name"
- have a parent mode (layout was created as "child" of other mode)
- search the mast similar one (probably not)


Also does it affect design forms? Then that would have similar issues

position of open package windows...
At first similar to the source edit issue, only projects are more likely 
to have different packages.

[pos from hidden layout "last pos of any window by name"] might help here.


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


Re: [Lazarus] Lazarus IDE - One Hundred Papercuts

2015-09-09 Thread Martin Frb

On 09/09/2015 11:42, Graeme Geldenhuys wrote:

On 2015-09-08 23:16, Martin Frb wrote:

In respect to "fixed locally" (your comment below): How?
Does it use the storage that can be edited via the "windows" tab in
tools/opitons? (like breakpoints)?

That's another problem I have with Lazarus IDE...

In my haste to fix the annoyance (which was really bugging me at the
time) I simply used a local TINIFile in the Procedure List dialog, and
saved the relevant information to that standard lazarus primary config
directory.
Then IMHO it is not a papercut (though it may still be easy/moderate to 
fix, but that depends how deep the new multi desktop changes go.)



- deleting some breakpoints after a debug session. I don't see the 
point it forcing me to press an extra key between every delete action. 
Also when the window is opened for the first time, why is the focus 
set, but no selection. It is such little annoyances that I consider 
"papercut bugs". Developers are creatures that like efficiency. ;-) At 
least that is me. 

Fixed/Improved

If you have a patch for the "first open" I am happy to apply it. Just 
not going to search the code now, for where this needs to be done.



Can be solved via editor macro. But if you have a patch...

I use a few copies of Lazarus IDE - in various VM's. In two of them I
can't find any reference to Macros in the IDE menus or how to record a
new macros. Searching the wiki for "macros" brings up the paths and
filename macros - not what I wanted.

So I wrote a IDE add-on package which does what I want, and include it
in my local "custom-mods" branch.

Is macros support an IDE add-on package that must be installed? It is
such a useful feature of any IDE or text editor, so why can't Lazarus
IDE come standard with macros support, and put it right there in the
main menu, easy to find. See attached screenshot of EditPad Pro - can't
get more clear than that!

http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Macros

It should be installed by default. But maybe, if you did "svn up" from 
an older version, then it was not installed.




Just adding them to mantis (patches subproject), and mention "patch" in
the subject.

That's find for the ones I have fixed, but what about the other 95
papercut bugs - that don't have patches yet. Could we have a separate
sub-section in Mantis to file these easy to fix (1-2 hours max) bugs -
or should we simply attach a tag to an existing Mantis report. Again I
know tags exist in Mantis, but I don't know how useful they are in real
life.

I have no preference.

Personally, I hardly use tags, but neither do I look at which subproject 
a bug is in. I mainly look at the subject. (and the content, if needed)



The issue is not just if the can be fixed in a line or two, but also if
that is deemed the correct solution.

Obviously, and why it needs to be discuss - hence my preference to file
them in Mantis, instead of simply listing them in a Wiki page.


When it is bugs, always mantis. When it is improvements, then Mantis or 
mail list (depends on how likely others see the need for such an 
improvement and the ability to do it quick)



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


Re: [Lazarus] Desktops and multiple source editors

2015-09-09 Thread Martin Frb

On 09/09/2015 23:42, Ondrej Pokorny wrote:

On 10.09.2015 00:26, Mattias Gaertner wrote:

On Thu, 10 Sep 2015 00:13:24 +0200
Ondrej Pokorny  wrote:


2.) The visibility is controlled by the fact if the package is open or
not. The desktop cannot reopen packages, obviously.It doesn't store 
the file info of the package. It is also not expected.

Why not?
The window has the name PackageEditor_ToDoListLaz, so you have the
package name. That is all you need to load the package.
Ok, then it is possible to reopen a package. But still I don't think 
reopening/closing of packages on desktop change is a good idea. A 
package is kind of "project" and should be completely independent on 
desktop, the same like the active LPR project is.
Imagine e.g. that you (accidentally) save a debug desktop with a 
package. Should it be reopened every time you start debugging?


Worse, since desktops/layouts are global (apply to all projects), if you:
- save one of your desktops with a package open,
- switch to another desktop
- change project
- switch to the first desktop
it would open that package again, even if that package is not used by 
the project at all.


Of course, in a way you already have that: If a package is open, it 
stays open, even when you change the project. But at least the you see 
it immediately. with desktops it may be on a inactive desktop.


Yet in terms of a debug desktop, it may be practical, to be able to 
close all packages, and restore them after debugging.


Maybe desktops could have some per-project info?



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


Re: [Lazarus] Custom control clicks

2015-09-09 Thread Martin Frb

On 09/09/2015 22:53, Mattias Gaertner wrote:

This should do the trick:

http://wiki.lazarus.freepascal.org/Extending_the_IDE#Disabling_the_designer_mouse_handler


Should
  TControlStyleType = (
csDesignInteractive, // wants mouse events in design mode

do the trick too?

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


Re: [Lazarus] Desktops and multiple source editors

2015-09-09 Thread Martin Frb

On 09/09/2015 16:16, Ondrej Pokorny wrote:

On 09.09.2015 12:58, Juha Manninen wrote:

Martin Friebe noticed a problem with desktops and multiple source
editor windows.
In fact I also noticed that a second source editor is not restored
correctly when changing desktops.
Now I realized the 2nd, 3rd etc. editor windows are project specific,
while other layout settings are global. This is not very logical. How
to solve it?
I think all layout settings should be global for the sake of consistency.

Juha


The settings are saved correctly in the environment settings. Try to 
save a desktop with 2 editor windows, move something (including the 
editor windows) and then load the desktop. Both editor windows are 
positioned correctly.


I have 2 source editors open. Always. In all projects, since forever.

Now I updated the ide, while 2 SrcEd are open, I checked that the 
desktop settings were:

- one layout named "default" (set as default)
- autosave desktop.

Both SE are open
I have 2 monitors, both are on the left, with negative x-coordinate

After an IDE restart, I find this in environmentopts.

 

...
  




  
  




  

Those values are ok. Sometimes the order is SourceNotebook2 first

So I debug it.
The first sourcenotebook is created in 
TIDEWindowCreatorList.RestoreSimpleLayout;

#0 RESTORESIMPLELAYOUT(0x11a7f988) at idewindowintf.pas:2248
#1 RESTOREDESKTOP(0x156848) at environmentopts.pp:2109
#2 RESTOREIDEWINDOWS(0x11a50548) at main.pp:2336
#3 STARTIDE(0x11a50548) at main.pp:1548
#4 main at lazarus.pp:127

But the 2nd is NOT !

It is created later (when it is actually needed):
#0 CREATE(0x15b023c0, 0x1, 0x12b3c1b0, 1) at sourceeditor.pp:5733
#1 CREATENEWWINDOW(0x12b3c1b0, false, false, 1) at sourceeditor.pp:10554
#2 SOURCEWINDOWWITHID(0x12b3c1b0, 1) at sourceeditor.pp:9403
#3 OPENFILEINSOURCEEDITOR(0x1383a078, 0x154d5d20) at 
sourcefilemanager.pas:410
#4 OPENEDITORFILE(0x1383a078, -1, 1, 0x154d5d20, 
[OFPROJECTLOADING..OFONLYIFEXISTS, OFMULTIOPEN]) at 
sourcefilemanager.pas:1173
#5 OPENEDITORFILE(0x154c6528 
'B:\lazarus_latest\ide\sourcefilemanager.pas', -1, 1, 0x154d5d20, 
[OFPROJECTLOADING..OFONLYIFEXISTS, OFMULTIOPEN], true) at 
sourcefilemanager.pas:338
#6 INITOPENEDPROJECTFILE(0x147c1e48, 0x15244d60 
'B:\lazarus_latest\ide\lazarus.lpi', []) at sourcefilemanager.pas:3424
#7 DOOPENPROJECTFILE(0x11a50548, 0x15244d60 
'B:\lazarus_latest\ide\lazarus.lpi', []) at main.pp:6022

#8 SETUPSTARTPROJECT(0x11a50548) at main.pp:2219
#9 STARTIDE(0x11a50548) at main.pp:1553
#10 main at lazarus.pp:127

And so the desktop is not applied.


Opening the second SE-win in RestoreSimpleLayout wil only partly fix issues.

Because a desktop may have positions for 10 SE-win.
A project may load with just one or two open at start.
But then more get open while working on the project (I often open a 3rd 
or 4th temporarily). When they get opened they need to be placed 
according to the active desktop.



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


[Lazarus] multi desktop - scack window - column sizes

2015-09-09 Thread Martin Frb

This may only work with no anchordock. It was never finished for anchordock.

The ide layout, also saves column width (e.g. debugger stack win) 
together with the window size. (After all a smaller window may need 
different column width)


If I create 2 layouts, and have different sized stack windows, then the 
column sizes are not restored between the 2 layouts.





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


Re: [Lazarus] Desktops and multiple source editors

2015-09-09 Thread Martin Frb

Sorry didnt see the patch / so no feedback on it.


On 09/09/2015 16:16, Ondrej Pokorny wrote:


But I see that this is not wanted and expected from the user's point 
of view ->
That means secondary editor windows need special treatment in 
*TEnvironmentOptions.UseDesktop/TIDEWindowCreatorList.RestoreSimpleLayout*. 
It should not change visibility of editor windows. It should only 
change their position.


Yes ... no .. yes .. well
interesting point.

If a desktop layout is global (for all projects) then it can not be 
allowed to open close SE. Because each project can have different amount 
of SE.


But it may also be desirable to have layouts that toggle a specific 
project between different amount of SE (and maybe even with different 
set of files open).
But that only works, if a desktop is not global. (so no currently 
implemented)


And this may become worse (though not anytime soon).
I have that idea, that you can open 2 or 3 watches (or stack or local) 
windows. One for current data, the others for debug history 
http://wiki.lazarus.freepascal.org/IDE_Window:_Debug_History

Yet seeing my current schedule - *not* within the next 2 or 3 years ...

On 09/09/2015 16:31, Ondrej Pokorny wrote:

On 09.09.2015 17:16, Ondrej Pokorny wrote:
+ Maybe package windows should be treated the same way as editor 
windows? They are closed/opened on desktop change as well (the same 
problem).


Same as with SE, would depends on global/none global settings.




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


Re: [Lazarus] Lazarus IDE - One Hundred Papercuts

2015-09-08 Thread Martin Frb

On 08/09/2015 18:17, Graeme Geldenhuys wrote:

  * Procedure List window - save/restore listview column widths are not
implemented.

In respect to "fixed locally" (your comment below): How?
Does it use the storage that can be edited via the "windows" tab in 
tools/opitons? (like breakpoints)?



  * BreakPoint list window - select a breakpoint, press DEL, now
the focus is somewhere else, so I can't simply press DEL again
to delete the next breakpoint.
The focus is on the list (at least on win32), but no entry selected, 
using up/down arrow will select (next to the deleted entry).

You mean selection, not focus? You want the next entry selected?


  * Editor - no editor function (single shortcut) to duplicate a line

Can be solved via editor macro. But if you have a patch...


  * Conditional Defines dialog - tab order is wrong

  * Conditional Defines dialog - default focused button is wrong


All the above items I have already fixed locally, but there are many
more I could mention, and I'm sure you could contribute more too.

Maybe we could start a wiki page to list these "small but annoying"
niggles in Lazarus IDE. Alternatively [and probably a better idea] a new
section in Mantis could be created to track such “papercuts” and their
fixes (patches).



Just adding them to mantis (patches subproject), and mention "patch" in 
the subject.


The issue is not just if the can be fixed in a line or two, but also if 
that is deemed the correct solution.

Tab-order is easy.
Adding column widths may be easy too, but it should not be a one window 
only solution. It needs to be apply-able to all similar windows.


There are IMHO 2 (main), maybe 3  reasons why patches are not applied 
immediately [1].

1) Not noticed => send mail on the list (repeat if needed)
2) works, but not a good design (arguable, but happens)
3) no maintainer

[1] immediately = within a month or two, depending on patch size and 
maintainer busy or not.


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


Re: [Lazarus] Desktops with docked IDE

2015-09-08 Thread Martin Frb

On 07/09/2015 23:21, Juha Manninen wrote:

Lazarus trunk r49778 now supports desktops also with AnchorDocked IDE.
Its settings are now stored in environment options just like all
desktop settings.
It is made by super-contributor Ondrej Pokorny.
Please test.

With 2  SourceEditors open ( no docking, anchordocking not installed), 
the 2nd SourceEditor looses its position and size. It is always restored 
to default pos.


Desktop auto save is on

tools options shows "restore" for both source editors (on the window tab)

rev 49787

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


Re: [Lazarus] GDB strangeness

2015-08-25 Thread Martin Frb

On 25/08/15 11:06, Michael Van Canneyt wrote:


I'm debugging a program, and it just won't debug inside lazarus.

When I look at the debug output in Lazarus, I see:

-exec-run
=thread-group-started,id=i1,pid=20658
=thread-created,id=1,group-id=i1
^running
*running,thread-id=all
(gdb) =thread-exited,id=1,group-id=i1
=thread-group-exited,id=i1
^error,msg=During startup program exited with code 1.

The strange thing is that if I use gdb on the command-line, it does 
start and run the program,

and I can debug as I would expect it (albeit very rudimentary).
lazarus tries to set a break at entrypoint, and once that is reached it 
will set user breaks.


the last line/error is from the IDE, because that entry point brk was 
not reached.


2 possible solutions:
- a library interfers with the name main. there is an option 
(tools/options/ debugger) to skip loading dll info 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#internal-error:_clear_dangling_display_expressions

- tools/options/ debugger  change the InternalStartBreak option

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


Re: [Lazarus] Breakpoints not working

2015-08-13 Thread Martin Frb

On 13/08/2015 17:27, Donald Ziesig wrote:

Hi All,

I just updated my windows (ugh) version of Lazarus to 1.4. Everything 
seems to be working fine except breakpoints are not breaking.   They 
are listed in the breakpoints window with the break property set true, 
but execution goes wizzing by them without stopping.


Any ideas on what went wrong?


32 or 64 bit (and in case of the later, 32 bit IDE?)

While you debug, the breakpoints are still in there original red color? 
No change?


Using inline, or try except blocks? (and breakpoints are inside them?

Using smart linking?
Using Optimization level 2 or higher?

Try switching between Dwarf and stabs (project options / debugging)

Otherwise supply a log:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

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


Re: [Lazarus] Editor not syntax highlighting certain unit

2015-08-13 Thread Martin Frb

On 13/08/2015 18:03, Graeme Geldenhuys wrote:

On 2015-08-13 17:12, Martin Frb wrote:

IIRC HL is chosen according to file extension .pp or .pas
Do your files have those extension?

Also, as I mentioned these units compile just fine, so no syntax issues.
Forcing Free Pascal syntax highlighting for this unit looks perfect -
so no incorrect highlighting (suggesting malformed code syntax) appears.
So then it is not an issue with the HL, but with the HLR selection. I am 
not sure what all goes into this.


It should look at the extension (the configured extensions are on the 
color page of the IDE options)

It might (I am not sure) store info in the session (lps, lpi).

Not sure what else goes into the process.


Also removing the unit from the Project Inspector, saving the project,
and then manually using File Open to open the unit makes no difference
either. So it doesn't seem like a Project Setting is affecting this file.

Removing from project would not necessarily make a difference. The 
session stores info fore none project files too (thought that can be 
disabled). It stores info for all files that where open while the 
project was open. Same file can have different session info in different 
projects.


Sorry currently no further idea.

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


Re: [Lazarus] Editor not syntax highlighting certain unit

2015-08-13 Thread Martin Frb

On 13/08/2015 16:50, Graeme Geldenhuys wrote:

I then have to manually select the popup menu and select Object Pascal
as the highlighter and it works fine again. Closing the unit and opening
it again doesn't solve the problem. It always happens with specific
units too - I can reproduce the issue at will. Restarting Lazarus also
makes no difference.


IIRC HL is chosen according to file extension .pp or .pas
Do your files have those extension?

Or maybe check in the lrs (or lri ) file of the project, if there is a 
special HL setting for the file.



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


Re: [Lazarus] What lines of a project run [fpdebug]

2015-08-11 Thread Martin Frb

On 11/08/2015 00:03, Graeme Geldenhuys wrote:

On 2015-08-10 21:25, Martin Frb wrote:

Again it can be added to the new fpdebug.

Does fpdebug still have a (human) interactive interface, like duby used
to have? Or does it only do app-to-app communications now?



The IDE is interactive? Do you men a console style? Not sure. There was 
a console interface, and it might still work.


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


Re: [Lazarus] What lines of a project run

2015-08-10 Thread Martin Frb

On 10/08/2015 18:35, Aradeonas wrote:
So there isnt any option or implement in debugger that it log what 
lines it go and it compile?


You are looking for complied or executed lines?

Compiled lines: just look for the blue dots, while the debugger runs
Executed lines: No current plan.


For executed lines this needs a specially optimized debugger. If you do 
that with gdb in the IDE, your app would run really slow.
Even in valgrind, an app can slow down by a factor of 30 to 50. (values 
estimated from memory).


The IDE+gdb based debugger is not fit for that. If someone wants to do 
that based on the new fpdebug, that may be possible. But that needs a 
volunteer.


I dont know much about compilers but when it know what lines it run 
and debug so it can write it some where.


You can single step the app in the IDE (of course you need to keep 
pressing F7), the IDE will record the last 20 lines in the Debug-history 
window. But this kind of single stepping is very very slow.


valgrind also uses single stepping. but because it is not doing all the 
tasks other debuggers would do, it ends up with a slowdown that makes it 
still possible (though sometimes painful) to run an app.


Without single stepping, your app would need to log the info from 
within. But the complier does not do that. There is fpprofiler. It does 
not do what you want, but it can probably be modified to do it. It takes 
your source before compilation, and inserts extra statements 
(preprocessing).

So all you need is to insert (automatically) one log-statement on each line.

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


Re: [Lazarus] What lines of a project run

2015-08-10 Thread Martin Frb

On 10/08/2015 19:10, Aradeonas wrote:

Thank you.
But its interesting also how we can find out what is debugger doing.



Depends on what you want to know. You can see the interaction between 
the IDE and GDB in

Menu: View  Debug Window  Debug output.


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


Re: [Lazarus] What lines of a project run

2015-08-10 Thread Martin Frb

On 10/08/2015 15:34, Aradeonas wrote:
Is there any way to find out what lines of a project run in all units 
like a log?

For example :

unit1 line 345
unit1 line 346
unit1 line 347



As in code coverage?

The best I can think of is valgrind (linux only), with kcachegrind.
It doesn't give you a log, but you can view all code, and it tells you 
which lines were run, which function was called from which others, ...


The cost is, that your app will run much,much slower during the test.

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


Re: [Lazarus] What lines of a project run

2015-08-10 Thread Martin Frb

On 10/08/2015 19:46, Aradeonas wrote:

I want to know executed lines,I dont care about debugging in the mean
time but I want to know what lines will executed,debugger know that so
there should be a way to get this from it.
Actually the debugger does not always know what lines were executed. 
(But feel free to read the gdb docs)


It only:
- has a list of *all* liens that are in the exe, and that may or may not 
be executed.

- it knows when a line with a breakpoint is hit
- it knows when and which lines are single stepped.
If you use run (instead of step) between breakpoints, then which of the 
lines in between were executed is not known.


Now of course you can single step the entire app (or set breakpoints on 
al lines). Then you will get this list. But as I said, with the current 
gdb based debugger, that will be incredible slow.
(valgrind does the single stepping, but it does not have the overhead of 
interprocess communication between IDE and gdb)


Well newer gdb actually have a record mode, but not on all platforms. 
And I do not know if they allow to query the executed lines. The data is 
used for reverse execution. Anyway that is not available inside the IDE.


You can probably get a standalone gdb to do the singlestepping. Not sure 
but I guess it will still be slower than valgrind.


Again it can be added to the new fpdebug. But someone needs to do that. 
In fact it would be nice. Coverage is an important factor of testcases 
for example.




From the time I start programming years ago I like to know the lines
will executed,its sometimes useful and also interesting.
Well you can always start the app in the debugger, and single step (set 
a breakpoint at the start, press F9 to run, then F7 and continue with 
f7, F7, F7, )

It will take forever, but you see every line that is executed .

Just make sure (in the options) that the project, and all packages of 
interest have debug info enabled.


However single stepping does not create a logfile of all lines.


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


Re: [Lazarus] Printing BitMap on OSX crashes

2015-08-02 Thread Martin Frb

On 02/08/2015 20:20, Martin Grajcar wrote:


Maybe you can help me with this: How can I get the debugger 
(lazarus/gdb) show the C code? All I get for the innermost frames is 
an address and assembler. No idea what to install (and Google really 
didn't help).



I dont know if that is possible at all.  If it is, its gonna be tricky.

First of all:
The c code must be compiled with the same debug info (stabs or dwarf) as 
the pascal code.


I haven't followed the thread, so I do not know if the c code is in a 
library (dynamically loaded) or linked into the exe.
If linked then the debug info must have been included by the linker. If 
in an library it must be in such a way gdb can load it(gdb should be 
able to load debug info for libraries, but I do not know the state of 
this for each platform).
If in a library then DisableLoadSymbolsForLibraries MUST NOT (is not 
allowed to) be set.
( 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#internal-error:_clear_dangling_display_expressions 
)


If all the above is given, then the IDE must know where the files are 
(probably need to add the to the project). Debug info does not include 
the source, it just has filename and line number.


---
you can watch gdb communications in the debug output window (view  
debug windows). So you can see what gdb responds.


Also. if you open the disassembler and single step into the c code, I 
would *expect* (never tested) that the stack window shows filenames. If 
it does not, then the debug info is either not there, or not read by gdb.



On top of that you can try to control gdb yourself. You can do this from 
the IDE.
** BUT ** This is not an official feature and never will be. This solely 
exists for developing/testing the debugger integration in the IDE (for 
Lazarus developers).

It exists as it is, no feature requests, no bug reports...

Also, it has no safeguards. It is easy to hang the entire IDE by using 
it (only when sending commands to gdb). So ensure everything is saved.


Compile the ide with   DBG_WITH_DEBUGGER_DEBUG  defined.

Restart the IDE, Open debug output window (view  debug windows). There 
is an edit field and a button (must press button, return does not work). 
You can send gdb commands.


Do not send any commands that perform run/step. This will loose the 
debug session.


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


Re: [Lazarus] How to enable the Terminal Output window

2015-07-22 Thread Martin Frb

On 22/07/2015 09:52, Graeme Geldenhuys wrote:

I have two copies of Lazarus - one on my host system, and one in a VM.
The VM version as a Terminal Output option in the View - Debug
Windows menu. But my Lazarus on my host system doesn't have that option.
My host system is running Lazarus 1.5 r49482 FPC 2.6.4 x86_64-freebsd-gtk 2

Is there an add-on package I need to install to enable this feature?

Regards,
   - Graeme -




It may just be a define... Or it may not be implemented.

On Windows Terminal Output does not exist, because console apps always 
have there own window (though if someone knew how to implement it ...)
On MAC, no one seems to know how to do a virtual pty, so it is not 
implemented.


Freebsd was never tested. If the linux code for a virtual pty works, 
then only the IFDEF needs to be changed.


search for
{$IFDEF linux} {$DEFINE DBG_ENABLE_TERMINAL} {$ENDIF}

and enable it, and see if it works.


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


Re: [Lazarus] How to enable the Terminal Output window

2015-07-22 Thread Martin Frb

On 22/07/2015 10:49, Graeme Geldenhuys wrote:

On 2015-07-22 10:26, Martin Frb wrote:

Freebsd was never tested. If the linux code for a virtual pty works,
then only the IFDEF needs to be changed.

Ah, my host is indeed FreeBSD. I had a quick look and it doesn't
compile. The minilibc unit causes problems with getpt (linux) vs
posix_openpt() (freeBSD), or ptsname_r() vs ptsname() etc.

I'll take a further look when I have some more time.

Thanks for the info though.

Regards,
   - Graeme -


you can always redirect to any existing terminal.

Open a terminal (and if you wan, run something (a loop) that prevents 
the shell from reading your keyboard)


get the pty number/dev.

It Tools / Options / debugger, in the property grid, find: ConsoleTty 
(it is {$IFDEF UNIX}, so you should have it)
Enter the pty in that field. (the IDE will tell gdb to do the redirect, 
so if your gdb behaves)


downside, each time you open a new terminal, you need to change this.

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


Re: [Lazarus] checksums for downloads

2015-07-19 Thread Martin Frb

On 19/07/2015 12:56, Marc Santhoff wrote:

Hi,

since I have managed to destroy my fpc and/or lazarus installation and
have to install fresh ones, i wondered:

Are there chechsums available anywhere for the needed downloads - fpc,
fpc sources, lazarus?

I would feel mauch better, if so.



I am not aware of them being separately published (except for the ones 
on sourceforge, which are calculated by sourceforge).


As for the win installers, here are the checksums from the original 
installers (the local copies I kept after the build).


MD5 SHA-1
-fc90c4a3f0e34fecec9026be5b7a96bf 
610f535bfd3c6ea1addcdf019d21fc2c14edadb1 
1.4.2\lazarus-1.4.2-fpc-2.6.4-cross-x86_64-win64-win32.exe 
f177f00cbb16a87f044efc8cd7c90789 
77b0a6914a9b4b5416b4cb4d14e867cbfa89c635 
1.4.2\lazarus-1.4.2-fpc-2.6.4-win32.exe 28d8cd24dfb443ca48f8abec84d251a0 
3b2a389fc5746ce7ea2d59125bd02b707528ba9e 
1.4.2\lazarus-1.4.2-fpc-2.6.4-cross-arm-wince-win32.exe 
fd1f7ddc01762a9c86b742c607b33319 
34e89dd020e302414f1aa546b4318d104fee3ed1 
1.4.2\w64\lazarus-1.4.2-fpc-2.6.4-cross-i386-win32-win64.exe 
b4d4b91854915e6ca0a5772f2a27013b 
88b537a1ef50ae321c0323adc627cdf600e6e43f 
1.4.2\w64\lazarus-1.4.2-fpc-2.6.4-win64.exe


Sourceforrge is (as of today) still showing the same checksums (so it 
seems their recent downtime, has not led to modifications).
Though of course that is, if the checksums shown today by sourceforge 
actually matches the files online today.
I have not downloaded todays files to check if they indeed have the 
checksum that SF claims.


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


Re: [Lazarus] checksums for downloads

2015-07-19 Thread Martin Frb

On 19/07/2015 14:18, Martin Frb wrote:

On 19/07/2015 12:56, Marc Santhoff wrote:

Hi,

since I have managed to destroy my fpc and/or lazarus installation and
have to install fresh ones, i wondered:

Are there chechsums available anywhere for the needed downloads - fpc,
fpc sources, lazarus?

I would feel mauch better, if so.



I am not aware of them being separately published (except for the ones 
on sourceforge, which are calculated by sourceforge).


As for the win installers, here are the checksums from the original 
installers (the local copies I kept after the build).


MD5 SHA-1
-fc90c4a3f0e34fecec9026be5b7a96bf 
610f535bfd3c6ea1addcdf019d21fc2c14edadb1 
1.4.2\lazarus-1.4.2-fpc-2.6.4-cross-x86_64-

Trust your mail program to mess up the text

MD5 SHA-1

-

fc90c4a3f0e34fecec9026be5b7a96bf 
610f535bfd3c6ea1addcdf019d21fc2c14edadb1 
1.4.2\lazarus-1.4.2-fpc-2.6.4-cross-x86_64-win64-win32.exe


f177f00cbb16a87f044efc8cd7c90789 
77b0a6914a9b4b5416b4cb4d14e867cbfa89c635 
1.4.2\lazarus-1.4.2-fpc-2.6.4-win32.exe


28d8cd24dfb443ca48f8abec84d251a0 
3b2a389fc5746ce7ea2d59125bd02b707528ba9e 
1.4.2\lazarus-1.4.2-fpc-2.6.4-cross-arm-wince-win32.exe


fd1f7ddc01762a9c86b742c607b33319 
34e89dd020e302414f1aa546b4318d104fee3ed1 
1.4.2\w64\lazarus-1.4.2-fpc-2.6.4-cross-i386-win32-win64.exe


b4d4b91854915e6ca0a5772f2a27013b 
88b537a1ef50ae321c0323adc627cdf600e6e43f 
1.4.2\w64\lazarus-1.4.2-fpc-2.6.4-win64.exe




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


Re: [Lazarus] gdb version for use with lazarus

2015-07-19 Thread Martin Frb

On 20/07/2015 00:44, Marc Santhoff wrote:

Since i really shot down my installation I cannot tell which gdb has
been used lastly, but lazarus was version 1.2.0 and that combination
worked - well somehow at least.

Well there were some changes in the startup of the debug session

You can try (in the option   / property grid) to set InternalStartBreak 
to a diff value: gdsbMain or gdsbEntry my be good.


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


Re: [Lazarus] gdb version for use with lazarus

2015-07-19 Thread Martin Frb

On 19/07/2015 18:16, Marc Santhoff wrote:

Hi,

still in the reconstruction process:

Which version of gdb is requiered at least for us with lazarus on
freebsd with fpc 2.6.4?

I'm using nthe systems gdb which does not seem to suffice:

   gdb --version
GNU gdb 6.1.1 [FreeBSD]

Lazarus is from today, 1.4.2.



It might not just be the version number.
The lowest version regularly tested is or was till recently 6.3.5 (the 
apple mac edition).

But it is well possible that even older versions still work.

IIRC the problem on freebsd is that some commands returns different 
values. Instead of PID you get a Lightweight thread id, or something, 
and it has a diff abbreviation.
I remember 1 or 2 years back some reports and some changes. But I have 
not tested since. (And I do not know, if those changes apply only to 
certain version of the freebsd gdb.)


Lets start with a log, on whatever gdb you currently have
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

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


Re: [Lazarus] checksums for downloads

2015-07-19 Thread Martin Frb

On 19/07/2015 14:29, Marc Santhoff wrote:
Many thanks, but I'm using FreeBSD (8 and 9). 

I am only doing the windows builds..

How do you manage to see checksums on Sourceforge? That would be a start. 


Click on the (i) symbol behind the entry. You may have to scroll down, 
after you clicked, because sometimes the info (in-side popup) is 
displayed a bit far down.


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


Re: [Lazarus] Release model for Lazarus

2015-07-12 Thread Martin Frb

On 12/07/2015 19:54, Péter Gábor wrote:

If the bug-tracker's roadmap shows scheduled releases with date in the
(far) past
Mantis roadmap features seem to be quite limited (though I am no expert, 
and if you know better, then please correct me).


1) Lazarus is 1 project, but Mantis shows roadmap for the subproject 
(patches, packages) too. That pollutes the roadmap/changelog.
2) There is no concept for the SVN revision, (1.5 or 1.4.3) hey show as 
releases, and must have a date too.
3) All dates must be set 3 times for each of the (sub)projects (times 2 
for release and svn)

4) there are only 2 option
a) Released
b) Obsolete

As it is now 1.2.8 does not exist, never did, only it was once planed. 
It should be obsolete. But in order to do that one must first move all 
issues that have this version assigned, and give them a new version. 
(Well it is not a must, but any search that is from version x to version 
y, will ignore obsolete and there is no way to include.)


This is basically a question of have much time to spent for maintenance 
there. It is all possible, but we rather try to get something fixed in 
that time.


The idea is to to a fixes release approx every 2 month, but sometimes it 
is a bit longer.





I continue to believe that a signal on the start of waiting a week
would be very useful.

As for full releases there usually are announcements on this maillist 
before they get done.


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


Re: [Lazarus] Is there a bug in auto indentation in 1.4 or is it just me?

2015-07-08 Thread Martin Frb

On 08/07/2015 10:51, Bernd wrote:


I cannot find any way to influence this behavior in the editor
settings (which are very confusing btw), I cannot even change anything
at all there, even if I set everything to 4 spaces instead of 2 it
will still use 2 spaces everywhere (and 4 in an else begin branch).

Is this just me or is this a bug in the 1.4 release?



You probably have smart indent on (see codetools section of config). 
The editor section has a link that takes you there too.


afaik the smart indent takes it rules from a sample source in the config 
path...


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


Re: [Lazarus] GDB output warnings of internal errors

2015-06-29 Thread Martin Frb

On 29/06/2015 09:59, Graeme Geldenhuys wrote:

Hi,

Is the following internal errors normal output for GDB? I'm using
FreeBSD 10.1 64-bit with GDB v7.81

...


(gdb)
-exec-continue
warning: (Internal error: pc 0x58df30 in read in psymtab, but not in
symtab.)\n
\n
^running
*running,thread-id=all
(gdb)
=library-loaded,id=/usr/lib/i18n/libiconv_std.so.4,target-name=/usr/lib/i18n/libiconv_std.so.4,host-name=/usr/lib/i18n/libiconv_std.so.4,symbols-loaded=0,thread-group=i1
warning: (Internal error: pc 0x59f588 in read in psymtab, but not in
symtab.)\n


No idea if they are normal.

But since many of them happen during library loading, I would try the 
following setting: 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working

This will tell gdb to ignore libraries.

If it happens outside of libraries too, then try stabs vs dwarf. And 
ensure *all* packages (that is all packages that have debug info) have 
the same stabs or dwarf setting.


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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 19:28, aradeonas wrote:

But code is in exe and line works,I put a log in that line and it works.
No I havent and options are as wiki : Link smart= False;
(wiki screenshot seems outdated)



Can it be that the lines are inlined?

Please check, if those dots are missing right away, when you start 
debugging and have not (since compiling) edited the file.


or open the exe in gdb, and check if there is debug info for this line
gdb -mi yourexe.exe

info line yourunit.pas:291

Should return something like:
Line 291 of \include/control.inc\ starts at address 0x543105 
SETTEXT+325 and ends at 0x5433d1 SETTEXT+1041


info line yourunit.pas:292

If both line have code then the address should go up, if it does not, 
the fpc did not put debug info for that line, and the debugger can not 
find it.



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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 23/06/2015 19:07, aradeonas wrote:

Its almost first condition but I removed breakpoint but it debugger
think it still there.
I will try to to reproduce it,its hard becuse it finds out suddenly but
as I understand it mostly happen in other packages not the project.


1)
Most Important:
- OS? (Version?)
- CPU?
- Lazarus 1.4 ?
- fpc 2.6.4?
- gdb version (on windows 32 bit, it is 7.2 if you use the normal installer)

2)
So it is also gone from the list in the breakpoint window? (Menu View 
  Debug Windows)


3)
Do you remove the breakpoint, while the program is
- running
- paused
- debugger stopped
- dgb starting up / pressed F9, but not yet seeing your app on screen
- dbg stopping

4)
This is all in a single debug run? Or do you debug, end debug, start a 
new debug, and in the new debug a breakpoint still exists, that you removed?


5)
Does the code contains any threads?
On Windows: Does it happen shortly after (up to a minute) after using a 
file open/save (or other file/print/system) dialog? Many of them create 
threads.


If you can keep the thread window open, so you see if there are any 
threads. (On Windows, hitting pause, creates ONE extra thread)


6)
Try running Lazarus creating a logfile:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session
When you exit/ restart the IDE, delete the log, or it keeps growing.
When the issue happens again, send the log (if to big for the mail list, 
you can sent directly to me, or attach to a bug created)


When it happens, notice filename and line where the debugger stopped., 
then stop the debugger, without doing any further debugging, and exit 
the ide, so the log will be correctly finished.


-
Alternatively, if the above is too much / taking to long, then you can 
try to:

- in tools option reset debugger after each run£
- on Windows 32: use the gdb 7.7.1 (alternative gdb) from the Lazarus 
SourceForge site


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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 23:30, aradeonas wrote:

How? If you mean in command line it says there isnt any -mi.

sorry it is
gdb -i mi project.exe

probably a simple
gdb project.exe
will also do

Also I changed the lines but still if I set breakpoint in that line 
(now its 280) it still wait at the next procedure's begin.


Breakpoint normally only work on lines with blue dots. So if there is no 
blue dot then that means there is no line of code there.


Well of course in your case there is. But it is unknown to the debugger.
- Either FPC did not generate the info when compiling
- gdb has a bug reading the issue
- the IDE does display incorrect

In the last case the breakpoint would actually work. For the IDE does 
not check for the blue dot. IT just displays it, but does not use it for 
any check when setting the breakpoint.


You can try explicitly setting debug info to  dwarf2 (with sets) or stabs.


Btw. The above case likely has a different cause than the breakpoint at 
line 0. So there may be 2 issues.


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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 16:12, aradeonas wrote:

2) No they are in the breakpoints list but when you dbl click or want to
go to the line,Lazarus cant find the line.
Have you compared the Path in the filename? (You can see the path, by 
opening the properties of a breakpoint)


The line does exist in the file, I assume?

Have you edited the file after F9 (Answer 3 suggests you may have?)? If 
so are the blue dots correctly aligned with the code?


Is there any error, when the IDE does not jump to the line for a 
hidden breakpoint. (messages window)
If there is not, then use the log (below) and see, if any error is in 
the log (or mail it)



6) OK I will.

Is gdb 7.2 used for last 3 Lazarus release?because I have this problem
from the first time I met Lazarus and I think it 3 or 4 version ago.

After your answer above (2), the gdb version is very unlikely to affect 
this. This was in case the IDE tried to delete it, but gdb refused. But 
the IDE still has it, so gdb is not at fault.

But yes 7.2 has been used a long time.

As for the log. Reduce it to:

 --debug-log=LOG_FILE  --debug-enable=DBG_STATE,DBGMI_QUEUE_DEBUG



--
unrelated. There is a common win7/8 issue (but absolutely not related):
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#On_Windows_Open.2FSave.2FFile_or_System_Dialog_cause_gdb_to_crash



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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 18:45, aradeonas wrote:

Martin just now I have this problem :
BreakPoint viewer shows one breakpoint at line 291 but debugger wait 
on line 303 on begin of next procedure.when I remove procedure 
debugger wont wait but if I put it back on 291 it will wait on 303.
I restarted IDE but problem still there and log only shows breakpoint 
on line 291.




Ok, so the internal bap of the debugger is somehow incorrect. I assume 
all the above actions were within one debug session?


The IDE seems to assume that you deleted lines.

Now if you delete lines while debugging, the exe is not recompiled.
Delete 12 lines before 290, and the code that was at line 303 will be at 
line 291. (That is in the editor)


But in the exe in the debugger it would still be at line 303. SO if 
indeed those lines where deleted, then setting a breakpoint at 291, 
needs to set a breakpoint at what was 303 at compile time.


BEst to open an issue on the bugtracker.
I'll need to see how best to find additional info what causes this (that 
is why the IDE thinks you deleted lines, when you did not)



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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 19:05, aradeonas wrote:
Take a look at attachment,as you see blue dots are at all lines except 
the procedure that breakpoint is in it.Also as you can see debugger 
wait on 303.


BEst to open an issue on the bugtracker

Yes but I have problem to reproduce it.



Ah, that looks like a different issue. There are no blue dots for that 
procedure at all. That usually means this procedure was not compiled 
into the exe at all.


If the procedure is not in the exe, then gdb thinks there is no 
executable code on that line 291, and it sets the breakpoint on the 
first line with code that it can find after that. (Yep in that case it 
be better to not set a breakpoint at all, and mark the breakpoint as 
invalid, but that is not (yet) implemented).



By any chance, do you have smart linking enabled?
http://wiki.lazarus.freepascal.org/Debugger_Setup#Project_Options
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 18:20, Martin Frb wrote:


line is 0... Interesting.


you said

Its almost first condition but I removed breakpoint but it debugger
think it still there.

Does that mean:

- The breakpoint is there (red mark in the gutter)
- You click it, and it disappears from the editor
- Now you discover it is still there?


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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 18:35, aradeonas wrote:
I forgot to mention I use JCF formatter much,maybe it is the reason,I 
will focus on it and when I found a way to reproduce it tell you.



JCF may indeed not preserve breakpoints.

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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb
Do you at any time replace (e.g. copy and paste -- undo/redo -- 
delete-all/undo ) the content of the entire file? Or at least from line 
1 to the line with the breakpoint?


undo only undoes the text, but the breakpoint pos might in some cases be 
off, after the undo.


replacing lines, moves breakpoints in the replaced range, to (iirc) the 
top of that range.


On 24/06/2015 16:55, aradeonas wrote:
Yes,File is correct,I removed a breakpoint and change code but 
debugger think its still there.
Yes line exists but Line/Length column in BreakPoint viewer is 0 most 
of the times.
Ok it all sounds as if some part of the IDE thinks there is a different 
file.
Is it a file in your project (main folder or via some path), or is it in 
some package?


Do the logfile anyway, it should tell what filename and path the IDE 
sends to GDB. And also the line number. (see below)


line is 0... Interesting.


Yes I edit file.But I dont know what you mean from blue dots.
When you run your app, there should be blue dots in the gutter for any 
executable line.



Intersting is BreakPoint viewer show there should be a breakpoint but 
code editor doesnt and debugger think there is so BreakPoint viewer 
and debugger think same.


Where exactly does the debugger stop in that unit?

First line of first procedure? Or the actual line in which the 
breakpoint used to be, before it became corrupted?


--
Some background.

A breakpoint at line 0 can not be shown in the editor. (since first line 
is 1). However if setting a breakpoint in gdb to a line with no code 
(line 0 has no code) gdb searches the next line with code, and sets it 
there. (set a breakpoint on an empty line, will stop on next line)
This can be useful (if its just 1 or 2 lines off), and harmful if its 
100 or more lines away (e.g. in the interface section)


So if you stop at the first line of code in the unit, then you got a 
breakpoint at line 0, and that can not be displayed in the editor. The 
question is, how it moved to line 0.


Something else:
1) when you edit a file while NOT debugging, breakpoints move as you 
insert/delete lines (obviously)
2) edit a file while debugging, they still move, but only in the IDE. 
Because the exe in the debugger still needs the old positions.
So if procedure Foo is at line 500 to 550, with a breakpoint (in foo) at 
510; and you delete 5 lines somewhere before 500, then in the 
SourceEditor Foo is from 495 to 545 (but the loaded exe still is from 
500 to 550) The IDE then maps the breakpoint (that is now displayed at 
505) to still stop at 510 (in loaded exe). This map is reset when the 
debugger stops.


Maybe there is an issue with that map...


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


Re: [Lazarus] Invisible Breakpoint

2015-06-24 Thread Martin Frb

On 24/06/2015 18:31, aradeonas wrote:


Do you at any time replace (e.g. copy and paste -- undo/redo --
delete-all/undo ) the content of the entire file? Or at least from line
1 to the line with the breakpoint?

Yes but not all time this problem happen.
Try to keep watching those actions. In case any of them sets the line no 
to 0



Mostly package but it without any duplicate so make IDE wrong.
Right lets ignore filename and path. It seems the issue i on the line 
number.



Excuse me but still I can understand what you mean.


As in the image. Blue dots in the gutter. (they are red on lines with 
breakpoint)



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


Re: [Lazarus] Invisible Breakpoint

2015-06-23 Thread Martin Frb

On 23/06/2015 16:58, aradeonas wrote:

Hi,
As old users know there was a problem about breakpoints that after 
removing or changing code still debugger will stop at an imaginary line.
Years ago it seems solved as I read mail list but I have this problem 
from day one of using Lazarus and my only solution is removing them 
from breakpoint list.

I want to ask is the problem want to go away or Im doing something wrong?



There are at least 2 different known causes. (both have been addressed 
in the past, but there still can be conditions under which they exist)


1) Breakpoint is in correct file (including full directory), but 
different line
2) Breakpoint is in a file of equal name, but different directory. 
(usually symlink to file/folder)


1) As long as the blue dots (during debugging) are showing for a file 
the line should be traced.  However replacing multiple lines (via 
paste/override selection) will move it to either start or end of the 
newly pasted lines.


2) Do not open files with symlinks. if you did, search through your xml 
files (lpi, lps, and primary-config-path) and clean them.


If it is symlinks, I do not know how much can be done. Otherwise exact 
steps to reproduce are needed




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


Re: [Lazarus] WinControl.CanFocus

2015-06-08 Thread Martin Frb

On 08/06/2015 14:42, Juha Manninen wrote:

Regarding issue:
   http://bugs.freepascal.org/view.php?id=21708

I would like to fix the bug as proposed by Zoran Vučenović and Ondrej Pokorny.
Opinions?

The current behavior is compatible with Delphi. However it conflicts
with even Embarcadero's own documentation which means it clearly is a
bug in Delphi.
We should not replicate Delphi's bugs IMO.

The changed behavior would affect existing code, at least in theory.
In practice the CanFocus method is useless, no code can use it for its
intended purpose. Thus the implication would be very small.



There is a valid use case

  if HiddenForm.EditFoo.CanFocus then
HiddenForm.ActiveControl := HiddenForm.EditFoo;
  HiddenForm.Show;

This currently works, because of the visibility of the form is not checked.
(same applies for a form with Enabled := False)

If code prefers setting ActiveControl over calling SetFocus, then the 
current behaviour makes sense.


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


Re: [Lazarus] suggestion about source editor's pagecontrol

2015-05-21 Thread Martin Frb

On 21/05/2015 15:58, FreeMan wrote:


3-)Click lock 2-3 pagetab, then if try open new file (tab) IDE open 
new source editor

regards



You mean lock from context menu (pop-up)?

Are you sure, the file you are trying to open (that gets a new window), 
is not one of the files, that you locked?

If so, then that is expected behaviour.

Lock means the IDE will not scroll the editor in this tab, if you try 
to jump to an identifier, that would need scrolling, then a new window 
is opened.


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


Re: [Lazarus] suggestion about source editor's pagecontrol

2015-05-21 Thread Martin Frb

On 21/05/2015 17:52, FreeMan wrote:

On 21.05.2015 18:05, Martin Frb wrote:

Lock means the IDE will not scroll the editor in this tab, if you 
try to jump to an identifier, that would need scrolling, then a new 
window is opened. 
If you mean, not scroll is can not down/up in editor, its not work 
like that for me. I mean, I can scroll down/up and can edit. When cmd 
+ click on procedure name, its jump and if its not opened file, file 
is opening and goto procedure definition. At this point, lock and 
unlock not different, just tab caption has '#' symbol


In my mind, lock tab mean, tab is always opened, and cant change page 
index and cant close.


Lock in the source editor means, that it will not scroll by itself. 
(e.g. as a result from code jump actions).


It does allow scroll by user.


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


Re: [Lazarus] Lazarus trunk (r49079) does not compile on MAC

2015-05-18 Thread Martin Frb

On 18/05/2015 13:39, zeljko wrote:


fpc-2.6.4 i386

So everything is default.



And default is stabs, and does not work.

Well 1 minute ago, I worked out how to conditionally change it for order 
fpc, and committed this.


This will only work if building from inside the IDE (tools menu).

I do not know how to make this happen for the makefiles

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


Re: [Lazarus] Lazarus trunk (r49079) does not compile on MAC

2015-05-18 Thread Martin Frb

On 18/05/2015 13:12, Torsten Bonde Christiansen wrote:
It looks like a compiler error related to i386 only, since I can 
compile x86_64-linuxwithout problems, but on

i386-linux I get the following error:

...
/home/torsten/FreePascal/lazarus/components/lazutils/lazlistclasses.pas(1655,20) 
Hint: (4035) Mixing signed expressions and longwords gives a 64bit result
/home/torsten/FreePascal/lazarus/components/lazutils/lazlistclasses.pas(238,29) 
Hint: (5024) Parameter ARequired not used
/home/torsten/FreePascal/lazarus/components/lazutils/lazlistclasses.pas(1206,1) 
Fatal: Internal error 2005091810


That is in the stabs writer


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


Re: [Lazarus] Lazarus trunk (r49079) does not compile on MAC

2015-05-18 Thread Martin Frb

On 18/05/2015 09:10, zeljko wrote:

On 05/18/2015 09:58 AM, Torsten Bonde Christiansen wrote:

lib/i386-darwin/lazlistclasses.s:12244:invalid character '_' in mnemonic
lib/i386-darwin/lazlistclasses.s:12354:invalid character '_' in mnemonic
lib/i386-darwin/lazlistclasses.s:12384:invalid character '_' in mnemonic
lib/i386-darwin/lazlistclasses.s:12484:invalid character '_' in mnemonic
lib/i386-darwin/lazlistclasses.s:12494:invalid character '_' in mnemonic
lib/i386-darwin/lazlistclasses.s:12945:invalid character '_' in mnemonic
lib/i386-darwin/lazlistclasses.s:12951:invalid character '_' in mnemonic
/Users/torsten/FreePascal/lazarus/components/lazutils/lazlistclasses.pas(690,33) 


Error: (9007) Error while assembling exitcode 1
/Users/torsten/FreePascal/lazarus/components/lazutils/lazlistclasses.pas(690,33) 


Fatal: (10026) There were 2 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[1]: *** [lazutils.ppu] Error 1
make: *** [lazutils] Error 2


It does not compile on linux too. Reason: r49054 and r49054 by Martin.


There is a (one) problem, if the debug type option in the package is 
set to stabs (or default). Try changing that. The above does not look 
like that though.


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


Re: [Lazarus] New preprocessor directive

2015-05-17 Thread Martin Frb

On 17/05/2015 13:22, Vojtěch Čihák wrote:


Add I created code template for it: icr and it writes{$I 
%CURRENTROUTINE%} itself :-)





Simply use $ProcedureName() in your template

  EnterSomething('$ProcedureName()');

Of course it does not update if you rename the procedure, but otherwise 
it is fine.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE / Editor macros?

2015-05-12 Thread Martin Frb

On 12/05/2015 12:47, Graeme Geldenhuys wrote:

On 2015-05-12 12:34, Martin Frb wrote:

Ctrl+Shift+L (List) the window.

That key combo shows the debug dialog Local variables.

Interesting. local  var  should be ctrl-ALT-L


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


Re: [Lazarus] IDE / Editor macros?

2015-05-12 Thread Martin Frb

On 12/05/2015 13:09, Graeme Geldenhuys wrote:
ps; If anybody is ever bored enough, please implement a feature that 
lists keyboard shortcuts that are customised by the user (ie: not 
defaults). :) 


Open the editoroptions.xml and look for KeyMapping?

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


  1   2   3   4   >