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.
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
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
https://drive.google.com/file/d/1IE4a8gReEyvjPC8w9Otho_zVMvcaEwjf/view?usp=sharing
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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.
:00d67876 TIdIOHandler.InputBufferIsEmpty + $6
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com