Access Violation related to PictureStream

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Access Violation related to PictureStream

Postby imperyal » Mon Oct 12, 2015 4:18 pm

Hello!

I'm using the professional version of VPE for 3 or 4 years now...
Recently we started to use tJPEGImage images on our reports, and that was when the Access Violation problems started.
I tried to debug this thing with no success. Is there a way for VPE to create a log (or something similar)? Is there any common traps when using PictureStream?

Thank you!
imperyal
 
Posts: 4
Joined: Mon Oct 12, 2015 4:08 pm

Re: Access Violation related to PictureStream

Postby IDEAL Software Support » Wed Oct 14, 2015 5:52 am

From your description, we have absolutely no idea what you are doing, which causes an Access Violation. We even have no idea what version of VPE you are using.

To answer your questions:
- There is no logging
- There are no common traps

I suggest you make sure you test your problem against the latest version of VPE. You can use the trial version for testing. It can be installed safely in parallel to any older version you are using. If the problem should exist in the latest version also, please send an e-mail with a sample source-code project that makes the problem reproducible.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Access Violation related to PictureStream

Postby imperyal » Wed Oct 14, 2015 4:54 pm

I have no time to make a test example, sorry...

- I was using jpeg images stored on the database
- Loading the picture data (blob field) to a tMemoryStream
- Transfering the picture data to a TVPEStream, created via CreateMemoryStream()
- Printing using PictureStream

I end up converting my code to use files on a temporary folder, now it is working fine.

P.S.: I'm using version 6.1 and I did test the code with version 7.0, no success.
imperyal
 
Posts: 4
Joined: Mon Oct 12, 2015 4:08 pm

Re: Access Violation related to PictureStream

Postby IDEAL Software Support » Thu Oct 15, 2015 7:33 am

Does the access violation occur always or only sporadically? Does the sample demo project for Delphi that comes with VPE work on your side? Is your source code identical to the demo code?

From the log file of our VCS I can see that for v7.0 R3 there was made a fix related to stream based images. Are you sure you did test againast v7.0 R3, i.e. the latest version currently available for download?
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Access Violation related to PictureStream

Postby imperyal » Thu Oct 15, 2015 1:17 pm

I think I tested this with first release of VPE7, not the R3 version.
I spent some time trying to isolate the error on a simple example, but now i'm not having the error.
I have now changed lots of code on my main project to be able to test this further.

As I said, i'm now using picture files, and I noticed a dramatic increase in speed, the printing is much quicker now.

Anyway, thank you for your help!
imperyal
 
Posts: 4
Joined: Mon Oct 12, 2015 4:08 pm

Re: Access Violation related to PictureStream

Postby IDEAL Software Support » Thu Oct 15, 2015 6:10 pm

It is technically not possible that printing is quicker with external files instead of memory streams, except you are using so much memory that the Windows OS might start swapping virtual memory to disk.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Access Violation related to PictureStream

Postby imperyal » Fri Oct 16, 2015 1:21 pm

I'm accessing a database, maybe that's way it is slower... It could be optimised for sure. I'm sticking with picture files for now.
imperyal
 
Posts: 4
Joined: Mon Oct 12, 2015 4:08 pm

Re: Access Violation related to PictureStream

Postby IDEAL Software Support » Fri Oct 16, 2015 1:51 pm

Yes, if the image files are permanently stored on hard disk, this is faster - especially due to the fast multi-level image cache of VPE.

I had thought you extract the images from the DB as temporary files.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 4 guests