* * *

Author Topic: Fortes Report generate access violation with Lazarus 1.8  (Read 2066 times)

motaz

  • Hero Member
  • *****
  • Posts: 504
    • http://code.sd
Fortes Report generate access violation with Lazarus 1.8
« on: February 14, 2018, 05:53:23 pm »
Hello
After I have upgraded to Lazarus 1.8 I encounter Access violation when running application with FortesReport.
I'm using Ubuntu, and I have installed the latest FortesReport 4 lazarus from Trunk
To re-produce the problem:
- create new Lazarus application
- drop Fortes Report component in form
- drop band
- drop DBText component and run the application

Zoran

  • Hero Member
  • *****
  • Posts: 1244
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #1 on: February 14, 2018, 06:23:30 pm »
Welcome back, Motaz!

Where did you download fortes from?
Maybe you should try with online package manager and FortesReportCE.

motaz

  • Hero Member
  • *****
  • Posts: 504
    • http://code.sd
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #2 on: February 14, 2018, 06:39:59 pm »
Hello Zoran
I have download it from trunk:

http://svn.code.sf.net/p/fortes4lazarus/code/

what is online package manager and what is FortesReportCE
It seems that I have missed a lot of things

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 418
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #3 on: February 14, 2018, 08:14:47 pm »
what is online package manager and what is FortesReportCE

http://wiki.freepascal.org/Online_Package_Manager
https://forum.lazarus.freepascal.org/index.php/topic,34297.1140.html

Original source:
https://github.com/fortesinformatica/fortesreport-ce

Fork source:
http://fortes4lazarus.sourceforge.net/

There have been and there are even others forks of FortesReport because of problems in the past.
« Last Edit: February 14, 2018, 08:17:38 pm by valdir.marcos »

motaz

  • Hero Member
  • *****
  • Posts: 504
    • http://code.sd
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #4 on: February 15, 2018, 07:00:31 am »
I have installed Fortes Report CE, but now I'm in infinite loop of unable to load components, access violation, and Lazarus closed


Soner

  • Jr. Member
  • **
  • Posts: 64
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #5 on: February 15, 2018, 01:12:35 pm »
@motaz:
Are you using 64Bit Lazarus on  64Bit *nix OS?
It is not lazarus issue.
I get same error yesterday on mac with 64bit build.
In may case the error was in RLPreviewForm.pas
Code: Pascal  [Select]
  1. procedure TRLPreviewForm.OrganizePreviews;
  2. var
  3.   I, T, W: Integer;
  4.   N: TControl;
  5.   S: TSplitter;
  6. begin
  7.   if FPreviewList.Count > 0 then
  8.   begin
  9.     for I := FPreviewList.Count - 1 downto 0 do
  10.     begin
  11.       N := TControl(TRLPreview(FPreviewList[I]));
  12.       S := TSplitter(N.Tag);
  13.       S.Align := alNone;    // <----------------- HERE CRASHED WITH SAME ERROR
  14.       N.Align := alNone;
  15.     end;  
  16.  

I can't solved the problem because gdb does not work more on MACOS,  *nix OSses s*cks.

64 Bit windows build worked without error.

This  http://fortes4lazarus.sourceforge.net/ worked also on MacOS with 64bit build. Maybe for this version must some functions implemented for *nix-osses. Look at rlprinter.pas. I saw "todo" notices there.

howardpc

  • Hero Member
  • *****
  • Posts: 2716
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #6 on: February 15, 2018, 01:57:47 pm »
A comment from someone who has never used Fortes report.

The code shown by Soner is a series of incredible hacks!
An accident waiting to happen, and sure enough it does.
There is not even a sanity check that
Code: Pascal  [Select]
  1. S <> Nil;
Such attempts to get around Pascal's strong type checking are usually misguided, and an indication that the author has not given enough consideration to better ways to gain write access to the Align property of a GUI control.

I hope the code quality elsewhere in Fortes report is much higher.

Soner

  • Jr. Member
  • **
  • Posts: 64
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #7 on: February 15, 2018, 02:35:14 pm »
A comment from someone who has never used Fortes report.

The code shown by Soner is a series of incredible hacks!
An accident waiting to happen, and sure enough it does.
There is not even a sanity check that
Code: Pascal  [Select]
  1. S <> Nil;
Such attempts to get around Pascal's strong type checking are usually misguided, and an indication that the author has not given enough consideration to better ways to gain write access to the Align property of a GUI control.

I hope the code quality elsewhere in Fortes report is much higher.
I inspected it with gdb before gdb stopped to work and S was valid object, I could see it's properties but on this line it crashed anyway.
That was strange.
Same thing works on Windows with 64 bit build.

motaz

  • Hero Member
  • *****
  • Posts: 504
    • http://code.sd
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #8 on: February 16, 2018, 08:02:30 am »
Problem has been solved after using new Fortes Report CE
There are missing components that generates errors: PrintDialog, HTMLFilter, and PDFFilter

I have returned the old Fortes Report to enable removing that components, then installed new Fortes Report CE, and it work fine
see attachment picture

Soner

  • Jr. Member
  • **
  • Posts: 64
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #9 on: February 16, 2018, 01:50:22 pm »
Also I downloaded from https://github.com/fortesinformatica/fortesreport-ce now and this version works on MacOs as 64Build QT-Widgetset.

It looks like online package manager distributes code typhoon trash.

GetMem

  • Hero Member
  • *****
  • Posts: 3109
Re: Fortes Report generate access violation with Lazarus 1.8
« Reply #10 on: February 16, 2018, 03:37:17 pm »
@Soner
Quote
It looks like online package manager distributes code typhoon trash.
Online package manager contains a few CT packages, but fortesreport is not one of them. If you do not agree with CT/OPM please don't use it. I'm not gonna start another argue about this issue.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus