Lazarus

Announcements => Lazarus => Topic started by: Martin_fr on December 24, 2018, 11:32:30 am

Title: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on December 24, 2018, 11:32:30 am
The Lazarus team is glad to announce the third release candidate of Lazarus 2.0.

Here is the list of fixes for Lazarus 2.0.x:
http://wiki.freepascal.org/Lazarus_2.0_fixes_branch

Here is the list of changes for Lazarus and Free Pascal:
http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes
http://wiki.lazarus.freepascal.org/User_Changes_3.0.4

The release is available for download on SourceForge:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU, OS, distro and then the "Lazarus 2.0RC3" directory.

Checksums for the SourceForge files:
http://www.lazarus-ide.org/index.php?page=checksums#2_0_0RC3

Minimum requirements:

Windows:
  2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit.

FreeBSD/Linux:
  gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.

Mac OS X:
  10.5 to 10.12; Carbon (32bit), Cocoa (64bit, beta), qt and qt5 (32 or 64bit).

The svn tag is
http://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_0_RC3

For people who are blocked by SF, the Lazarus releases from SourceForge
are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/
and later at (after some time for synchronization)
http://mirrors.iwi.me/lazarus/

Why should everybody (including you) test the release candidate?

In the past weeks the Lazarus team has stabilized the 2.0 fixes branch. The resulting 2.0RC3 is now stable enough to be used by any one for test purposes.

However many of the fixes and new features that where committed since the release of 1.8 required changes to the code of existing features too. While we have tested those ourself, there may still be problems that only occur with very specific configurations or one project in a million.

Yes, it may be that you are the only person with a project, that will not work in the new IDE. So if you do not test, we can not fix it.

Please do not wait for the final release, in order to test. It may be too late. Once the release is out we will have to be more selective about which fixes can be merged for further 2.0.x releases. So it may be, that we can not merge the fix you require. And then you will miss out on all the new features.

How to test

Download and install the 2.0 RC3.
In either case you should make backups. (including your primary config)

Open your project in the current Lazarus (1.8.x), and use "Publish Project" from the project menu. This creates a clean copy of your
project.

You can then open that copy in the RC3. Please test:


Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: jc99 on December 24, 2018, 01:40:40 pm
Great !
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 24, 2018, 03:57:43 pm
Excellent! Thanks to the Lazarus team for all the work on this.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: jwdietrich on December 24, 2018, 05:43:56 pm
A first test on macOS Mojave delivered excellent results. Thanks for your efforts!
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: josh on December 24, 2018, 10:06:31 pm
Hi

Carbon I386, border is not shown in STRINGRID.

Place a stringgrid on a form, set its border style to bsSingle, in code set bordercolor and borderwidth to valid values and the border is not drawn.
On windows just setting borderstyle to bsSingle generates a border around grid.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 25, 2018, 05:42:44 am
Is svn my best bet for running RC3 64 bit cocoa? I have successfully been running trunk 64 bit cocoa.

lazarus-2.0.0RC3-i686-macosx.dmg installs 32 bit carbon, and I'm having no luck trying to cross compile. I'm happy to subbmit bug reports to improve cocoa, but carbon is not really an option for me anymore.

Is it possible to create a 64 bit cocoa install package?

Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 25, 2018, 05:50:38 am
A first test on macOS Mojave delivered excellent results. Thanks for your efforts!

Are you compiling for 64 bit cocoa? If, so I'd appreciate any tips.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on December 25, 2018, 10:45:20 am
VTwin, is your question about Mojave specifically ?  I use Sierra and this works like a dream. I use fixes_2_0 which I am reliably informed is always at least as up to date as the RCs. I (conservatively) build a 32bit version of Lazarus and LCL and then, set it to produce 64bit cocoa apps. This assumes there is a functional fpc, 3.0.4 installed.

Code: Pascal  [Select]
  1. svn checkout https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0
  2. cd fixes_2_0
  3. make CPU_TARGET=i386        -- or ---
  4. make LCL_PLATFORM=cocoa CPU_TARGET=x86_64
  5. open startlazarus.app --args "--pcp=~/.fixes_2_0"

I am not sure if the 64bit IDE build defaults to building 64bit apps or not, I always build using modes that specify widgetset AND cpu_target. Even if you don't use build modes, make sure you set BOTH cpu_target AND widgetset in Project Options, Compiler and Target.

Davo
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: salvadordf on December 25, 2018, 10:51:09 am
I installed RC3 in Linux Mint 19.1 and the "double key pressed" bug is gone! 

Great job!  :D
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Wallaby on December 25, 2018, 01:52:44 pm
Is it possible to create a 64 bit cocoa install package?

Why not just take fpcupdeluxe and build Cocoa x64 from fixes2.0?

I got a relatively stable IDE by choosing FPC fixes3.2 and Lazarus fixes2.0.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 25, 2018, 06:59:18 pm
Thanks dbannon & Wallaby. I will keep a 2.0 fixes branch, with fpc 3.0.4 for now. I'd like to stay synchronized with the stable installations on windows and linux as much as possible. Mohave is not presently an issue, except for my users on Mohave. I am still on El Capitan, and in no hurry to upgrade.

On macOS I had the stable 1.8.4 release, a trunk branch, and a 2.0 fixes branch. Using svn update on the 2.0 fixes branch updates me to 59910, which should follow dbannon's recommendation. The two branches are (were) both 64 bit cocoa.

Unfortunately, I am now getting warnings about fpc missing a config file, and not finding the x86_64 binaries. This was not a problem prior to installing RC3, and I have not made changes (that I am aware of) to fpc. 

fpc, run from the command line, is 3.0.4 [2017/11/26] for x86_64.

Any thoughts on how to address the new fpc issue?



Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Researching on December 25, 2018, 09:44:01 pm
How do you do!
Is there still a possibility of feature request?
1. File / project templates with external folder - to use it with different Lazarus versions at the same time.
2. Easier help navigation / m.b. make access to existing settings?
3. Export/import project/IDE settings (Create default user settings)
4. Set User Libraries folder
5. FunctionsSearcher - a tool to try finding an implementation of needed functions by *nameWildcard* inside a folder - full of soursecode.
6. horizontal view split in editor.

// And any advise appreciated: Where to get introduced with IDE internals, to change/compile the IDE source for Android/winMobile -- single window (MDI?) interface needed? (Yes, I want to have a minimal version with visual editor in my pocket.)
With respect,
Researching.

Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on December 25, 2018, 11:07:36 pm
...
Unfortunately, I am now getting warnings about fpc missing a config file, and not finding the x86_64 binaries. This was not a problem prior to installing RC3, and I have not made changes (that I am aware of) to fpc. 

fpc, run from the command line, is 3.0.4 [2017/11/26] for x86_64.

Any thoughts on how to address the new fpc issue?
As I routinely compile a 'kit' pulled down from my github repo, I end up with the compiler set to fpc and usually (?) have to manually set it to ppcx64 if I am using the Lazarus IDE - from memory (my Mac is out of reach) its /usr/bin/ppcx64 but, obviously, thats depends on where yours is installed. I don't know why fpc (which just redirects to an appropriate compiler) does not work but I have just. sort of, got used to doing that.  My 'official' builds are done using a script from the command line and it does call ppcx64 directly.

Davo
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 01:00:40 am
Thanks Davo,

I also have generally had to change the compiler settings when doing an install, but from ppc386 to fpc, which is the 64 bit compiler. So I am still puzzled.

The selected compiler (/usr/local/bin/fpu)  is 64 bit, and the two lazarus branches are built as x86_64-darwin. Both branches were working previously, but apparently I lost the fpu config file, and am not sure why, or how to fix it. 

I'll dig around for answers, but appreciate any suggestions.

Cheers,
VTwin   
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on December 26, 2018, 01:34:17 am
Just in general / not sure if it applies to your issues

fpc  is a wrapper that will call the correct compiler depending on the target (cpu)

ppcx64 is for 64 bit
ppci386 is for 32 bit

If you want to be able to change targets in the ide, then the IDE must be configured with fpc as the compiler.

---
If you are looking for a config file, compile a simple program with -va

This will get lots of output ("copy all and original" in messages window). It will show every path that the compiler looked for any file.
Not all of them need to be present. But one fpc.cfg should be found.
There is fpcmcfg to generate one. But you need to google that.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: MikeFinch on December 26, 2018, 02:01:28 am
Folks! The method 'columns' is still not working in ListBox (together with no horizontal scrollbar) under linux. I use Mageia.

It all works perfectly in Windows.

I will keep waiting .....  %)
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 02:20:08 am
Just in general / not sure if it applies to your issues

fpc  is a wrapper that will call the correct compiler depending on the target (cpu)

ppcx64 is for 64 bit
ppci386 is for 32 bit

If you want to be able to change targets in the ide, then the IDE must be configured with fpc as the compiler.

---
If you are looking for a config file, compile a simple program with -va

This will get lots of output ("copy all and original" in messages window). It will show every path that the compiler looked for any file.
Not all of them need to be present. But one fpc.cfg should be found.
There is fpcmcfg to generate one. But you need to google that.

Thanks Martin,

Thanks for that info, currently fpu seems to be correctly pointing to 64.

If I set verbosity to -va, the search paths scroll by in the message window, but do not stay. I can not see a "copy all and original" option in messages window. Sorry, can you point me to it?

EDIT: If it requires selecting from a contextual menu, then I can't see it. Contextual menus are not working in the cocoa ide.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on December 26, 2018, 02:57:39 am
Yes it is the context menu.

Just start fpc outside the IDE (make sure it is the same as in the ide)
Code: Pascal  [Select]
  1. fpc -va  program.pas > log.txt
And add whatever cpu/target options you need.

Should be looking for the same files.

