RB 14.08 - Access Violation in tppCustomReport
Hi,
I have a client that is getting an access violation when trying to close
down one of their reports.
Unfortunately I can not replicate the problem my end to find out why it
is occurring, but I have been able to trace down the problem with the
following call stack:
tppReport - Destroy Procedure (Line 971)
tppCustomReport - Destroy (Line 2664)
tppProducer - Destroy (Line 1125)
tppCustomCancelDialog - Destroy (Line 918)
Looking at line 918 in the ppForms file, it would appear as though it's
having a problem freeing a FTimer, although I'm not sure what that is about.
I was just wondering if someone might have any ideas what might be
causing this problem, or able to help point me in the right direction?
Thanks & Regards
Adam.
I have a client that is getting an access violation when trying to close
down one of their reports.
Unfortunately I can not replicate the problem my end to find out why it
is occurring, but I have been able to trace down the problem with the
following call stack:
tppReport - Destroy Procedure (Line 971)
tppCustomReport - Destroy (Line 2664)
tppProducer - Destroy (Line 1125)
tppCustomCancelDialog - Destroy (Line 918)
Looking at line 918 in the ppForms file, it would appear as though it's
having a problem freeing a FTimer, although I'm not sure what that is about.
I was just wondering if someone might have any ideas what might be
causing this problem, or able to help point me in the right direction?
Thanks & Regards
Adam.
This discussion has been closed.
Comments
We have not seen anything like this before with RB 14.08. How is your
application handling its destroy sequence? Any more information about
what is happening when this AV occurs would be helpful. An example that
recreates this issue on our machines would be the most helpful.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I would love to be able to give you an example that recreates the issue,
but unfortunately I haven't been able to recreate the issue myself on my
development machine at all.
The end user is unable to create it 'on demand', but it does happen from
time to time. The only way I've been able to track it to that stack is
using Eureka Log.
As such, I think it is very unlikely that I am going to be in a position
to provide a demonstration sorry.
As for how the report is handled, it's pretty much done like this:
1) The report and datasets are all on an independent / isolated form/unit.
2) The form is created, the datasets are activated
3) The report is printed
4) The datasets are closed, and finally
5) The form is free'd.
The form is freed by calling Form.free;
(In the onDestroy event of the form, the form is set to nil);
The error occurs when form.free is called. I may attempt to try and free
the TppReport component prior to see if this helps at all - but
unfortunately I have literally hundreds of reports that are created and
freed in the same fashion without this occurring before.
Best Regards
Adam
Are you freeing the report and form at the same time? It could be that
the destroy process has not fully completed for the report when you free
the form.
Since we are not able to recreate this on our machines, I'm just
throwing ideas out there. It is difficult to know exactly what it
happening without actually seeing it in action.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for your reply. I can appreciate the difficulty, as I face the
same problem. (Not being able to recreate the problem on my machines
either).
As the report is dropped on the form at design time, I do not normally
free the report prior to freeing the form. I just free the form, and
allow the form to free all it's child components.
However - I will attempt to free the report first, and put in a sleep /
application.processmessages command before freeing the form, to see if
this makes any difference at my clients end.
I do appreciate the thoughts you throw out there - as at this time, all
I can do is try something, update to the client, and wait to see if it
fixes the problem as well.
Thanks again for your suggestion!
Cheers
Adam.
Good call. I haven't used release before, but maybe that would be worth
giving a try. Thank you!
Adam