Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Trouble tracking down access error when exiting application

I am having trouble tracking down an Access Violation. I have reports categorized on different forms in my application CAP.exe. If I go to a form and preview a report, then go to another form and preview a report, and then exit the application by clicking the X on the main form, I get the following error:

Exception EAccessViolation in module rtl210.bpl.
Access violation at address 00000000 in module 'CAP.exe'. Read of address 00000000.

The error does not appear if I preview different reports on the same form, and then exit the application. The error does not happen if I just keep using the application without exiting the application. It only happens when I preview a report on one form, then go to another form and preview a different report, and then exit the application.

When I try to use the debugger, it pulls up the CPU tab instead of putting me on the source code where this might be happening. I have Mad Except installed and can supply the exception report it produces if that would help. My production machine has Delphi XE7, but I moved the code over to Delphi 10.2 Tokyo on another computer and with a fresh build there the problem still exists.

I hope somebody can point me in a direction to resolving this problem. I have been struggling with this for more than a year.

Comments

  • Hi David,

    Which version of ReportBuilder are you using?

    This is likely caused by a memory/resource leak either in ReportBuilder or your application. I suggest enabling memory leak reporting for your application and re-running your app. This will let you know if there is a leak and where it might be occurring. We run all our testing with memory leak detection enabled but occasionally some slip through.

    http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.ReportMemoryLeaksOnShutdown

    Posting the MadExcept report could also be helpful.


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2019
    Hi David,

    Which version of ReportBuilder are you using?

    It appears there is an issue with the destroy sequence of your application as it does not appear that even the TppReport object is properly freed.

    Please post or send me the call stack when you receive the error and that should give a better idea what is happening. Also, any more information about how your application is designed would be helpful.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • I am using RB 16 with Delphi XE7.

    I setup another computer with Delphi 10.2.3 and RB19. The error still happens under that system exactly the same way. I use NexusDB database.

    Is there a way to attach or send a text file? The madexcept report is too long to include here.
  • The call stack window has:
    :00d67876 TIdIOHandler.InputBufferIsEmpty + $6
  • Please send all files to support@digital-metaphors.com. We will continue this discussion via email and I will post the solution once it is found here.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.