Why do you refer to "fpu"? typo?
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 03:01:51 am
Many thanks. Yes, that was a typo.  :-[

I can try what you suggest.

In the mean time I ran lazarus 1.8.4 with -va, and can copy messages, getting:

Code: Pascal  [Select]
  1. ...
  2. [0.000] Configfile search: /Users/frederick/.fpc.cfg
  3. [0.000] Configfile search: /usr/local/etc/fpc.cfg
  4. [0.000] Configfile search: /etc/fpc.cfg
  5. [0.000] (11026) Reading options from file /etc/fpc.cfg
  6. [0.000] Hint: (11030) Start of reading config file /etc/fpc.cfg
  7. [0.000] (11033) interpreting file option "#"
  8. [0.000] (11033) interpreting file option "# Config file generated by fpcmkcfg on 25-12-18 - 08:21:57"
  9. ...
  10.  

"/etc/fpc.cfg" is found, so why does 2.0.3 not find it?

Would it make sense to move a copy to " /Users/frederick/.fpc.cfg"?
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 03:06:45 am
Would it make sense to move a copy to " /Users/frederick/.fpc.cfg"?

Apparently not. That does not help. :(
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on December 26, 2018, 03:15:18 am
Maybe it is something in the file that makes it disregard it.

-va might tell...
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 03:21:16 am
With "/Users/frederick/.fpc.cfg" copied from ""/etc/fpc.cfg":

Code: Pascal  [Select]
  1. fpc -va Hello.pas > log.txt

generates:

Code: Pascal  [Select]
  1. ...
  2. [0.000] Configfile search: /Users/frederick/.fpc.cfg
  3. [0.000] Reading options from file /Users/frederick/.fpc.cfg
  4. [0.000] Hint: Start of reading config file /Users/frederick/.fpc.cfg
  5. [0.000] interpreting file option "#"
  6. [0.000] interpreting file option "# Config file generated by fpcmkcfg on 25-12-18 - 08:21:57"
  7. ...

so command line seems to find it.

Without the copying I get:

Code: Pascal  [Select]
  1. ...
  2. [0.000] Configfile search: /Users/frederick/.fpc.cfg
  3. [0.000] Configfile search: /usr/local/etc/fpc.cfg
  4. [0.000] Configfile search: /etc/fpc.cfg
  5. [0.000] Reading options from file /etc/fpc.cfg
  6. [0.000] Hint: Start of reading config file /etc/fpc.cfg
  7. [0.000] interpreting file option "#"
  8. ...

In each case the interpreting section ends with:

Code: Pascal  [Select]
  1. ...
  2. [0.000] Hint: End of reading config file /etc/fpc.cfg
  3. ...

so it seems to process it.

EDIT: I also see:

Code: Pascal  [Select]
  1. ...
  2. [0.008] Compiler: /usr/local/bin/ppcx64
  3. [0.008] Compiler OS: Darwin for x86_64
  4. [0.008] Target OS: Darwin for x86_64
  5. [0.008] Using executable path: /usr/local/bin/
  6. [0.008] Using unit path: /usr/local/lib/fpc/3.0.4/units/x86_64-darwin/httpd22/
  7. [0.008] Using unit path: /usr/local/lib/fpc/3.0.4/units/x86_64-darwin/rtl/
  8. [0.008] Using unit path: /usr/local/lib/fpc/3.0.4/units/x86_64-darwin/zlib/
  9. [0.008] Using unit path: /usr/local/lib/fpc/3.0.4/units/x86_64-darwin/xforms/
  10. [0.008] Using unit path: /usr/local/lib/fpc/3.0.4/units/x86_64-darwin/x11/
  11. ...

so it is using the correct compiler, and finding the x86_64 units. The IDE complains that these can not be found.

Perhaps I just need to delete all and try a reinstall...
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 07:07:36 am
Removed lazarus directory (Development/laz_2_0) and configuration directory (Users/frederick/.laz_2_0). Ran:

Code: Pascal  [Select]
  1. cd /Developer
  2. svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ laz_2_0
  3. cd laz_2_0
  4. make LCL_PLATFORM=cocoa CPU_TARGET=x86_64
  5. open startlazarus.app --args "--pcp=~/.laz_2_0"

Still get:

Warning The current FPC has no config file. It will probably miss some units. Check your installation of fpc.

Error The project uses target OS=macos and CPU=x86_64. The system.ppu for this target was not found in the FPC binary directories.
Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.

 :(
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 07:20:02 am
fpcupdeluxe FPC 3.0.4 + fixes2.0 (EDIT)

ERROR: Fpcupdeluxe fatal error !
 
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on December 26, 2018, 07:51:50 am

Warning The current FPC has no config file. It will probably miss some units. Check your installation of fpc.

Error The project uses target OS=macos and CPU=x86_64. The system.ppu for this target was not found in the FPC binary directories.
Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.

OK, thats not a Lazarus issue, its a FPC one.

Sounds to me like you do not have the 64bit compiler installed (or installed properly).  It should be (I guess) either /usr/local/bin/ppcx64  or /usr/bin/ppcx64.   My install has it as a symlink, linked from /usr/local/lib/fpc/3.0.4/ppcx64

My /etc/fpc.cfg mentions both 32bit and 64bit config data.

I installed fpc as a dmg from the fp repos, that install installed both 32bit and 64bit.  Please review your fpc install.

Davo

 
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on December 26, 2018, 11:14:30 am
fpcupdeluxe FPC 2.0.4 + fixes2.0

ERROR: Fpcupdeluxe fatal error !

For fixes2.0 you should use FPC 3.0.4 and up. Was 2.0.4 a typo?
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on December 26, 2018, 12:40:57 pm
Removed lazarus directory (Development/laz_2_0) and configuration directory (Users/frederick/.laz_2_0). Ran:

Code: Pascal  [Select]
  1. cd /Developer
  2. svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ laz_2_0
  3. cd laz_2_0
  4. make LCL_PLATFORM=cocoa CPU_TARGET=x86_64
  5. open startlazarus.app --args "--pcp=~/.laz_2_0"

Still get:

Warning The current FPC has no config file. It will probably miss some units. Check your installation of fpc.

Error The project uses target OS=macos and CPU=x86_64. The system.ppu for this target was not found in the FPC binary directories.
Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.

 :(
Ok, so that happens when you start the IDE?
Not when you try to compile?

Then that actually is an Issue of the IDE. Your fpc should be fine.

1) Try Tools > Rescan fpc source

2) What does it say in menu: View > IDE Internals > About FPC ?
(both tabs)
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 26, 2018, 04:38:23 pm
Thanks all. fpc and sources were installed, and reinstalled to double check, from stable 3.0.4 distro (2.0.4 was typo). No change to fpc from lazarus 1.8.4.

/usr/local/bin/ppcx64

is a link to:

/usr/local/lib/fpc/3.0.4/ppcx64

/usr/local/bin/fpc

is an binary that displays:

"Free Pascal Compiler version 3.0.4 [2017/11/26] for x86_64"

as expected when executed from the command line. Although this is a binary, not a link, it gives the same as executing ppcx64.

Running a "Hello World" program from the command line with -va locates fpc.cfg, searching several possibilities. The reinstall of fpc created a new fpc.cfg, so I doubt that has become corrupted.

The error messages occur when starting lazarus, either trunk or 2.0 fixes.

1) Trying to rescan the fpc sources gives me the same two error messages.

2) FPC values used by the IDE:

Code: Pascal  [Select]
  1. Lazarus version: 2.0.0RC3
  2. Lazarus svn revision: 59910
  3. Lazarus build date: 2018/12/25
  4. Lazarus was compiled for x86_64-darwin
  5. Lazarus was compiled with fpc 3.0.4
  6.  
  7. Environment variables:
  8. PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin
  9. PP=
  10. FPCDIR=
  11. USESVN2REVISIONINC=
  12. USER=frederick
  13. HOME=/Users/frederick
  14. PWD=/Developer/laz_2_0
  15. LANG=en_US.UTF-8
  16. LANGUAGE=
  17.  
  18. Global IDE options:
  19. LazarusDirectory=/Developer/laz_2_0/
  20. Resolved LazarusDirectory=/Developer/laz_2_0/
  21. Project's CompilerFilename=$(CompPath)
  22. Resolved Project's CompilerFilename=/usr/local/bin/fpc
  23. Default CompilerFilename=fpc
  24. Resolved default compilerFilename=/usr/local/bin/fpc
  25. CompilerMessagesFilename=
  26. Resolved CompilerMessagesFilename=/usr/local/share/fpcsrc/compiler/msg/errore.msg
  27.  
  28. Project:
  29. lpi=/Volumes/PA01/FreePascal/Orient/Orient_3.9.0/Orient_3.9.0.14/Orient.lpi
  30. Directory=/Volumes/PA01/FreePascal/Orient/Orient_3.9.0/Orient_3.9.0.14/
  31. TargetOS=macos
  32. TargetCPU=x86_64
  33. CompilerFilename=$(CompPath)
  34. CompilerOptions=
  35.  
  36. Active target:
  37. TargetOS=macos
  38. TargetCPU=x86_64
  39.  
  40. FPC executable:
  41. Compiler=/usr/local/bin/fpc
  42. Options=
  43. CompilerDate=11/26/2017 02:39:02 PM
  44. RealCompiler=/usr/local/bin/ppcx64
  45. RealCompilerDate=11/26/2017 02:39:03 PM
  46. RealTargetOS=macos
  47. RealTargetCPU=x86_64
  48. RealCompilerInPath=/usr/local/lib/fpc/3.0.4/ppcx64
  49. Version=
  50. WARNING: fpc has no config file
  51.  
  52. Defines:
  53.  
  54. Undefines:
  55. BSD=
  56. DARWIN=
  57. FPC_HAS_WINLIKERESOURCES=
  58. HASUNIX=
  59. UNIX=
  60.  
  61. Include Paths:
  62. Unit Scopes:
  63. Unit Paths:
  64. Units:
  65.  
  66. Sources:
  67. Directory=/usr/local/share/fpcsrc
  68. Files.Count=13525
  69. packages/libndsfpc/src/nds/system.inc
  70. packages/libogcfpc/src/ogc/system.inc
  71. rtl/aix/system.pp
  72. rtl/amicommon/classes.pp
  73. rtl/amicommon/sysutils.pp
  74. rtl/amiga/system.pp
  75. rtl/aros/system.pp
  76. rtl/atari/system.pp
  77. rtl/beos/classes.pp
  78. rtl/beos/system.pp
  79. rtl/bsd/system.pp
  80. rtl/embedded/system.pp
  81. rtl/embedded/sysutils.pp
  82. rtl/emx/system.pas
  83. rtl/emx/sysutils.pp
  84. rtl/gba/classes.pp
  85. rtl/gba/system.pp
  86. rtl/gba/sysutils.pp
  87. rtl/go32v2/classes.pp
  88. rtl/go32v2/system.pp
  89. rtl/go32v2/sysutils.pp
  90. rtl/haiku/classes.pp
  91. rtl/haiku/system.pp
  92. rtl/inc/system.inc
  93. rtl/java/system.pp
  94. rtl/linux/system.pp
  95. rtl/macos/system.pp
  96. rtl/macos/sysutils.pp
  97. rtl/morphos/system.pp
  98. rtl/msdos/classes.pp
  99. rtl/msdos/system.pp
  100. rtl/msdos/sysutils.pp
  101. rtl/nativent/classes.pp
  102. rtl/nativent/system.pp
  103. rtl/nativent/sysutils.pp
  104. rtl/nds/classes.pp
  105. rtl/nds/system.pp
  106. rtl/nds/sysutils.pp
  107. rtl/netware/classes.pp
  108. rtl/netware/system.pp
  109. rtl/netware/sysutils.pp
  110. rtl/netwlibc/classes.pp
  111. rtl/netwlibc/system.pp
  112. rtl/netwlibc/sysutils.pp
  113. rtl/objpas/classes/classes.inc
  114. rtl/objpas/sysutils/sysutils.inc
  115. rtl/os2/classes.pp
  116. rtl/os2/system.pas
  117. rtl/os2/sysutils.pp
  118. rtl/palmos/system.pp
  119. rtl/qnx/system.pp
  120. rtl/solaris/system.pp
  121. rtl/symbian/system.pp
  122. rtl/unix/classes.pp
  123. rtl/unix/sysutils.pp
  124. rtl/watcom/classes.pp
  125. rtl/watcom/system.pp
  126. rtl/watcom/sysutils.pp
  127. rtl/wii/classes.pp
  128. rtl/wii/system.pp
  129. rtl/wii/sysutils.pp
  130. rtl/win/sysutils.pp
  131. rtl/win32/classes.pp
  132. rtl/win32/system.pp
  133. rtl/win64/classes.pp
  134. rtl/win64/system.pp
  135. rtl/wince/classes.pp
  136. rtl/wince/system.pp
  137. rtl/wince/sysutils.pp
  138.  

