Recent

Author Topic: Lazarus Release Candidate 2 for 2.0  (Read 25466 times)

antispam88

  • New member
  • *
  • Posts: 30
Re: Lazarus Release Canditate 2 for 2.0
« Reply #15 on: November 03, 2018, 04:28:49 pm »
Yes, good point. I had renamed the unit because it had nothing to do with UTF8. Actually I thought it was not used outside Lazarus sources.
Now in r59436 I added lazutf8sysutils back there with "deprecated" warnings. It will be in 2.0 final and in RC3 if that is built.
Now waiting to be merged to fixes branch. See:
 http://wiki.lazarus.freepascal.org/Lazarus_2.0_fixes_branch

Thank you

You wrote that it is common to use it:
Is there another or better way to get UTC time?

fred

  • Full Member
  • ***
  • Posts: 118
Re: Lazarus Release Canditate 2 for 2.0
« Reply #16 on: November 03, 2018, 04:40:42 pm »
Started with OmegaSoft Pascal on OS-9/68k , now Lazarus 1.8.4 / FPC 3.0.4 on Windows 7

jwdietrich

  • Hero Member
  • *****
  • Posts: 983
    • formatio reticularis
Re: Lazarus Release Canditate 2 for 2.0
« Reply #17 on: November 03, 2018, 06:15:55 pm »
1) RC2 is not available for macOS as a download from http://sourceforge.net/projects/lazarus/files

Is it by intention that a macOS version of RC2 doesn't exist at SourceForge (e.g. because no Mac-specific things were changed between RC1 and RC2)?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 1.8.4 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

Akira1364

  • Sr. Member
  • ****
  • Posts: 382
Re: Lazarus Release Canditate 2 for 2.0
« Reply #18 on: November 03, 2018, 08:04:45 pm »
I build both 64-bit FPC and Lazarus from the trunk sources on Windows so this doesn't affect me personally, but I notice that the 64-bit Windows installer is still shipping with the ancient, buggy GDB 7.3?

Anyone installing on Windows 10 (likely also 8.1 or 8, and maybe 7 in some cases) is highly likely to encounter extremely nasty bugs with that version (such as hard lockups of the machine that require physically powering it down and back on again), which doesn't paint a very good picture of Lazarus to newcomers.

There seems to be an "alternative GDB" section on the SourceForge page which is a step in the right direction, but overall I'd say a build of GDB 8.1 or preferably GDB 8.2 should definitely become what's officially distributed at least with the 64-bit Windows installers specifically as soon as possible, as the current copy of GDB is quite unstable on newer machines and just has many issues that do not exist in newer versions.

One other thing I noticed is that the 64-bit Windows installer is also still including a 32-bit copy of Make 3.80, which is not great both for build performance reasons and also because Make 3.80 was released in 2002, and has a variety of issues that (like I mentioned about GDB above) don't exist in newer builds.

Personally I've been using the Make/GDB/other binutils binaries that are available with the MinGW distribution maintained by Stephan Lavavej from Microsoft for around four or five years now on 64-bit Windows, and can attest to them working seamlessly as replacements for what Lazarus currently distributes. His website is here:

https://nuwen.net/mingw.html

I've also attached a 7z file specifically containing the 64-bit build of Make 4.2.1 from his most recent overall release to this comment, if anyone wants to swap theirs out.
« Last Edit: November 03, 2018, 08:22:49 pm by Akira1364 »

440bx

  • Sr. Member
  • ****
  • Posts: 390
Re: Lazarus Release Canditate 2 for 2.0
« Reply #19 on: November 03, 2018, 08:54:05 pm »
@Akira1364:

Thank you.  Good things to have around.  :)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4949
    • wiki
Re: Lazarus Release Canditate 2 for 2.0
« Reply #20 on: November 03, 2018, 09:16:09 pm »
but I notice that the 64-bit Windows installer is still shipping with the ancient, buggy GDB 7.3?

They need some more testing, especially with regards to the fact that *all* gdb above 7.6 have a bug that leads to "record" shown as "class" (albeit with correct data). https://sourceware.org/bugzilla/show_bug.cgi?id=16016
Which leads to the IDE potentially trying to do incorrect typecasts...

There is also an unconfirmed report about 8.1 crashing in some cases, when showing the register window.
The basic answer seems to be, that all gdb versions are flawed. But each in a different way.

Can you report any way, that you know how to crash the old gdb?
I have an automatic testcase, that runs a lot of commands against that gdb. I run this under win10 1709 64bit, with no crash or hang.

Using Dwarf3 causes gdb to crash, but that is true for all gdb versions including 8.2.
Using dwarf3 with fpc trunk causes less crashes (but still some) that dwarf3 with 3.0.4 on the same version of gdb.

--------------------
About make: afaik this is taken from the fpc repository.
Though I remember that it had for some time had to be kept on an older version as the newer caused some error. Dont remember the details, there may be a bug report about it.... Not sure if this is still the case.

Akira1364

  • Sr. Member
  • ****
  • Posts: 382
Re: Lazarus Release Canditate 2 for 2.0
« Reply #21 on: November 03, 2018, 10:18:31 pm »
Can you report any way, that you know how to crash the old gdb?
I have an automatic testcase, that runs a lot of commands against that gdb. I run this under win10 1709 64bit, with no crash or hang.

Using Dwarf3 causes gdb to crash, but that is true for all gdb versions including 8.2.
Using dwarf3 with fpc trunk causes less crashes (but still some) that dwarf3 with 3.0.4 on the same version of gdb.

I can't list any specific ways off the top of my head, I just know that in the past I found that attempts to use it would regularly lead to hard lock-ups at indeterminate times while debugging a variety of programs. Maybe I'll try to nail down a solid way to reproduce it.

