Author Topic: strange "access denied" error with lazreport 0.9.9  (Read 2542 times)


  • Full Member
  • ***
  • Posts: 114
strange "access denied" error with lazreport 0.9.9
« on: April 09, 2016, 09:16:08 pm »

I'm using Lazarus 1.7 (svn trunk this evening) / lazreport 0.9.9 and FPC 3.0. I've got a strange bug (Access violation), only when I run my application to display a Master/Detail report with lazreport. I've already read thread about this, and I take care to close my lazarus and my database before to run my application...

This is the bug with Linux target. The memory leak is an other Bug, I'm working about this second problem too... May be there is a link between them... :
Code: Pascal  [Select][+][-]
  1. Exception Class Name = EAccessViolation
  2. Exception message = Access violation
  3. Heap dump by heaptrc unit
  4. 94643 memory blocks allocated : 9641986/9934968
  5. 94247 memory blocks freed     : 9600194/9892456
  6. 396 unfreed memory blocks : 41792
  7. True heap size : 2228224
  8. True free heap : 2155008
  9. Should be : 2160368
  10. Call trace for block $B58AA2E0 size 138
  11.   $080982A0 line 384 of src/vues/main.pas
  12.   $083227DA
  13.   $0832630C
  14.   $08325762
  15.   $0837F8ED
  16.   $082F4E33
  17.   $082F4EF7

With Windows Target, the bug error message is "File not open"...

I tested a lot of manner to build the Master/Detail query and lazareport. I think my report is well formed, with a detail dataset (PEDAGLesSeances) using one parameter as Forward Key to the Prmiary Key of an other master report (PEDAGOLesSequences)... 

I've got some informations to debug:
  • This Master/Detail report is working fine into data module and Lazarus ide
  • The lazreport is working fine without the detail fields, but only the master field ! I think there is a trouble with bookmark management into the algortithm of lazreport using Master/Detail reports...

I uploaded my the project at this link (Version bug only,  windows 32 bits and linux 32 bit targets with binaries) : (28 Mo, zipped)

  • To run the application run : typodoc or wine typodoc.exe (or typodoc.exe under windows)
  • To test the error you could go to menu "rapporter / Catalogue des séance" then choose the report ./rapports/lazreportCatalogueSeances.lrf

If someone could tell me what is wrong, I'll be really happy. I tested all yesterday long and I can't find my bug with same eyes... !

Thank you very much if you can help me !
« Last Edit: April 10, 2016, 08:00:16 am by gelinp »
My configuration is : Lazarus 1.6+dfsg-1 / FPC 3.0.0 / Debian Mint / x86_64-linux-gtk2


  • Sr. Member
  • ****
  • Posts: 470
Re: strange "access denied" error with lazreport 0.9.9
« Reply #1 on: April 24, 2016, 03:23:58 am »
You were hit by a bookmarks bug in sqldb, see issue and the related one

Fortunatelly the solution is simple, just create a TfrReport OnFormPageBookmarks event handler, let it empty (don't forget to add an empty commented line or the IDE might try to remove the empty event handler).

Moreover in r52241 I have disabled by default this LazReport's feature of trying to preserve the bookmarks, so the creating of an empty event handler is not necessary anymore.


TinyPortal © 2005-2018