[DUG] Crystal Reports Crashing the App

Robert martin rob at wildsoft.co.nz
Fri Mar 30 11:39:49 NZST 2007


Hi

I just remember reading the headers for the source where it says it is 
no thread compliant and makes suggestions about how to make it so (not 
the DLL but th TCrpe component). 

Re your comments about the DLL, if anyone is capable of making a non 
thread safe DLL it is Crystal!  I suspect their first move is having the 
DLL write / read settings to the registry while it is running.  Is 
suspect that two apps running simultaneously would then have problems.  
This is a guess but I would not be surprised.

However since you app just goes bang regardless it probably isn't a 
thread issue.  Sorry I have no idea.

Rob Martin
Software Engineer

phone +64 03 377 0495
fax   +64 03 377 0496
web www.chreos.com

Wild Software Ltd



Rohit Gupta wrote:
> Robert,
>
> all this can not be correct.  How can a DLL be written that will not 
> work with more than one app at a time ?  Especially when there are no 
> common resources or files to use.  The data space is mapped to the app 
> that is using the dll.
>
> I have also discovered that the memory gets trashed asynchronously of 
> report access.  You can leave the app there and 10-30 seconds later it 
> will suddenly complain with rubbish errors or just disappear.  This is 
> when no one has even touched the keyboard in that time.
>
>
> Robert martin wrote:
>> Hi
>>
>> Yes.  But what bugs will they have introduced in the process?
>>
>> Don't know if two would work.  I would guess yes.
>>
>> Rob Martin
>> Software Engineer
>>
>> phone +64 03 377 0495
>> fax   +64 03 377 0496
>> web www.chreos.com
>>
>> Wild Software Ltd
>>
>>
>>
>> Rohit Gupta wrote:
>>> I see that BO are saying the the crpe is now threadsafe in v11.  Do 
>>> I believe them ?
>>>
>>> Question - do you know if it two crpe components  are allowed in the 
>>> same app ?  We use one to interrogate the report for formulas etc 
>>> and the other is bound to a form for running the report.
>>>
>>> Robert martin wrote:
>>>> Hi Rohit
>>>>
>>>> It has been some time since I used the Crpe method of accessing 
>>>> Crystal but my understanding is it is not Thread safe and therefore 
>>>> if you use it in threads or try running multiple copies of reports 
>>>> it can go bang.  This may be what you are experiencing.
>>>>
>>>> In the end w gave up on Crpe and now use the Com object to run 
>>>> them.  This works better but comes with other issues.  I think it 
>>>> is the better access method though.
>>>>
>>>> Not a log of help i'm afraid :)
>>>>
>>>> Rob Martin
>>>> Software Engineer
>>>>
>>>> phone +64 03 377 0495
>>>> fax   +64 03 377 0496
>>>> web www.chreos.com
>>>>
>>>> Wild Software Ltd
>>>>
>>>>
>>>>
>>>> Rohit Gupta wrote:
>>>>> In our real app, the program crashes randomly (regularly for some 
>>>>> users) at the instance that Crpe is used.  The app basically 
>>>>> disappears which implies that substantial code and/or stack is 
>>>>> corrupted.
>>>>>
>>>>> In a smaller app that only opens the report to get some stats (it 
>>>>> does not connect to the database), I can get it to crash in the 
>>>>> same fashion predictably.
>>>>>
>>>>> The sequence of events is open two copies of the app )or one copy 
>>>>> of the app and the CRW designer)
>>>>> Open any report in the first app (which always assignes ReportName 
>>>>> to blank and does not destroy the crpe component
>>>>> Open any report in the second app or CRW Designer
>>>>> Open any report in the first app and its gone with no trace.
>>>>>
>>>>> In real life the users can not run multiple copies, the app takes 
>>>>> care of that.  However the symptoms are identical leading me to 
>>>>> believe that if I can find the cause of the second crash, I can 
>>>>> fix the first one.
>>>>>
>>>>> Any clues anyone ?
>>>>> I cant find anything pertinent on google, except for one item 
>>>>> where the author insists that the problem is a secret com object 
>>>>> that crpe launches and if you wait for it to finish and terminate 
>>>>> then there are no crashes.  However, delays dont have any effect 
>>>>> on my test case.
>>>>>
>>>>> In the debugger, if I keep doing F7, everything keeps working.  
>>>>> But as soon as I press F8 or F9, it gets an AV because it starts 
>>>>> executing in hyperspace.
>>>>>
>>>>> _______________________________________________
>>>>> Delphi mailing list
>>>>> Delphi at ns3.123.net.nz
>>>>> http://ns3.123.co.nz/mailman/listinfo/delphi
>>>>>
>>>> _______________________________________________
>>>> Delphi mailing list
>>>> Delphi at ns3.123.net.nz
>>>> http://ns3.123.co.nz/mailman/listinfo/delphi
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Delphi mailing list
>>> Delphi at ns3.123.net.nz
>>> http://ns3.123.co.nz/mailman/listinfo/delphi
>>>
>> _______________________________________________
>> Delphi mailing list
>> Delphi at ns3.123.net.nz
>> http://ns3.123.co.nz/mailman/listinfo/delphi
>>
>>
>>
>
> -- 
> *Rohit Gupta*
> * B.E. Elec.   M.E.   Mem IEEE    Associate IEE*
> *Technical Manager*
> *Computer Fanatics Limited*
> ** 
> *Tel*     +64 9 4892280
> *Fax*    +64 9 4892290
> *Email  *rohit at cfl.co.nz <mailto:rohit at cfl.co.nz>**
> *Web    *www.cfl.co.nz <http://www.cfl.co.nz/>
>  
> ------------------------------------------------------------------------
> This email and any attachments contain information, which is 
> confidential and may be subject to legal privilege and copyright. If 
> you are not the intended recipient, you must not use, distribute or 
> copy this email or attachments. If you have received this in error, 
> please notify us immediately by return email and then delete this 
> email and any attachments.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.net.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>   


More information about the Delphi mailing list