As far as the Dwarf versions, well, yeah, but that's definitely an FPC issue, not a GDB issue. Recent GDBs work fine on Windows for all versions of Dwarf generated by various other languages I use. Honestly by now FPC should really be stably supporting Dwarf 4 or 5 on all platforms anyways, yet we're still at old Dwarf 2 (or 3 in some cases) as the default.

The Dwarf generation specifically on 64-bit Windows is particularly questionable in my opinion, also. For example, all methods still identify themselves to GDB with the "DW_CC_GNU_borland_fastcall_i386" calling convention identifier on Win64, despite the fact that it is obviously literally impossible for that calling convention to ever be used for anything on Win64...
« Last Edit: November 03, 2018, 11:32:00 pm by Akira1364 »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4949
    • wiki
Re: Lazarus Release Canditate 2 for 2.0
« Reply #22 on: November 03, 2018, 10:37:51 pm »
As far as the Dwarf versions, well, yeah, but that's definitely an FPC issue, not a GDB issue
Yes and no. Fpc may well write something incorrect into the dwarf3 info. But gdb should give an error, not crash.

Akira1364

  • Sr. Member
  • ****
  • Posts: 382
Re: Lazarus Release Canditate 2 for 2.0
« Reply #23 on: November 04, 2018, 01:34:07 am »
As far as the Dwarf versions, well, yeah, but that's definitely an FPC issue, not a GDB issue
Yes and no. Fpc may well write something incorrect into the dwarf3 info. But gdb should give an error, not crash.

In my experience newer GDBs don't crash with that kind of thing, they just stop (which was sort of my whole point).

It's not really a matter of "may well write something incorrect" as far as the dwarf information itself frankly, also: there's definitely something (likely multiple things) that are incorrect. As I mentioned above, right from the beginning FPC reports a nonsensical calling convention that has never existed at all (and could never exist) on anything other than 32-bit Windows specifically, so it's not exactly a stretch to imagine there's other problems.

Additionally, out of curiosity over time I've examined FPC executables built with dwarf debug info with various software (LLVM-DwarfDump, IDA Pro, e.t.c) and 100% of them report that the debug information is invalid in some way and in many cases that they cannot load it at all.

Lastly, with regards to the Make versioning thing you mentioned before: if there ever was a compatibility issue with FPC makefiles, it's been fixed for 5+ years at this point.
« Last Edit: November 04, 2018, 02:09:37 am by Akira1364 »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4949
    • wiki
Re: Lazarus Release Canditate 2 for 2.0
« Reply #24 on: November 04, 2018, 01:54:25 am »
In my expeience newer GDBs don't crash with that kind of thing, they just stop (which was sort of my whole point).
Code: Pascal  [Select]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. var
  3.   S: String;
  4.   X: PAnsiString;
  5. begin
  6. S := 'abcde';
  7. X :=@s;
  8. // breakpoint
  9. end;
  10.  

Once X is assigned, evaluate it (hover with the mouse).

On my system gdb will just exit => crash
« Last Edit: November 04, 2018, 01:56:30 am by Martin_fr »

Akira1364

  • Sr. Member
  • ****
  • Posts: 382
Re: Lazarus Release Canditate 2 for 2.0
« Reply #25 on: November 04, 2018, 02:07:23 am »
That just immediately shows the debugger checkmark icon (as it does with no debug info at all) for me if I build it with Dwarf3. With Dwarf2 it works properly and displays the string value.

BBasile

  • Sr. Member
  • ****
  • Posts: 435
Re: Lazarus Release Canditate 2 for 2.0
« Reply #26 on: November 04, 2018, 10:39:24 am »
Are you already aware of this bug ?

- Have Sparta designer setup.
- click to go to designer
- click to go back to code editor

At this point the caret is no visible anymore and you have to minimize maximize so that a show event get generated which has for effect to restore the caret.
« Last Edit: November 04, 2018, 10:49:36 am by BBasile »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4949
    • wiki
Re: Lazarus Release Canditate 2 for 2.0
« Reply #27 on: November 04, 2018, 10:45:22 am »
That just immediately shows the debugger checkmark icon (as it does with no debug info at all) for me if I build it with Dwarf3. With Dwarf2 it works properly and displays the string value.
"debugger checkmark icon" You mean "breakpoint with green checkmark"?

You mean it does not stop at the breakpoint? Then add some statement, where it can stop.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4949
    • wiki
Re: Lazarus Release Canditate 2 for 2.0
« Reply #28 on: November 04, 2018, 10:47:11 am »
Are you already aware of this bug ?

- Have Sparta designer setup.
- clock to go to designer
- click to get back to code editor

At this point the caret is no visible anymore and you have to minimize maximize so that a show event get generated which has for effect to restore the caret.
Don't know, is it in the bug tracker?
btw, it would be the WM_Focus, not the "Show" event. Or maybe also Form.Activate.

Thaddy

  • Hero Member
  • *****
  • Posts: 7183
Re: Lazarus Release Canditate 2 for 2.0
« Reply #29 on: November 04, 2018, 10:50:56 am »
Once X is assigned, evaluate it (hover with the mouse).
On my system gdb will just exit => crash
No crash here. GDB is 7.12 fpc = 3.3.1, Lazarus is 2.1.0 59416 OS Raspbian platform armhf
« Last Edit: November 04, 2018, 10:56:12 am by Thaddy »
inline variables like in D10.3 are a bit like Brexit: if you are given the wrong information it sounds like a good idea. Every kid loves candy, but it makes you fat and your teeth will disappear.