Access Violation when loading RB 5.56 report under RB 6.02 (D5)
Hi,
I'm getting an AV when loading reports built using the end-user designer of
RB Pro 5.56 (saved as external RTM files) and reloaded during our app's
runtime (which now use RB Pro 6.02). The error occurs during the report's
Template.LoadFromFile method.
I had a similar problem about a month ago, but DM provided some routines to
fix the conversion of old reports which I put in our app's code and it
solved the problem for *some* reports.
But I'm having the problem again with some other reports I tried loading
that were previously saved under RB 5.56. Loading these reports in a copy
of our app compiled with RB 5.56 loads them without any error. But loading
them under 6.02 gives an AV during LoadFromFile.
Because the report won't even finish loading, I can't save it as a text file
for debugging. What can I do to resolve this problem?
Thanks,
Vinnie Murdico
I'm getting an AV when loading reports built using the end-user designer of
RB Pro 5.56 (saved as external RTM files) and reloaded during our app's
runtime (which now use RB Pro 6.02). The error occurs during the report's
Template.LoadFromFile method.
I had a similar problem about a month ago, but DM provided some routines to
fix the conversion of old reports which I put in our app's code and it
solved the problem for *some* reports.
But I'm having the problem again with some other reports I tried loading
that were previously saved under RB 5.56. Loading these reports in a copy
of our app compiled with RB 5.56 loads them without any error. But loading
them under 6.02 gives an AV during LoadFromFile.
Because the report won't even finish loading, I can't save it as a text file
for debugging. What can I do to resolve this problem?
Thanks,
Vinnie Murdico
This discussion has been closed.
Comments
Original report was created version RB 5.0. not 5.56 as originally thought.
Current version is 6.02.
I recompiled the RB sources with Debugging ON so I could trace this.
Below is the call stack at the time of the error:
TdaMagicSQL.Create(nil)
TdaMagicLinks.ValidateMasterSQLFieldNames
TdaMagicSQL.GenerateMagicSQL
TdaSQL.CreateMagicSQLText
TdaSQL.GetMagicSQLText
TdaBDEQueryDataView.SQLChanged
TdaQueryDataView.Convert(5000)
TdaDataModule.Convert(5000)
TppCustomReport.Convert(5000)
TppReport.Convert(5000)
TppProducer.Loaded
TppCustomReport.Loaded
TppReport.Loaded
TppTemplate.LoadFromStream($117746C)
TppTemplate.LoadFromSource(stFile)
TppTemplate.LoadFromFile
TReportForm.PreviewBtnClick($116AEB4)
At the time the error occurs, RB is in the TdaMagicSQL.Create function, and
it raises the exception itself because aOwner is NIL at this time (aOwner
was passed in from FMagicSQL.MasterSQL, which is NIL in the calling
procedure):
if not (aOwner is TdaSQL) then
raise Exception.Create('TdaMagicSQL.Create: Owner must be TdaSQL');
Hope this helps...
Vinnie Murdico
data pipeline linking logic. You can send us the 5.0 report and we can try
to load it and trace through the code as well. We'll still ned a wroking
report to verify that the SQL is generated correctly just as it was in the
5.0 report. You may want to recreate the report's DADE configuration in
RB5.0 using dbDemos data, or send a detailed description of the exact
dataview configuration to support@digital-metaphors.com. Which database are
you using?
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I don't have any of the DBDEMOS data loaded, but I did create a simple app
and provided the accompanying Paradox database files for it. I have sent it
to support@digital-metaphors.com. Hopefully you can trace through it and
see where it dies.
I did have a copy of the same report saved at a later time under 6.x that
actually does load under 6.02. I'm not sure at what point I saved it that
it actually is able to load under 6.02, but the fact that the older copy
saved under 5.0 still won't load makes me think our end-users will have
similar "old" 5.0 reports that won't load under our app compiled with 6.02.
I will send the "good" version of the DTM and RTM file that does load under
6.02. That one may have been saved under 6.00 or 6.01 back in August,
since that's the date on it. I just can't remember the exact version we
were playing with at that time when that report was re-saved. In any event,
I'll send that in -- perhaps you can compare them.
Please let us know as soon as possible whatever your find out -- our next
release is "dead in the water" until we get past this conversion issue.
Thanks for your time and assistance in this matter.
- Vinnie Murdico
Uninstalling RB 6.02 and installing RB 6.01 in our app then allows the "bad"
original report (from January - saved under RB version 5.0) to load and
convert properly.
If I then reinstall RB 6.02 the original report does not load again.
-- Vinnie
6.02 and 5.56.
After some trying with different versions I have encountered that there is a
problem with data part of the report. By mistake I've put the wrong
TDatabase on the form, and report couldn't load the data. Template was shown
correctly (no access violation). Then I tried to export just data from 5.0
and import it to 6.02 (or 5.56). Import worked without problems, but data
preview didn't work. Even SQL wasn't shown correctly (it looks like it has a
problem with aliases). After some manual editing of .dtm file, I have
resolved that problem, but gor another error: it looks like 5.56 tries to
internally name data fields like 'FIELDNAME_1' (adding _1 at the end). Then
it says it is an unknown field. Field names in .dtm file are just like 5.0
has saved them (without '_1' at the end.
have a patch which fixes this issue for 5.0 reports converting to 6.02.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com