FCP output:

Code: Pascal  [Select]
  1. The IDE asks the compiler with the following command for the real OS/CPU:
  2. /usr/local/bin/fpc -iTOTP -Fr/Developer/laz_2_0/components/codetools/fpc.errore.msg
  3. Working directory: /
  4. Output:
  5. darwin x86_64
  6.  
  7. The IDE asks the compiler with the following command for paths and macros:
  8. /usr/local/bin/fpc -va -Px86_64 -Tmacos -Fr/Developer/laz_2_0/components/codetools/fpc.errore.msg compilertest.pas
  9. Working directory: /Users/frederick/.laz_2_0/
  10. Output:
  11. [0.000] Handling option "-Tmacos"
  12. [0.000] interpreting firstpass option "-Tmacos"
  13. [0.000] Macro undefined: DARWIN
  14. [0.000] Macro undefined: UNIX
  15. [0.000] Macro undefined: BSD
  16. [0.000] Macro undefined: HASUNIX
  17. [0.000] Macro undefined: FPC_HAS_WINLIKERESOURCES
  18. [0.000] Error: Illegal parameter: -Tmacos
  19. [0.000] Hint: -? writes help pages
  20. Error: /usr/local/bin/ppcx64 returned an error exitcode
  21.  
  22. NOTE: The compilertest.pas is empty, so compilation fails. This is what we want.
  23.  




Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dsyrios on December 26, 2018, 06:56:22 pm
Thank you for the great work !!!
I made a clear instalation and using OPM (installing zeos, rx, eccontrols etc),
everything done OK.
I tested my recent project without any problem.

As far as I'm concerned for now, only one minor issue for IDE.
I think the new one "Publish Project" lags behind the previous with v1.8.2 that I was using.
 (I attach images)
 
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: bigDan on December 26, 2018, 08:36:01 pm
Compiling Darwin project with 2.0.0RCL3, 64bit/QT5. At link time I get:

Error: linker: Undefined symbols for architecture x86_64:
Error: linker "_QTextEdit_setPlaceholderText", referenced from:

This project was compiling OK on 2.0.0RCL2.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on December 26, 2018, 09:22:06 pm
From the FPC output:
Code: [Select]
Error: Illegal parameter: -Tmacos
No idea why.

Your "/usr/local/bin/fpc", is it a (sym-)link?
If so does it point to an fpc? or a ppc* ?

The latter would probably cause issues.


Also you may want to try to change your target to Darwin or Cocoa...

Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: PascalDragon on December 27, 2018, 12:07:54 am
From the FPC output:
Code: [Select]
Error: Illegal parameter: -Tmacos

Target MacOS is for MacOS Classic (pre Mac OS X). For Mac OS X the target OS needs to be set to Darwin.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on December 27, 2018, 12:18:09 am
Quote
Target MacOS is for MacOS Classic (pre Mac OS X). For Mac OS X the target OS needs to be set to Darwin.

or just left as 'default' - thats all mine is.

And $DARWIN is defined.

Davo
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: bigDan on December 27, 2018, 03:52:39 am
Disregard my comment on linker error missing "_QTextEdit_setPlaceholderText".

I rebuilt QT5, and doing so corrected this error.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: VTwin on December 27, 2018, 04:14:45 am
Also you may want to try to change your target to Darwin or Cocoa...

Target MacOS is for MacOS Classic (pre Mac OS X). For Mac OS X the target OS needs to be set to Darwin.

or just left as 'default' - thats all mine is.

And $DARWIN is defined.

Davo

OMG :o That was it! I can't believe I did that.  :-[  At some point I tried fixing an error by switching from "Default" to "MacOS". Bad idea, and I forgot I did it. That does explain the errors, DARWIN undefined, and so on.

Thanks all, my apologies for the excessive posts. It was driving me crazy!!

A big thanks to the FPC & Lazarus teams, and to the fine community of coders here willing to help out (even for dumb mistakes  :-[).

Cheers,
VTwin

 
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 29, 2018, 01:58:14 am
Hello Lazarus Team,

Many many thanks for all the work to make Lazarus so awesome.

I have a project which uses the VirtualStringTree(VST) 4.8.7.4, for easy and fast install I use the Online-Package-Manager(OPM).
But since rev2.0RC1-RC3 I get an error. Installing process in the OPM seems to work but when the IDE is recompile then occurs an error:
Multiple Units found: In attachments is a pic with this error(german message)

When I load my project I get an error of missing VST component.
In the OPM it is marked as installed.
In the "Installed Packages...." on the left side(install) is an entry for VST with a green cross and in the info section you can read "not installed"

I have then removed the VST from "Installed Packages...." and OPM, re-installed and sometimes 2 or 3 repeats and then I could re-compile the Lazarus IDE and my project can be loaded.

In my current working Lazarus installation is under "Installed Packages...." no entry for the VST.

And sometimes I can not compile my project. I get an error of duplicate VST versions.
In the Project Inspector I found two VST entries, one of them has a number "4". I delete then the other VST entry and all works. But randomly occurs this error again and again.

I have install Lazarus 1.8.4(for Windows 32bit on a Win7-64bit PC) as first installation and 2.0RC3 as a second. I thought maybe is this a problem, so I installed all fresh on a clean Windows(VM), but the error is also present.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: GetMem on December 29, 2018, 07:54:16 am
Hi hubblec4,

Quote
I have a project which uses the VirtualStringTree(VST) 4.8.7.4, for easy and fast install I use the Online-Package-Manager(OPM).
But since rev2.0RC1-RC3 I get an error. Installing process in the OPM seems to work but when the IDE is recompile then occurs an error:
Multiple Units found: In attachments is a pic with this error(german message)
With Lazarus 2.0(RC1, RC2, ...),  OPM uses VTV 5.3.3.1 internally, this is why VTV 5.3.3.1 is installed by default. By trying to install an older version of VTV, 4.8.7.4 for example, you will get the multiple ppu message, like the one in your screenshot. You have two choices:
1. Stay with VTV 4.8.7.4 and uninstall OPM and VTV 5.3.3.1, delete the folders from the component directory to prevent the multiple ppu messages
2. Switch to VTV 5.3.3.1, your project should work out of the box, without any issues

PS: I will remove 4.8.7.4 from the central repository to prevent further confusions
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 29, 2018, 02:02:03 pm
Hi GetMem

Thanks for your explanation , now I know where the error comes.

Option 1: yes I could uninstall OPM and VTV5.xxx but thats not a good solution

Option 2: Is very hard for me, because in my project I have more than 50 VTVs and more will be generated at runtime this would make a huge work.
I had try it for a long time to change the VTV in my project and the result was it don't worked. Some procedures of the VTV seams are handled different, because my written code don't work. When I changed back to VTV4xx it works.

Please don't remove 4.8.7.4 from repository.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 29, 2018, 04:09:43 pm
I have try to change VTV to version 5.xxxx and my project can be loaded and compiled, but at runtime my program crashes when I use the VTV with code to create for example.
Or when I move nodes with VTV 4.xxxx works, but for version 5.xxxx I have to change a lot of source code.

Create example: I had read that it is a good idea to set the parent for the VTV at least.
Before I set the Font and the Size and many more and an error occurs at the Font and/or Size code-line: error message > there is no parent defined.

I can change my source and set the parent at first and it works. -> many work

Moving Nodes: in VTV 5.xxxx it breaks the move-logic. -> much more work.

And many other code differences between v4 and v5 of VTV.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on December 29, 2018, 04:37:14 pm
1. Stay with VTV 4.8.7.4 and uninstall OPM and VTV 5.3.3.1...
Just to make sure: Does OPM really need features of VTV5? Of course it depends on the explicit requirements, but all my own usages of VTV worked with v4 and with v5.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: GetMem on December 29, 2018, 05:08:57 pm
@wp
Quote
Just to make sure: Does OPM really need features of VTV5?
Yes. Many new features does not exists in VTV4:
1. Cocoa, qt5 support
2. Support for arm processors like raspberry pi
3. High dpi image implemented by you
Plus it was recommended by @luiz in the first place.

Quote
all my own usages of VTV worked with v4 and with v5
Mine too, in fact I could switch from 4.x to 5.x without any issues in a few projects of mine. However OPM is a special case, because it has to run in multiple platforms.
I'm sure you remember that initially VTV(4.x) was added as part of OPM, I even changed the resources to make sure it does not interfere with other VTV instances. But then people started to complain about duplicate code. There is no way to satisfy all the requirement.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 30, 2018, 01:18:04 am
In the attachment is as a small test program. On create it insert 10 nodes to the VTV
You can move nodes via drag&drop and only the drop mode OnNode is supported.

When I use the VTV4 package you can move a node on a Node and the moving works.
Change in the project inspector the VTV packages (delete VTV4 and add normal VTV5).

When you move a node the VTV delete nodes.

EDIT:
This is only one of the issues which I have found while I work with VTV. VTV4 is more stable for my project.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on December 30, 2018, 11:01:34 am
Would it be an option to rename all classes, units and the package of VTV4 by appending a "4" (or similar), and to adapt these identifiers in the pas and lfm files of your project? Automatic search and replace can be done by any editor and should be easy. This way VTV4 becomes completely independent of VTV5.

Unfortunately I cannot test because VTV4 is no longer available through OPM.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on December 30, 2018, 12:04:28 pm
Some thoughts:

Distribution of VTV for Lazarus has always been complicated. There is Liuz' github and there is the copy in Lazarus/components. We recently had a discussion that they are not necessarily in sync. And there is the version of the OPM repository. From which source is it derived? When I make a change to the Lazarus clone and Luiz merges it (or not), is OPM updated as well?

Does VTV5 have to be distributed by OPM at all now that it is part of Lazarus? OK - I know that OPM is independent of Lazarus, and users of Laz 1.6 (which did not yet contain VTV) may wish to install VTV via OPM. Can't there be an {$IF LCL_FullVersion < 10800000} (I don't know the exact version) which prevents adding VTV5 to the OPM package list?

