Re: [Lazarus] Masks: the naming of ...

2021-11-03 Thread Maxim Ganetsky via lazarus

03.11.2021 1:24, Bart via lazarus пишет:

Untracked files:
   (use "git add ..." to include in what will be committed)
 components/lazutils/test/backup/
 components/lazutils/test/testmasks.or


I changed lazutils test projects to make their output to `units` 
subdirectory (it is already included in .gitignore) and also added 
`backup` subdirectories to .gitignore. Please test.


--
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Masks: the naming of ...

2021-11-03 Thread Bart via lazarus
On Wed, Nov 3, 2021 at 7:30 PM Juha Manninen via lazarus
 wrote:

> Here it gives an error from procedure TestWindows.
Fixed now.
(Adjusted some tests, since DefaultMaskOpCodes changed, fixed the
wqFileNameEnd error.)

> I don't see commits from you in the TestMasks project.
Because as it turned out the changes I made to it were wrong, so I
just reverted them.

-- 
Bart
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Masks: the naming of ...

2021-11-03 Thread Juha Manninen via lazarus
On Wed, Nov 3, 2021 at 12:27 AM Bart via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> Whilst doing that I fiddled around with bot the tests and the masks unit.
> I then wanted to commit (push) these changes seperately.
> I got stuck.
> In svn I could commit a single file, then another.
> I git I don;t know how to do that.
>

A resolution by file for commits in arbitrary and limiting.
Often changes for one feature or bug fix must spread to many files, and
often changes made in one file should be split into many commits.
"git gui" allows to include/exclude hunks and even single lines in/from a
commit. I believe your GUI tool supports the same thing.


My workflow currently is:
>
> make changes
> git commit files I changed (solve one problem per commit)
> git pull (I have pull.rebase=true)
> git push
>

Make many commits. Some of them may be experimental, no problem.
Finally go through them, fix errors, join commits together, remove commits
purely for debugging, and finally push.
If a feature gets longer to finish, keep it in a local branch and rebase to
main sometimes.


PS. The test suite runs fine again (but see my remarks on the
> wqFilenameEnd quirk.
>

Here it gives an error from procedure TestWindows.
I don't see commits from you in the TestMasks project.

Regards,
Juha
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Masks: the naming of ...

2021-11-03 Thread Bart via lazarus
On Tue, Nov 2, 2021 at 10:59 PM Bart  wrote:

> 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that
> adding that quirk implies that mocAnyCharOrNone will be enabled.

Or a variant of this: remove it foem default and when added , aslo add
mocAnyCharOrNone ...

-- 
Bart
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Debugger stops in c dll even when no breakpoint set

2021-11-03 Thread Luca Olivetti via lazarus

El 29/10/21 a les 12:48, Christo Crause ha escrit:


On Fri, Oct 29, 2021 at 10:41 AM Luca Olivetti via lazarus 
mailto:lazarus@lists.lazarus-ide.org>> 
wrote:



I now tested under windows 10 64 bits (the exe is 32 bits, the previous
test was under windows 7 32 bits), and here instead of stopping once in
ntdll!RtlpNtMakeTemporaryKey it stops twice: in ntdll!RtlZeroHeap
and in
ntdll!RtlCaptureStackContext.
The former (RtlZeroHeap) shows what it seems a bogus call stack (i.e.
just two levels, the RtlZeroHeap itself and ).


Searching around seems to suggest that RtlpNtMakeTemporaryKey is 
typically part of a stack trace involving memory/stack corruption or 
freeing an invalid reference or already freed pointer.  See this 
example: 
https://stackoverflow.com/questions/45162248/calling-free-in-c-triggers-ntdlldbgbreakpoint-in-debug-but-crashes-in-rel/45247035 



Since the code writes something to memory in the int3 branch, check 
errno to see if that reveals something.


OK, I added a

   printf("Error clear %d: %s\n", errno, strerror(errno));

after the call to free.
When run outside the debugger, it prints "Error clear 0: no error", when 
run from lazarus "Error clear 22: Invalid argument".


I then found this document
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/free?view=msvc-160
it says that "when the application is linked with a debug version of the 
C run-time libraries, free resolves to _free_dbg", but I don't think it 
does that dynamically based on how the app is been called (directly or 
through a debugger), or does it?


In any case I checked the documentation for the "CRT Debug Heap"

https://docs.microsoft.com/en-us/visualstudio/debugger/crt-debug-heap-details?view=vs-2019

and the bytes surrounding my allocated data aren't the same as explained 
in that article and they are the same before calling free as they were 
after calling malloc.



Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 2 of 2.2.0

2021-11-03 Thread Kostas Michalopoulos via lazarus

On 11/3/2021 12:11 AM, Maxim Ganetsky via lazarus wrote:

Please create a bug report.


Sure, here it is:

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39454

Kostas
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Masks: the naming of ...

2021-11-03 Thread wkitty42--- via lazarus

On 11/2/21 6:24 PM, Bart via lazarus wrote:

Untracked files:
   (use "git add ..." to include in what will be committed)
 components/lazutils/test/backup/
 components/lazutils/test/testmasks.or

nothing added to commit but untracked files present (use "git add" to track)

Is there a way to suppress the warning about untracked files alltogether?
Orr whould all this be added to our .gitignore file?


yes, put them in your .gitignore if you don't want them tracked and you want no 
notifications about them changing...



--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list where it belongs!*
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Masks: the naming of ...

2021-11-03 Thread Bart via lazarus
On Tue, Nov 2, 2021 at 10:59 PM Bart  wrote:

> I see 2 solutions:
> 1. On TWindows* mocAnyCharOrNone will be enabled by default, while it
> is not on TMask*
> 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that
> adding that quirk implies that mocAnyCharOrNone will be enabled.
>
> A cleaner solution would be to NOT have wqFilenameEnd depend on
> mocAnyCharOrNone , but I have no idea how to do that.

A third solution:
Include mocAnyCharOrNone in DefaultMaskOpCodes.
It is very unlikely that this will cause regressions, since in the old
implementation [?] would only match a literal '?'.

Then, setting wqFilenameEnd in Quirks on TWindows* should implicitely
acitvate mocAnyCharOrNone...


-- 
Bart
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus