Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/AddOn/RAVE    [ Add a report in this area ]  
Report #:  100281   Status: Closed
TRvProject crashes when dynamically created
Project:  Delphi Build #:  15.0.3953.35171
Version:    15.1 Submitted By:   Stéphane Caltiau
Report Type:  Crash / Data loss / Total failure Date Reported:  10/20/2011 7:05:44 AM
Severity:    Critical / Show Stopper Last Updated: 9/15/2012 4:39:44 AM
Platform:    All versions Internal Tracking #:  
Resolution: Feature Removed (Resolution Comments) Resolved in Build: : XE3
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
The call to TRvProject.ExecuteReport works 1 time and crashes the next time.

The Rave objects are created dynamically from threads. This application works fine with Delphi 2007 and Rave 7.5.2
Steps to Reproduce:
From a previous version (Delphi 2007 and Rave Report 7.5.2)
I had to add RvLDCompiler in the uses.

A TCPServer listen to 'order to print'.
A first class called TReportThread, created by the TCPServer threading system
and a second class called TReportData(TDataModule) used for database objects, TRvProject and TRvSystem.

The datas objects , TRvProject and TRvSystem are created in ReportThread.
On each order to print, the datas are fetched and this code is running;

try
      if PreviewMode then
      begin
        RvSystem.DefaultDest := rdPreview;
      end else begin
        RvSystem.DefaultDest := rdPrinter;
      end;
      RvProject.ExecuteReport(ReportToPrint);
except on .....

When the application starts, and the first TCP order arrives, the report is executed without problem.
on the next order, the call to RvProject.ExecuteReport throw a access violation in the Compiler (mean Rave Compiler)
In the Call Stack, it seems to hang in the RaveCompileStatus method (no source code available)

In the Rave 7.5.2, the Compiler was transparent
Workarounds
None
Attachment
None
Comments

Tomohiro Takahashi at 10/20/2011 8:16:31 PM -
> ... The Rave objects are created dynamically from threads. ...
Could you please attach simple sample project to reproduce your issue?

Server Response from: ETNACODE01