Or should OPM contain only VTV4 with all critical identifiers renamed to give users of the old version a chance to install it in addition to the one used by OPM?
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 30, 2018, 01:44:21 pm
Would it be an option to rename all classes, units and the package of VTV4 by appending a "4" (or similar), and to adapt these identifiers in the pas and lfm files of your project? Automatic search and replace can be done by any editor and should be easy. This way VTV4 becomes completely independent of VTV5.

Unfortunately I cannot test because VTV4 is no longer available through OPM.

Here is a link to VTVhttps://forum.videohelp.com/attachments/47677-1546173751/virtualtreeview-4.8.7-R4.7z (https://forum.videohelp.com/attachments/47677-1546173751/virtualtreeview-4.8.7-R4.7z)

I don't know if this works to rename the package and the classes.
For the moment it works and I remove from time to time the VTV5 package from my project.
I had also tested to use the VTV4 only in my project with an installed VTV5 in Lazarus, and it works.

VTV5 is so buggy.....
Can you confirm the issue with the small test-project?

Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 30, 2018, 01:59:37 pm
Or should OPM contain only VTV4 with all critical identifiers renamed to give users of the old version a chance to install it in addition to the one used by OPM?

This should be a MUST. I need this "old" VTV4 otherwise a have to rewrite a 100.000 line code project(again).
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 30, 2018, 02:16:24 pm
And here another issue with VTV5.

I changed VTV4 to VTV5 in the project inspector and compile my project.

It crashes before the the program window is visible on screen.
After a while I found the reason.
I have a unit with an initialization part.
With VTV4 is this unit loaded and the initialization part will be engaged. (a class is created and a var is set to true which is needed to block something later in my code).
With VTV5 is this unit not loaded (or is loaded later maybe)...no var is set to true and it crashes for a setting on a component.

It seams to me there are changes in order to load units or so....sorry I'm not an expert at this. But with VTV4 works like expected.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: GetMem on December 30, 2018, 02:48:20 pm
@hubblec4
You can always download vtv4 from here: https://github.com/blikblum/VirtualTreeView-Lazarus/releases/tag/lazarus-4.8.7-R4
Unfortunately OPM will not work with that version. So you must uninstall VTV5 and OPM first. As I said in one of my previous posts, initially OPM had a "build in" VTV, which in fact it was VTV4.8.7, but then the core developers started to complain about code duplication, code bloat, etc...and they were right. So unfortunately there is no perfect solution.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 30, 2018, 03:12:35 pm
I can understand why it is necessary to have VTV5, but it is not the right way to get working an older VTV when I have to uninstall good new features(OPM).

The best will be to fix VTV5 immediately before rev2.0 is finished.
Any one which will use the VTV5 will have all the issues.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: GetMem on December 30, 2018, 03:31:05 pm
Quote
The best will be to fix VTV5 immediately before rev2.0 is finished.
Any one which will use the VTV5 will have all the issues.
The official repository for VTV is on github. You should file a bug report there: https://github.com/blikblum/VirtualTreeView-Lazarus/issues. The one in the lazarus component folder is just a copy, only needed for OPM. After it's fixed on github, the changes can be merged back to the component folder.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on December 30, 2018, 04:10:41 pm
You should file a bug report there: https://github.com/blikblum/VirtualTreeView-Lazarus/issues.
I absolutely agree with GetMem. It is no use complaining here about the bugs in VTV5, there is almost zero chance that Luiz, the maintainer of the Lazarus port VTV, will read a thread titled "Lazarus Release Candidate 3 for 2.0" and expect a VTV bug report buried among 50 posts.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 30, 2018, 04:54:47 pm
You both are right this is not the right place for VTV bug report.
I know this project on GitHub, I had open a feature request there for a long time... no answer, and I guess it needs a looong time for VTV fixes.

Quote
Why should everybody (including you) test the release candidate?
Every one should test the new RC's because "you can be the one of millions where the projects are broken".

Lazarus works with VTV4 and now we have VTV5 with more features but it is unstable and buggy and breaks my and maybe other projects. I don't understand the logic to replace a working component with a buggy version.

Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: GetMem on December 30, 2018, 05:17:06 pm
@hubblec4
Quote
Why should everybody (including you) test the release candidate?
Quote
Every one should test the new RC's because "you can be the one of millions where the projects are broken".

Lazarus works with VTV4 and now we have VTV5 with more features but it is unstable and buggy and breaks my and maybe other projects. I don't understand the logic to replace a working component with a buggy version.
I understand your frustration, sometimes I feel the same about Lazarus development, but:
1. We did not replace anything. Until now(Lazarus 2.0), VTV wasn't part of the Lazarus project. Just a third party package, a very useful one by the way
2. We added VTV5 because it was recommended by the package maintainer(@luiz)
3. VTV5 is only needed for OPM, Lazarus itself does not depend on the package. You can uninstall both VTV5/OPM and use VTV4 if you like. So no showstopper here
4. Until now I did not notice any major bug in VTV5. Please note I'm not saying your findings are not true, but I don't have time to look after VTV bugs for now, maybe next year
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 30, 2018, 07:14:20 pm
I'm not really frustrated and for me it is OK how it is, and my project works also with Lazarus rev2.0 and installed OPM. I don't want waste my energy for things that I can't change. So I think best way is to fix VTV5.

Is there anyone active develop VTV5?

VTV is the best component for me and I don't want miss them anymore.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on December 31, 2018, 02:06:27 am
Now I took the time to rename the essential classes of VTV4 (i.e. i added a "4") and packed everything into a zip. Unfortunately, the file is too large for the forum, so I uploaded it to my dropbox: https://www.dropbox.com/s/d5hmtmurcdx5eeo/VirtualTreeView4.zip?dl=0.

I adapted to demos coming with VTV to the new naming scheme within 1 hour (for more than 20 forms); I did everything manually because I fear that Search & replace can damage the text.

These are the steps to adapt an existing VTV4 project:
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on December 31, 2018, 02:21:08 am
Not tested, but...

Has anyone checked if OPM would compile against vtv4?

I am not suggesting to change the distribution. But if it compiles, and someone needs vtv4, they can
- download vtv4
- open opm package, drop vtv5 dependency, replace by vtv4, and compile.

And then they should have vtv4 in their Ide.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 31, 2018, 03:12:52 am
Not tested, but...

Has anyone checked if OPM would compile against vtv4?

I am not suggesting to change the distribution. But if it compiles, and someone needs vtv4, they can
- download vtv4
- open opm package, drop vtv5 dependency, replace by vtv4, and compile.

And then they should have vtv4 in their Ide.

Sounds interesting, I will test it.

@wp

Looks like a lot of work. Thanks for try to find a solution.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on December 31, 2018, 07:13:21 am
@wp

Looks like a lot of work.
No. It is a snap. Please see the [EDIT] of my previous post: You only must rename the unit name and the names of the registered components, for a form with a single VTV this is one change in the lfm and two changes in the pas file.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: GetMem on December 31, 2018, 09:21:03 am
@wp
Quote
Now I took the time to rename the essential classes of VTV4 (i.e. i added a "4") and packed everything into a zip. Unfortunately, the file is too large for the forum, so I uploaded it to my dropbox: https://www.dropbox.com/s/d5hmtmurcdx5eeo/VirtualTreeView4.zip?dl=0.
Thanks. I assume that the modified VTV4 can co-exists with VTV5, so you can install both of them at the same time. If yes, then I will add it back to the main repository.


