Recent

Author Topic: Lazarus Release 2.2.6  (Read 35672 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release 2.2.6
« Reply #45 on: April 09, 2023, 02:53:45 pm »
I haven't seen the particular error yet.
It would be helpful to have an example that reproduces it.

Also, test with a clean new install. Clean config, no extra packages installed or used.
For that, either:
- remove(backup) all config / since config is not cleared by the installer (not by default).
- make a 2ndary install, with it's own new config



balazsszekely

  • Guest
Re: Lazarus Release 2.2.6
« Reply #46 on: April 09, 2023, 03:36:15 pm »
@SaraT
Quote
Sometimes I have to delete manually the png data image from the .dfm file to open the project :/
There are no dfm files in lazarus. Perhaps you meant lfm or are you trying to copy/pate a TImage from a delphi project?

wp

  • Hero Member
  • *****
  • Posts: 11833
Re: Lazarus Release 2.2.6
« Reply #47 on: April 09, 2023, 03:48:10 pm »
copy and paste a TImage (with png image) [...] .dfm file...
You are getting the image from Delphi? The dfm/lfm files have the name of the graphics class used to read this image at the front of the image data block (*). In case of png images, delphi uses a TPngImage while Lazarus/FPC use the TPortableNetworkGraphic class. Therefore, when you open the dfm file in Lazarus, the reader class is not detected, and Lazarus will refuse reading the file. The same happens when you install a different graphics library, such as Graphics32; their png class is named TPNG (iirc), and you will be able to open this lfm file in Lazarus only when Graphics32 is installed.

@GetMem:
Lazarus is very tolerant in opening form files, it is able to open dfm files after the resource directive has been adjusted to {$R *.dmf}

-----------------------

(*)
Here are snippets from dfm and lfm files containing a TImage with the same png picture:

Code: [Select]
dfm:
    Picture.Data = {
      0954506E67496D61676589504E470D0A1A0A0000000D49484452000000400000

lfm
    Picture.Data = {
      1754506F727461626C654E6574776F726B47726170686963D108000089504E47

To interpret these codes look at each group of 2 digits as a hex representation of a byte (char):
Code: [Select]
dfm:
  09  (length byte)
  54 = T
  50 = P
  6E = n
  67 = g
  49 = I
  6D = m
  61 = a
  67 = g
  65 = e

lfm:
  17 (length byte)
  54 = T
  50 = P
  6F = o
  72 = r
  74 = t
  61 = a
  62 = b
  6C = l
  65 = e
  etc...



« Last Edit: April 09, 2023, 04:02:36 pm by wp »

SaraT

  • Full Member
  • ***
  • Posts: 121
  • A little student
Re: Lazarus Release 2.2.6
« Reply #48 on: April 09, 2023, 04:17:34 pm »
Sorry, I wanted to say lfm files. I am not working with Delphi.

Lazarus is just installed in Windows 11. I don't have any other installation of Lazarus.

Take a look at the attached gif...
« Last Edit: April 09, 2023, 04:19:22 pm by SaraT »

wp

  • Hero Member
  • *****
  • Posts: 11833
Re: Lazarus Release 2.2.6
« Reply #49 on: April 09, 2023, 04:20:39 pm »
Repeated this with my Laz 2.2.6 on Win 11 - no problem. Still can't get the third-party graphics software idea out of my mind. Which packages, in particular packages related with graphics, are installed in your system?

SaraT

  • Full Member
  • ***
  • Posts: 121
  • A little student
Re: Lazarus Release 2.2.6
« Reply #50 on: April 09, 2023, 04:25:58 pm »
Repeated this with my Laz 2.2.6 on Win 11 - no problem. Still can't get the third-party graphics software idea out of my mind. Which packages, in particular packages related with graphics, are installed in your system?

Take a look at the attached image with all installed packages.
Im using Lazarus v2.2.6

wp

  • Hero Member
  • *****
  • Posts: 11833
Re: Lazarus Release 2.2.6
« Reply #51 on: April 09, 2023, 04:54:28 pm »
Vampyre...

I installed VampyreImaging into my Laz/main and can reproduce the issue now.

After Vampyre installation a TImage in a lfm file has this finger print:

Code: [Select]
    Picture.Data = {
      0B54496D6167696E67504E473640000089504E470D0A1A0A0000000D49484452 

This means: 54=T, 49=I 6D=m, 61=a 67=g 69=i 6E=n 67=g 50=P 4E=N 47=G ("TImagingPNG")

If you read my previous post: the LCL uses the signature "TPortableNetworkGraphic". In my test, even the IDE with Vampyre installed cannot open the such an lfm file. And since copy&paste to clipboard occurs via lfm stream it cannot read a copied TImage from the clipboard any more...

The fact that the IDE cannot read the lfm files even when Vampyre is installed should be investigated; this sounds like an issue in the streaming system.

Until this is solved: Do not install third-party graphics software which installs its own image reader/writer classes. I guess, however, that it should be possible to use Vampyre at runtime alone (without installation of the package). If, for example, you need special features of a reader of the Vampyre library you can still use the corresponding unit without installing the package:

Code: Pascal  [Select][+][-]
  1. uses
  2.   ImagingComponents;
  3.  
  4. procedure TForm1.Button1Click(Sender: TObject);
  5. var
  6.   png: TImagingPNG;
  7. begin
  8.   png := TImagingPNG.Create;
  9.   try
  10.     png.LoadFromFile('C:\Lazarus\lazarus-main_fpc3.2.2\images\general_purpose\Add_03_64.png');
  11.     Image1.Picture.Assign(png);
  12.   finally
  13.     png.Free;
  14.   end;
  15. end;
« Last Edit: April 09, 2023, 05:23:10 pm by wp »

balazsszekely

  • Guest
Re: Lazarus Release 2.2.6
« Reply #52 on: April 09, 2023, 09:06:23 pm »
@wp
Interesting. This is a bug in my opinion.

Tony Stone

  • Full Member
  • ***
  • Posts: 216
Re: Lazarus Release 2.2.6
« Reply #53 on: April 23, 2023, 02:50:25 am »
THANK YOU ALL(THE DEVS ESPECIALLY) for your work on FPC and Lazarus.  That is all.  :D

omurolmez

  • New Member
  • *
  • Posts: 10
Re: Lazarus Release 2.2.6
« Reply #54 on: May 09, 2023, 04:09:24 pm »
Thank you for your great effort !
Both FPC and Lazarus are amazing !

ikel

  • New Member
  • *
  • Posts: 26
Re: Lazarus Release 2.2.6
« Reply #55 on: May 12, 2023, 08:21:49 am »
The Lazarus team is glad to announce the release of Lazarus 2.2.6.
...

Thanks to the devs and testers who contributed to this release!

Sorry, I missed this announcement.

-ikel

CM630

  • Hero Member
  • *****
  • Posts: 1077
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Lazarus Release 2.2.6
« Reply #56 on: July 10, 2023, 03:23:50 pm »
Lazarus 2.2.6 64 bit on Win 10 64 bit hangs forever on OpenDialog.Execute.
Lazarus 2.2.6 32 bit on Win 10 64 bit works just fine on the same PC.


Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3.  
  4. {$mode objfpc}{$H+}
  5.  
  6.  
  7. interface
  8.  
  9.  
  10. uses
  11.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
  12.  
  13.  
  14. type
  15.  
  16.  
  17.   { TForm1 }
  18.  
  19.  
  20.   TForm1 = class(TForm)
  21.     Button1: TButton;
  22.     procedure Button1Click(Sender: TObject);
  23.   private
  24.  
  25.  
  26.   public
  27.  
  28.  
  29.   end;
  30.  
  31.  
  32. var
  33.   Form1: TForm1;
  34.  
  35.  
  36. implementation
  37.  
  38.  
  39. {$R *.lfm}
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. function GetCommonString(aString:string):string;
  47. begin
  48.   Result := aString;
  49. end;
  50.  
  51.  
  52. procedure LoadVideoWithDialog;
  53. var
  54.   OD : TOpenDialog;
  55.   i  : Integer;
  56.   s  : String;
  57. begin
  58.   OD := TOpenDialog.Create(NIL);
  59.   try
  60.     s := '';
  61.     OD.Title   := GetCommonString('OpenFile');
  62.     OD.Filter  := GetCommonString('AllSupportedFiles') + '|' + s;
  63.     OD.Options := OD.Options + [ofFileMustExist];
  64.  
  65.  
  66.     if OD.Execute then
  67.     begin
  68.     end;
  69.   finally
  70.     OD.Free;
  71.   end;
  72. end;
  73.  
  74.  
  75. { TForm1 }
  76.  
  77.  
  78. procedure TForm1.Button1Click(Sender: TObject);
  79. begin
  80.      LoadVideoWithDialog;
  81. end;
  82.  
  83.  
  84. end.
Лазар 3,0 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release 2.2.6
« Reply #57 on: July 10, 2023, 04:00:36 pm »
Lazarus 2.2.6 64 bit on Win 10 64 bit hangs forever on OpenDialog.Execute.
Lazarus 2.2.6 32 bit on Win 10 64 bit works just fine on the same PC.

Is that: Only while debugging?

Several people have mentioned that. Unfortunately it only happens on some systems, and could not be reproduced. However, those that had the issue, have all said it was fixed in the git main branch.

Please test with the 3.0RC1.


If you can for some reason not switch to 3.0, then change the debugger backend to gdb.


If the issue is not related to debugging (if it hangs too, when you run your app outside the IDE), then you need to report a bug. However since 3.0 has it's RC out, new fixes will only be made for 3.0. Therefore you should then first test with 3.0(RC1).

CM630

  • Hero Member
  • *****
  • Posts: 1077
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Lazarus Release 2.2.6
« Reply #58 on: July 11, 2023, 04:09:23 pm »
When I execute the already built exe outside the IDE the dialog is open properly.


I am not sure that I have succeeded to switch to GDB, so I have unchecked everything in Project options — Compiler options — Debugging. The open dialog kept stuck.


Then I set Project options — Compiler options — Compilation and Linking — Optimization levels = 4. When I presses F9 I had to select Dwarf 1 to 7 + Snow White,  I selected Dwarf 1 - The open dialog kept stuck.

For some reason, I could not compile the app I intended to win Laz 3.0RC1.
« Last Edit: July 11, 2023, 08:12:34 pm by CM630 »
Лазар 3,0 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release 2.2.6
« Reply #59 on: July 11, 2023, 05:10:58 pm »
When I execute the already built exe outside the IDE the dialog is open properly.


I am not sure that I have succeeded to switch to GDB, so I have unchecked everything in Project options — Compiler options — Debugging. The open dialog kept stuck.


Then I set Project options — Compiler options — Compilation and Linking — Optimization levels = 4. When I presses F9 I had to select Dwarf 1 to 7 + Snow White,  I selected Dwarf 1 - The open dialog kept stuck.

For some reason, I could not compile the app I intended to win Laz
3.0RC1.


Like this, only gdb instead of fpdebug
https://wiki.lazarus.freepascal.org/Debugger_Setup

Or switch to Lazarus 3.0.RC1

 

TinyPortal © 2005-2018