@martin_fr
Quote
Has anyone checked if OPM would compile against vtv4?
Yes. Unfortunately you cannot build OPM with VTV4, at least not without small modification. However it shouldn't take too long to make the necessary adjustments. Some of the procedures parameter has changed, like:
VTV4
Code: Pascal  [Select]
  1. procedure OnHeaderClick(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState;  X,  Y: Integer)
vs VTV5
Code: Pascal  [Select]
  1. procedure OnHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
However the drawback is that with each new version of OPM, the adjustments must be redone. In my opinion the best solution is to fix the bugs(if any) in VTV5.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on December 31, 2018, 10:48:12 am
I assume that the modified VTV4 can co-exists with VTV5, so you can install both of them at the same time.
Yes. Installation of both VTV versions on the same system is no problem (well... I only checked Windows, Linux gtk2 and qt).

However, with the current version, VTV4 and VTV5 cannot be mixed within the same project. This is some kind of disadvantage because otherwise a large project could be converted form by form. To avoid this more auxiliary types should be differentiated, e.g. by introducing a TBaseVirtualTree4 like I had in my first version. But this would make it more difficult to convert an existing VTV4 project to the modified VTV4.

If yes, then I will add it back to the main repository.
Maybe we should wait for some feedback first. I think I'll add it to ccr in order to have some workplace if changes are required in the future. It should be clarified here, however, that this VTV4 fork will not be developed any further, I will only fix compilation issues which can creep in sometimes.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: GetMem on December 31, 2018, 11:52:39 am
Quote
Maybe we should wait for some feedback first.
OK.

Quote
I think I'll add it to ccr in order to have some workplace if changes are required in the future. It should be clarified here, however, that this VTV4 fork will not be developed any further, I will only fix compilation issues which can creep in sometimes.
I agree. There are too many VTV versions already, it can be confusing.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: lucamar on December 31, 2018, 12:41:44 pm
Excuse me for changing the topic :P but I need to know:
Will there be any further 2.0 Release Candidates or is this the last one?
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Thaddy on December 31, 2018, 12:45:29 pm
As always that depends on the test inputs: if there are too many open issues found during testing the RC's will continue, I guess.
That's why it is important to actually use it. Only 'block' issues would qualify.
In general any release candidate is feature complete, so does just need a recompilation with the release.

This isn't off-topic in that sense. A lot of people do not understand where rc's are for: don't ask for features, only for  bug fixes.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: lucamar on December 31, 2018, 12:53:04 pm
Thanks, Thaddy!
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: hubblec4 on December 31, 2018, 01:14:51 pm
@wp and GetMem

Many thanks for investigate your time in VTV to find a solution.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Thaddy on December 31, 2018, 02:02:58 pm
In general this is actually a very good write up: https://en.wikipedia.org/wiki/Software_release_life_cycle
( To my amazement.) Let me quote this:
Quote
Release candidate
A release candidate (RC), also known as "going silver", is a beta version with potential to be a final product, which is ready to release unless significant bugs emerge. In this stage of product stabilization, all product features have been designed, coded and tested through one or more beta cycles with no known showstopper-class bugs. A release is called code complete when the development team agrees that no entirely new source code will be added to this release. There could still be source code changes to fix defects, changes to documentation and data files, and peripheral code for test cases or utilities. Beta testers, if privately selected, will often be credited for using the release candidate as though it were a finished product. Beta testing is conducted in a client's or customer's location and to test the software from a user's perspective.
Which is just about what I wrote independently.  8-)
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 01, 2019, 01:27:26 pm
I have just downloaded 32-bit FPC 3.0 with latest fixes for Windows, and it still has "No memory left bug" which stops you from installing many components because {$setpeflags $20} fix was not back ported yet.
https://forum.lazarus.freepascal.org/index.php/topic,40351.msg279886.html#msg279886

It would really be a bummer to have official Lazarus 2.0 released without this FPC fix.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: af0815 on January 01, 2019, 02:02:55 pm
I didnt see it, because the setpeflags is fixed in fpc fixes 3.2 branch. And my fpcupdeluxe have my patch for older versions.

So i use actually fpc fixes 3.2 & Lazarus fixes 2.0. On Windows, Linux and Raspberry.

I have asked on the fpc mailinglist for Backporting the fix, but no answer. I think it have no priorety/interest for fpc.

Edit: It was Bug 0031517 for the records.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on January 01, 2019, 02:26:30 pm
I have just downloaded 32-bit FPC 3.0 with latest fixes for Windows, and it still has "No memory left bug" which stops you from installing many components because {$setpeflags $20} fix was not back ported yet.
https://forum.lazarus.freepascal.org/index.php/topic,40351.msg279886.html#msg279886

It would really be a bummer to have official Lazarus 2.0 released without this FPC fix.

Lazarus 2.0 is going to be released with FPC 3.0.4.

3.0.4 is already released. Fpc backports can either go to fixes 3.0 (i.e. 3.0.5) or fixes 3.2. Neither of this will affect Lazarus 2.0.

But if it is in fixes 3.2, and assuming 3.2 is the next release for fpc, then as soon as 3.2 will be released Lazarus 2.0.x (or 2.2) will include it.

---------------------------
I do recommend that in addition to the official RC (with 3.0.4) everybody should also test Lazarus fixes 2.0 with FPC fixes 3.2 (beta).

If FPC fixes 3.2 is not tested now, then the possibility remains that it may have regression over 3.0.4. And when 3.2 is released everyone will be stuck with the choice between one set of issues, or the other set of issues.
Once 3.2 is release it will (probably) be a long time to 3.2.2 and a long time with any issue that could have been fixed now...

For windows users I created an installer with fixes 3.2. (See the fpc announcement thread here on the forum). For other OS fpcupdeluxe is an option.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 01, 2019, 02:31:46 pm
setpeflags is fixed in fpc fixes 3.2 branch
Well, official Lazarus is going to come with 3.0.x, so I thought I should lit up a red light on the semaphore. I have little hope anyway, since fix never got back ported to 3.0.x.

And my fpcupdeluxe have my patch for older versions.
FPC 3.0.x fixes branch comes without this fix even in fpcupdeluxe. It needs to be applied manually. I did it by hand and just let fpcupdeluxe rebuild only.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 01, 2019, 02:34:50 pm
3.0.4 is already released. Fpc backports can either go to fixes 3.0 (i.e. 3.0.5) or fixes 3.2. Neither of this will affect Lazarus 2.0.
Thanks for the info. That's a spoiler. Not for me since I know how to fix 'No memory left' bug, but I can already imagine reports from users...
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: af0815 on January 01, 2019, 02:50:49 pm
Fpc fixes 3.2 testing is important for Lazarus 2.0. Actual i see a issues on arm-plattform , maybe after backporting of some code from trunk into fixes in fpc. So i test / work with the next good platform (for me) - fpc fixes 3.2 with Lazarus fixes 2.0
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: BrunoK on January 01, 2019, 05:08:13 pm
1° Has issue 0034763 been fixed in the release candidate ?

2°  Re : NEW FPC VERSION (>3.0.4), has issue
   0033963: Wrong result when a currency variable is multiplied by a constant on windows been fixed ?

Description   
var C: Currency;
begin
  c:= 1000;
  c:= c*1.05;
  // at this point C=1000 instead of 1050
end;
This issue is super dangerous for database software using monetary values, because one could execute a sql batch update and not be concsious it ends with wrong values.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on January 01, 2019, 05:38:26 pm
1) The issue is still open (assigned). So no it has not yet been fixed.

2) There is a thread about 3.2, which is a better place to discuss fpc 3.2 issues. (As they go to the fpc team)
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: mmvisual on January 01, 2019, 05:55:53 pm
Hello,

I have install the new Lazarus rc3. After compile my source, start the EXE, it crashes directly.

I write in the German forum the, but my english is not so good:
http://www.lazarusforum.de/viewtopic.php?p=107046#p107046

Best regards, Markus

PS: I'm the one from the million  :D
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: soerensen3 on January 01, 2019, 09:05:44 pm
I have  an issue in the Lazarus-IDE with DockMgrDsgn for a long time. When docking packages into a couple of tabs they are undocked again after restarting the IDE. This can be pretty annoying (especially in combination with hidden docker headers) when working with a lot of packages. I have seen an issue has been fixed related to anchordockmgr, that did not save tabbed pages.
https://bugs.freepascal.org/view.php?id=34727
I don't know if these two issues are related however the patch did not resolve the issue above.

I have installed the latest git version through fpcdeluxe:
Lazarus version: 2.1.0
Lazarus svn revision: 59960
Lazarus build date: 2019/01/01
Lazarus was compiled for x86_64-linux
Lazarus was compiled with fpc 3.3.1
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: BrunoK on January 03, 2019, 08:24:06 am
1) The issue is still open (assigned). So no it has not yet been fixed.
Actualy MY version of lazarus solves 0034763 without me doing anything.

My current version of lazarus works since 5 months (July 2018 I think) with my own revisions. These revisions only apply to Windows and do not interferer with the other widgets sets.

If someone engage to TEST and scrutinize them , it is not enough to say the are stupid, I would try to recreate the patches matching my current version (the one I use ~4-6 hours a day on ~5 days a week).

I have reread my interventions in https://bugs.freepascal.org/view.php?id=33923 and I stand by what I analyzed and how things should be done.

Actually most of the changes made by the TEAM were reverted, as I said they should, and you have in the current trunk my original emergency patch. That does NOT solve issue 0034763.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: PeterX on January 04, 2019, 04:26:45 pm
I added some components just to play around.

TExtendedTabControl throws exception on runtime:  EClassNotFound

Example project added.


I just installed 2.0 RC3 64bit, and there was no Lazarus installed on this PC before.

And installed the "lazarus-2.0.0RC3-fpc-3.0.4-cross-i386-win32-win64.exe"
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: kft on January 07, 2019, 01:13:02 pm
Hi
If you place a dbgid or dbnavigator on a TPage Control tab, they only show in the selected tab.  If you place a Button or edit control on a tab, they show in all tabs.  This is a current problem for me, do I need to post it in another forum?

Secondly, old problem, if you develop on a machine with a second screen, if the graphical layout form is on the second screen for development, the compiled program will open at the same coordinates, which creates a problem if it is opened on a machine without a second screen.

Lastly some comment on Lazarus.  I developed most of a simple contact manager in a day, which is great.  The sad part is that most of my time was spent searching forums for workarounds to every type of non trivial statement that I used.  This means that the application could have been developed in less than half of that time, which is incredible.
Problems that I encountered included:
Sqlite varchar fields show up as '(memo)' in a dbgrid - half of the lines of code that I wrote were to remedy this!
Can't use '... where field = :VAR' for a sql query.
I think Lazarus has great potential as a RAD tool, but it needs to be consistent, intuitive and reasonably well documented in order to gain greater acceptance.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: lucamar on January 07, 2019, 02:12:10 pm
Secondly, old problem, if you develop on a machine with a second screen, if the graphical layout form is on the second screen for development, the compiled program will open at the same coordinates, which creates a problem if it is opened on a machine without a second screen.

That is as designed (and IMHO quite logical); just change the form Position to (almost) anything other than poDesigned or set the desired postion/size in the form's OnCreate event.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: kft on January 07, 2019, 04:19:55 pm
Thanks for that, I tested and found poDefault to be the best for my purposes.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on January 08, 2019, 12:15:39 pm
I note a problem with pasting images into at TImage on Linux at least. I'm away from home and unable to confirm Windows/mac but think it might be important ....

Superficially, this looks like things discussed on https://forum.lazarus.freepascal.org/index.php/topic,43750.0.html and now submitted as a bug in 1.8.4 etc. But in fact, its not similar at all, its a problem in RC3 / Fixes_2_0 that does not exist in 1.8.4

I believe RC3 is unable to paste an image into a TImage if the image was copied from another application. The attached demo (built on a demo from engkin) shows the problem, easy demo if you build one binary from RC3 and one from 1.8.4 and run each side by side.

Both versions will copy the Leopard into the clipboard and paste it into the timage on the right. However, only the 1.8.4 can do the paste if the copy was done elsewhere, ie the other demo app. Similarly, if you copy an image from a webpage.

The 'Info' button show what formats appear to be available - in the RC3 version, none if copy was from an app other than itself.

I cannot test this problem on Window, Mac or another linux box, so could someone else please test before you/me logs a bug report ?

Davo

Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Bart on January 08, 2019, 04:01:15 pm
Lazarus trunk (Lazarus 2.1.0 r59932 FPC 3.0.4 i386-win32-win32/win64)

When I copy an image (running cheetah from freepascal.org) from Firefox I get:
Format=DataObject
Format=text/html
Format=HTML Format
Format=text/_moz_htmlinfo
Format=text/_moz_htmlcontext
Format=application/x-moz-file-promise-url
Format=application/x-moz-file-promise-dest-filename
Format=Preferred DropEffect
Format=application/x-moz-nativeimage
Format=image/bmp

------image/bmp------
(
Format=Ole Private Data
Format=image/bmp

------image/bmp------
(
End of format list, count=14
Image Format ID = 2

And then when I try to paste, I get an exception:
[Window Title]
project1

[Content]
Wrong image format.

Press OK to ignore and risk data corruption.
Press Abort to kill the program.

[OK] [Abort]

I get the same exception if I try to paste from IrfanView or MS Paint.

I can paste a screenshot from my desktop (made outside the test application) into the second TImage without problems though.

[Edit]
The exception goes away and the image pastes when I change the code:
Code: Pascal  [Select]
  1.     Fmt := clipboard.FindPictureFormatID;
  2.     if 0 = Fmt then     //  ret first picture format found
  3.         memo1.append('fmt = 0, nothing we can paste as image')
  4.     else begin
  5.          //Image2.Picture.Bitmap.assign(Clipboard);
  6.         Image2.Picture.LoadFromClipboardFormat(Fmt);

Bart
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on January 08, 2019, 05:03:57 pm
I think the safest code to paste, to a TImage, a picture that was copied to the clipboard by other applications is this:

Code: Pascal  [Select]
  1. procedure TForm1.Button3Click(Sender: TObject);
  2. begin
  3.   if Clipboard.HasPictureFormat then begin
  4.      Image1.Picture.LoadFromClipboardFormat(Clipboard.FindPictureFormatID);
  5.   end;
  6. end;

This works for all formats registered within the LCL. Unfortunately TPicture.LoadFromClipboardFormat raises an exception if the provided format identifier is not an image format; therefore, the valididty of the format must be checked separately.

Maybe there should be an overloaded TPicture method without format parameter which does exactly the same, i.e.:
- Check whether the clipboard contains an image
- Call Clipboard.FindPictureFormatID
- Call LoadFromClipboardFormat
- Should be a function which returns false if the clipboard cannot be pasted to the picture.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on January 08, 2019, 11:31:57 pm
Further to pasting image issue ....

I incorporated the ideas suggested by WP and (apparently required on windows) by Bart - my paste method now has -

Code: Pascal  [Select]
  1.     if not Clipboard.HasPictureFormat then
  2.     // if 0 = clipboard.FindPictureFormatID then     //  ret first picture format found
  3.         memo1.append('fmt = 0, nothing we can paste as image')
  4.     else begin
  5.          // Image2.Picture.Bitmap.assign(Clipboard);
  6.          Image2.Picture.LoadFromClipboardFormat(Clipboard.FindPictureFormatID);
  7.          memo1.append('pasted as FormatID ' + inttostr(clipboard.FindPictureFormatID));
  8.      end;

On my Ubuntu Linux 18.04 64bit, still fails to paste when image copied from another application. I cannot reproduce Bart's crash on windows right now but it sounds like a separate issue to me. (sounds a bit ugly too) I am not really surprised the issue I am banging on about is Linux only, the code that responds differently to an in app copy compared to an external app is mostly widget specific.

Any linux users playing ?

Davo


Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: jamie on January 09, 2019, 12:01:52 am
I am not really sure what it is you are trying to do here however, if you use the LoadfromClipboard
function it will fail if there isn't a supported format.

 This has been documented for a long time now starting in the days of Delphi....

 You need to use a TRY finally or On EInvalidGraphic exception...

 Or you first check the clipboard formats currently loaded....

 I don't know what else you expect …

 at some point you need to intervene with your own code to correct things.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on January 09, 2019, 03:23:39 am
I am not really sure what it is you are trying to do here however, if you use the LoadfromClipboard
function it will fail if there isn't a supported format.

Indeed Jamie. I guess I have not been clear, the issue is that on RC3, there are no graphic formats available if copied from another app. I fully understand (and expect) a failure if you try and load a non existing format and discussion did wander into identifying the formats. But in RC3 (unlike 1.8.4) no graphic formats are available !

For example, a call to ClipBoard.SupportedFormats(List); will return an empty list. As long as you test before pasting you won't get a crash (good) but you cannot ever paste if there is (apparently) nothing there to paste (bad).

What I am trying to do is point out that RC3 does not work as 1.8.4 does and thats not what anyone wants.

As I am away from home at present, I cannot test on other platforms, thus a call for help. I'd hate to sit on this issue until 2.0 was released. Incidentally, its no direct interest to me, my app does not do images, its just something I noticed and saw a need to track down.

Davo
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: kft on January 09, 2019, 07:26:42 am
I found what caused the bug with controls appearing on all tabs of a pagecontrol.  If you create the control on the main form, and then move it to the pagecontrol tab, it will appear on all tabs.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 09, 2019, 10:25:28 am
Bugs reported to bugtracker have much better chance to get fixed
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: wp on January 09, 2019, 10:34:32 am
Indeed Jamie. I guess I have not been clear, the issue is that on RC3, there are no graphic formats available if copied from another app. I fully understand (and expect) a failure if you try and load a non existing format and discussion did wander into identifying the formats. But in RC3 (unlike 1.8.4) no graphic formats are available !
I installed RC3 and 1.8.4 to a Linux VM and can confirm your observation. Please file a bug report. No developer will see this description in this monster thread.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: dbannon on January 09, 2019, 11:08:07 am
Pasting Image issue on Linux.
Thanks WP, thats the confirmation I needed !

Will log a report.
Correction - have logged a report https://bugs.freepascal.org/view.php?id=34840

David
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: lucamar on January 09, 2019, 01:07:26 pm
I found what caused the bug with controls appearing on all tabs of a pagecontrol.  If you create the control on the main form, and then move it to the pagecontrol tab, it will appear on all tabs.

That's probably because it hasn't changed parent so it's not that it appears in all tabs but that it appears over the page control itself.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: aht0 on January 11, 2019, 11:13:51 am
Install on FreeBSD 12.0-RELEASE from source fails.

gmake output final rows (gmake is GNU Make, not compatible with FreeBSD's own Make)
Quote
Hint: (11030) Start of reading config file /usr/local/etc/fpc.cfg
Hint: (11031) End of reading config file /usr/local/etc/fpc.cfg
Free Pascal Compiler version 3.0.4 [2018/12/20] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: FreeBSD for x86-64
(3104) Compiling startlazarus.lpr
(3104) Compiling redirect_stderr.pas
(3104) Compiling lazarusmanager.pas
/root/lazarus/ide/lazarusmanager.pas(138,35) Hint: (5024) Parameter "Sender" not used
/root/lazarus/ide/lazarusmanager.pas(429,12) Warning: (5043) Symbol "CommandLine" is deprecated
(9022) Compiling resource ../units/x86_64-freebsd/gtk2/startlazarus.or
(9015) Linking ../startlazarus
(1008) 708 lines compiled, 4.1 sec
(1021) 1 warning(s) issued
(1022) 3 hint(s) issued
gmake[2]: Leaving directory '/root/lazarus/ide'
gmake[1]: Leaving directory '/root/lazarus/ide'

gmake install output in it's short entirety
Quote
#csh# gmake install
/usr/local/bin/ginstall -m 755 -d /usr/local/share
/usr/local/bin/ginstall -m 755 -d /usr/local/share/lazarus
/usr/local/bin/ginstall -m 755 -d /usr/local/share/applications
/usr/local/bin/ginstall -m 755 -d /usr/local/share/pixmaps
/usr/local/bin/ginstall -m 755 -d /usr/local/share/mime/packages
/usr/local/bin/ginstall -m 755 -d /usr/local/share/icons/hicolor/48x48/mimetypes
/usr/local/bin/ginstall -m 755 -d /usr/local/bin
/usr/local/bin/ginstall -m 755 -d /usr/local/share/man
/usr/local/bin/ginstall -m 755 -d /usr/local/share/man/man1
/bin/cp -Rfp packager debugger designer converter ide images languages lazarus.app units /usr/local/lazarus
cp: /usr/local/lazarus is not a directory
gmake: *** [Makefile:3420: install] Error 1

At first glance it looks like /usr/local/lazarus was not created. After I created it manually and reran gmake install it looks like installation was successful. No error messages in the tail end of output on shell.

However
Quote
#csh#startlazarus
startlazarus: Command not found.

ehm, what?
Quote
ll /usr/local/bin/startlazarus
lrwxr-xr-x  1 root  wheel  29 Jan 11 12:06 /usr/local/bin/startlazarus@ -> ../share/lazarus/startlazarus
#csh# ll /usr/local/share/lazarus/startlazarus
ls: /usr/local/share/lazarus/startlazarus: No such file or directory
ll /usr/local/share/lazarus/
total 0
Empty folder with no files in it. And /usr/local/bin/startlazarus appears to be linked against non-existing file..

Ideas?
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: marcov on January 11, 2019, 03:07:47 pm
Binaries should never be in share/ to begin with, since that is for architecture independent files.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Arvur on January 11, 2019, 03:31:15 pm
It seems that AutoSave function became too aggressive )))

Sometimes Lazarus asks to reopen project but often it overwrites files without any confirmation after I switch git branches.
Not sure... Perhaps it started from RC2.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: costel78 on January 11, 2019, 05:30:59 pm
In every 2.0 RC was a bug related to TDBLookUpListBox. First, it didn't work as intended: you can not select items, KeyValue is not null, but does not contain a valid value either. It is happens when linked DataSource and/or ListSource contain a read-only field.
Tested only on Linux, so far.
Attached is a small example project. Yes, I know that table structure is awkward (SQL statement, too  :) ) but it is working sometimes with simpler structures.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: zeljko on January 11, 2019, 05:57:30 pm
In every 2.0 RC was a bug related to TDBLookUpListBox. First, it didn't work as intended: you can not select items, KeyValue is not null, but does not contain a valid value either. It is happens when linked DataSource and/or ListSource contain a read-only field.
Tested only on Linux, so far.
Attached is a small example project. Yes, I know that table structure is awkward (SQL statement, too  :) ) but it is working sometimes with simpler structures.

Then please open an issue about it (if it's already not opened) and attach example project so it won't be forgotten.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: BeniBela on January 12, 2019, 05:17:29 pm
I tried to compile the version from https://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_0_RC3, but it gives

Quote
Code: [Select]
packagedefs.pas(59,17) Error: No matching implementation for interface method "GetIDAsString:AnsiString;" found
packagedefs.pas(59,17) Error: No matching implementation for interface method "GetIDAsWord:AnsiString;" found

edit: because it is private in TLazPackageID ...
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: aht0 on January 12, 2019, 06:15:37 pm
Binaries should never be in share/ to begin with, since that is for architecture independent files.
Yeah, I wondered about that. These are all 'default' folders though, chosen by Lazarus's make build system.
Should I consider report in bug tracker?
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: BeniBela on January 12, 2019, 06:43:06 pm
Now
Code: [Select]
   DrawText(Canvas.Handle,{$IFNDEF CLR}pchar{$endif}(s),length(s), temp,flags); shows the wrong encoding. The string is utf-8, but it shows latin1 on Windows 7


and when i call utf8ToWinCP on the string it is broken on wine, because  it needs utf-8 in the string there
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Bart on January 12, 2019, 07:13:30 pm
Now
Code: [Select]
   DrawText(Canvas.Handle,{$IFNDEF CLR}pchar{$endif}(s),length(s), temp,flags); shows the wrong encoding. The string is utf-8, but it shows latin1 on Windows 7

Where does that piece of code come from?
Is CLR defined?
IIRC when handling strings as PChars (in API's) the codepage information of the string gets lost.

Bart
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: BeniBela on January 12, 2019, 07:19:11 pm
Now
Code: [Select]
   DrawText(Canvas.Handle,{$IFNDEF CLR}pchar{$endif}(s),length(s), temp,flags); shows the wrong encoding. The string is utf-8, but it shows latin1 on Windows 7

Where does that piece of code come from?
Is CLR defined?
IIRC when handling strings as PChars (in API's) the codepage information of the string gets lost.

Bart

I wrote the code. It worked the last time I tested it.

CLR is for Delphi net  or something
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: JuhaManninen on January 12, 2019, 08:18:58 pm
I tried to compile the version from https://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_0_RC3, but it gives
Quote
Code: [Select]
packagedefs.pas(59,17) Error: No matching implementation for interface method "GetIDAsString:AnsiString;" found
packagedefs.pas(59,17) Error: No matching implementation for interface method "GetIDAsWord:AnsiString;" found
edit: because it is private in TLazPackageID ...
It got fixed in r59921.
It caused problems only with FPC trunk and should not matter for Lazarus 2.0 which comes with FPC 3.0.4, but I marked it to be merged to 2.0 anyway.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: BeniBela on January 12, 2019, 10:56:15 pm
Now
Code: [Select]
   DrawText(Canvas.Handle,{$IFNDEF CLR}pchar{$endif}(s),length(s), temp,flags); shows the wrong encoding. The string is utf-8, but it shows latin1 on Windows 7


and when i call utf8ToWinCP on the string it is broken on wine, because  it needs utf-8 in the string there

Scrap that, DrawText is working fine

All my data is in the wrong encoding
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: JernejL on January 14, 2019, 09:11:54 am
In latest lazarus, i have a issue with debugger not really working on any variables - i've attached a picture, this is stock install: Lazarus 2.0.0RC3 r59877 FPC 3.0.4 i386-win32-win32/win64
 
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on January 14, 2019, 02:41:59 pm
In latest lazarus, i have a issue with debugger not really working on any variables - i've attached a picture, this is stock install: Lazarus 2.0.0RC3 r59877 FPC 3.0.4 i386-win32-win32/win64

Compared to the same app of yours under
- a previous 2.0rc
- 1.8.6

In either case, since this looks like a gdb issue: gdb has not changed. (And neither has fpc, in case it is the generated debug info)

I can not reproduce this.  Do you have an example how to reproduce?

Also to gather the details, I am not clear from your description what you use?
- I assume you have a 64bit windows /64bit cpu ?
- You are using the 64 or 32bit IDE? You did / didn't install and use the cross compiler for the other bitness?

Are you using "Dwarf2 with  sets" ? "Dwarf 3" may cause errors like the one you describe, and that may happen seemingly at random.

What are your optimization settings? (O0 or O1 ?). And double-check smart-linking is off.

Out of interest does it happen to:
- local var
- parameters (without const, constref, var or out)
- parameters with const, constref, var or out  (the 0x40 may be because of "const")
  ("const" may happen at random, since fpc may encode it different, depending on type)
- class fields
- globals
?

If it is the const modifier, adding a watch ^widechar(Text)^ may help.


Note, that if it worked, widestring is known to the debugger as ^widechar (that is what fpc writes into the debuginfo). That means that de-ref Text^ will/should show you ONE char. That is a known issue, and unless gdb changes something, that may be hard to fix. But that is widestring related.


On Win64 with 64 bit target apps, it is known that there is an issue (either in fpc or gdb) where changes at one bit of code (in any unit) can cause issues with single stepping in another unit. But so far this only affected single stepping. (And this happens with all versions of GDB, and according to latest reports maybe with lldb too) https://bugs.freepascal.org/view.php?id=34159



You may want to try with alternate versions of GDB (It's a matter of finding some time, and then they will be added to the default install, but not 2.0 anymore)

It does not matter if you cross compile or not. It only matters if you app (the target) is 32 or 64 bit. (And according to that place the gdb.exe in the mingw/i386-win32/bin or mingw/x86_64-win64/bin folder in your lazarus install dir)

64 bit:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/

32 bit:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/

Start with the 8.2 version.
But keep in mind, that sometimes earlier versions work better than the latest.


Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: MrShoor on January 14, 2019, 07:13:11 pm
Do you have an example how to reproduce?
I don't know about JernejL's case, but I can provide an example when GDB totally doesn't work.
You just need to declare a nested class with interface implementation and store this nested class as interface variable. Then no one private field of this class can be watched.
Here a minimal sample:
Code: Pascal  [Select]
  1. program Project1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   SysUtils, Classes;
  7.  
  8. type
  9.   TMyClass = class
  10.   private type
  11.  
  12.     IInternalIntf = interface
  13.       function Eval: Integer;
  14.     end;
  15.  
  16.     TInternalClass = class (TInterfacedObject, IInternalIntf)
  17.     private
  18.       FVal: Integer;
  19.     public
  20.       function Eval: Integer;
  21.       constructor Create(const AValue: Integer);
  22.     end;
  23.  
  24.   private
  25.     FObj: IInternalIntf;
  26.   public
  27.     procedure DoTest;
  28.     constructor Create;
  29.   end;
  30.  
  31. { TMyClass.TInternalClass }
  32.  
  33. function TMyClass.TInternalClass.Eval: Integer;
  34. begin
  35.   Result := FVal * FVal;
  36. end;
  37.  
  38. constructor TMyClass.TInternalClass.Create(const AValue: Integer);
  39. begin
  40.   FVal := AValue;
  41. end;
  42.  
  43. { TMyClass }
  44.  
  45. procedure TMyClass.DoTest;
  46. begin
  47.   WriteLn(FObj.Eval);
  48. end;
  49.  
  50. constructor TMyClass.Create;
  51. begin
  52.   FObj := TInternalClass.Create(13);
  53. end;
  54.  
  55. procedure Test1;
  56. var obj: TMyClass;
  57. begin
  58.   obj := TMyClass.Create;
  59.   try
  60.     obj.DoTest;
  61.   finally
  62.     FreeAndNil(obj);
  63.   end;
  64. end;
  65.  
  66. begin
  67.   Test1;
  68.   ReadLn;
  69. end.
  70.  
Just try to set a breakpoint at Result := FVal * FVal; line, and watch FVal. You will get no symbol BLABLA in current context. This is a really annoying bug.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 14, 2019, 10:33:29 pm
Incompatible PPU problem:

In short, I have some NewPackage that uses already compiled/installed OldPackage. When I try to install NewPackage Lazarus complains that PPU from OldPackage is not compatible, but source PAS file can not be found (it is there and I can recompile OldPackage by hand without problems) so NewPackage fails on compilation.

Right now I can not build an embedded form editor (sparta_dockedformeditor or sparta_smartformeditor), but I think the problem is more generic since I have seen it with other components too, as explained here: https://forum.lazarus.freepascal.org/index.php/topic,43646.msg306307.html#msg306307

Problem shows on fpcupdeluxe generated 32bit Lazarus 2.0 fixes (currently RC3) with FPC 3.0 fixes (currently 3.0.5 SVN59943M) running on Win10x64. If needed I can put an archive of more then 600MB to some site (it will work on any Windows pc when put into proper dir and run with a provided shortcut). Building fails with Normal IDE profile without any extra compilation switches. Other profiles including some custom ones tried with the same result.

If anyone else can confirm this then I will file a bug report.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on January 14, 2019, 10:50:20 pm
I don't know about JernejL's case, but I can provide an example when GDB totally doesn't work.
You just need to declare a nested class with interface implementation and store this nested class as interface variable. Then no one private field of this class can be watched.

Just try to set a breakpoint at Result := FVal * FVal; line, and watch FVal. You will get no symbol BLABLA in current context. This is a really annoying bug.

That appears to be an issue in FPC.

FPC does not generate debuginfo for TInternalClass. (Afaik that happens because no variable of this type is declared).

- It generates "line info", but that only tells the debugger how to map the address to a line.
- In the line info it encodes a function name as P$PROJECT1$_$TMYCLASS_$_TINTERNALCLASS_$__$$_EVAL$$LONGINT
  Which you can also see in the stack window.

Code: [Select]
#0 P$PROJECT1$_$TMYCLASS_$_TINTERNALCLASS_$__$$_EVAL$$LONGINT at :36
#1 DOTEST(0xfcab0) at project1.lpr:48
#2 TEST1 at project1.lpr:61
#3 main at :0

It does however NOT tell the debugger to which object this function belongs.
In fact it does not include any information about the class  TInternalClass at all. (So according to the debug info created by fpc, FVal does not exist).


You can work-around this by including a field
  FDummy: TInternalClass;
in the outer class.


There is nothing that can be done in the IDE.
This needs to be fixed in fpc.

Please report this as an issue with FPC on the bugtracker.

It appears the issue is also present with FPC trunk (about 2 weeks old).


Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: BeniBela on January 14, 2019, 10:57:05 pm
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on January 14, 2019, 11:07:35 pm
Incompatible PPU problem:

This is definitely an issue in fpc. I seen this (or similar) a long time ago (but in the realm of 3.0.2 or 4). But its a long time, since 3.0.4 was released (or even longer since the 3.0 branch was started). So no idea if this is fixed in trunk.

It does not say "incompatible". It says "Checksum changed"
Quote
(3104) Compiling lazarus.pp
(10001) PPU Loading C:\PRG\Lazarus\FixesAll\lazarus\components\sparta\mdi\lib\i386-win32\sparta_multiplyresizer.ppu
(10011) PPU Source: sparta_multiplyresizer.pas not found
(10028) Recompiling sparta_MultiplyResizer, checksum changed for Generics.Collections
C:\PRG\Lazarus\FixesAll\lazarus\ide\sparta_multiplyresizer.pas(80,12) Fatal: (10022) Can't find unit sparta_MultiplyResizer used by sparta_MDI
Fatal: (1018) Compilation aborted

The subsequent error "Can't find unit sparta_MultiplyResizer" is to be expected.
The unit (source code) was only in the path, when the package containing it was (re-)build.
When "lazarus.pp" is compiled (as stated by the log), packages have long been build. The IDE passes only the path to the ppu files to the compiler. So the compiler does not know where the source file is.


Anyway the issue is with Generics.Collections (and/or the package that contains it)

There may be many reasons for this error.
The one I know, and have seen before is a combination of using "inline" and "circular unit refs" .

Something todo, with one of the circular referencing units forces the other (or itself) unit to compile again, but not updating its checksum. Or maybe it was changing the checksum for the header, after discovering the "inline".

1)
I am not sure, it may be enough to make sure, that all "inline" are declared in the interface. Yet it may not.

2)
It should help, if you disable all inlining in the affected units (package of Generics.Collections)

3)
It may (or may not) also help, to compile this package twice (the 2nd time, without cleaning it). The 2nd compile may fix the checksums.


--
It is quite some time, since I had the problem, so all this from distant memory.
It could also be another issue (not related to inline) that ends with the same error.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Martin_fr on January 14, 2019, 11:12:18 pm
  • I also do not see any resolved symbols in the backtrace dialog, only the addresses.
More info?

The stacktrace window is directly provided by GDB, so not much the IDE can do about.

One note though. If the objects/data on the stack  (the param of the function) are allocating huge memory, then they may not get resolved. The memory limit can be adjusted on the debugger page under Tools>Options (in the property grid on the debugger page)
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 18, 2019, 02:57:37 pm
It does not say "incompatible". It says "Checksum changed"
Sorry if provided info was not enough. Incompatible PPU is mentioned as fatal error during IDE rebuilding:
Quote
sparta_multiplyresizer.pas(80,12) Fatal: Cannot find sparta_MultiplyResizer used by sparta_MDI, incompatible ppu=C:\Prg\Lazarus\FixesAll\lazarus\components\sparta\mdi\lib\i386-win32\sparta_multiplyresizer.ppu, package sparta_MDI

Anyway the issue is with Generics.Collections (and/or the package that contains it)

There may be many reasons for this error.
The one I know, and have seen before is a combination of using "inline" and "circular unit refs" .

Something todo, with one of the circular referencing units forces the other (or itself) unit to compile again, but not updating its checksum. Or maybe it was changing the checksum for the header, after discovering the "inline".

1)
I am not sure, it may be enough to make sure, that all "inline" are declared in the interface. Yet it may not.

2)
It should help, if you disable all inlining in the affected units (package of Generics.Collections)

3)
It may (or may not) also help, to compile this package twice (the 2nd time, without cleaning it). The 2nd compile may fix the checksums.
As for point 3 I have set manual compilation of package rebuild options in both generics.collections and sparta_DockedFormEditor, but still the same problem. Messing with points 1 and 2 is uncharted territory for me, so I will byte them only if no other option is left.

Interesting thing is that I have now reinstalled everything from scratch, and at first docked form editor installed and worked (although embedded form editing didn't work when smart form editor package was also installed), but after 10-15 installed packages I got the same IDE rebuild error that sparta_multiplyresizer.ppu is incompatible. After uninstalling all sparta packages problem was gone and I could continue with other packages, but embedded form editing is lost.

To me, not having a functional docked form editor is a major bummer and I will report it as a bug in Lazarus 2.0 RC3 / FPC 3.0.5.
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 19, 2019, 12:55:29 am
not having a functional docked form editor is a major bummer and I will report it as a bug in Lazarus 2.0 RC3 / FPC 3.0.5.
Just reported: https://bugs.freepascal.org/view.php?id=34899
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: Akira1364 on January 19, 2019, 11:30:33 pm
Note that Generics.Collections has been in trunk FPC for over a year now, and the Lazarus version is somewhat outdated compared to the trunk version. Anyone having problems might want to try replacing their files with the ones from trunk. (Personally, I've never had any problems with Sparta Docked Form Editor at all.)
Title: Re: Lazarus Release Candidate 3 for 2.0
Post by: avra on January 20, 2019, 02:54:08 am
Note that Generics.Collections has been in trunk FPC for over a year now, and the Lazarus version is somewhat outdated compared to the trunk version. Anyone having problems might want to try replacing their files with the ones from trunk.
I replaced all generics.*.pas files from \lazarus\components\sparta\generics\source with \fpcsrc\packages\rtl-generics\src ones from trunk downloaded at the beginning of December, and after manual successful recompiling of sparta_generics.lpk, sparta_mdi.lpk, and sparta_dockedformeditor.lpk, I added sparta_dockedformeditor package to IDE and tried IDE clean rebuild but error was the same (incompatible ppu):
Quote
Warning: Recompiling sparta_MultiplyResizer, checksum changed for Generics.Collections
sparta_multiplyresizer.pas(80,12) Fatal: Cannot find sparta_MultiplyResizer used by sparta_MDI, incompatible ppu=C:\PRG\Lazarus\FixesAll\lazarus\components\sparta\mdi\lib\i386-win32\sparta_multiplyresizer.ppu, package sparta_MDI

Personally, I've never had any problems with Sparta Docked Form Editor at all.
First thing I do on fresh Lazarus is to add anchor docking package and sparta docked form editor. That goes well and embedded form editor works. But after installing more and more packages, at one moment (maybe at installing something that uses generics?) I am not able to rebuild the IDE any more because of the reported error. If I uninstall sparta docked form editor package I can rebuild IDE and continue with installation of other packages.