Return codes

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's Image-XChange Imaging SDK (only).

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker - Clarion Support, John - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Support Staff, moderators

Post Reply
ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Return codes

Post by ebucher » Wed Feb 02, 2005 3:25 pm

I want to check the return code from the generate command: IMGXCR2:rtn = IMGXCR2.Generate(qTIFF,False)

What are the possible values of the return code and what are the corresponding meanings of the return codes. This is probably in the manual or help, but I can't find it.
Eric Bucher
Prelude Software Inc

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Wed Feb 02, 2005 6:18 pm

The .Generate method returns a True/False to indicate whether it succeeded or not. The return code is defined as RETURN CHOOSE(SELF.LastErrorCode = DI_OK)

To get the actual last library error code, use IMGXCR2.GetLastError() to return the internal SELF.LastErrorCode.

The table of error codes is found on the Error Codes page of the ImageXHelp.chm help file which should be in 3rdparty\Docs\TrackerSoftwareProducts\ImageXChange folder. They are presented in Hex but are easily converted. They are also found as a table of Clarion EQUATES in imgxtool.inc in the 3rdparty\libsrc folder.

HTH!
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Post by ebucher » Wed Feb 02, 2005 9:34 pm

Thank you!
Eric Bucher
Prelude Software Inc

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu Feb 03, 2005 7:35 am

Pleasure
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Generate Problem

Post by ebucher » Fri Feb 04, 2005 4:20 pm

My client is experiencing a problem that I cannot recreate in my office.

We are generating multiple TIFF image files in a batch process. After successfully creating a number of files, usually around 189, the remaining image files are not created.

The .Generate method always returns a True, indicating that it succeeded in creating the file. However, after 189 files the remaining image files do not show up in the folder.

It does not appear to be a problem with disk space or folder limitations. If they run the process again, it will create an additional 189 files and then fail to create the remaining files in the batch.

I have attached a trace log that shows the image file name, the true/false return from the .Generate method, and the number of files in the image folder. The count starts at 189 because this is the second run. Each run should have created approximately 370 image files.

Do you have any ideas on what might be causing this problem?
Attachments
TRACE.ZIP
(3.16 KiB) Downloaded 346 times
Eric Bucher
Prelude Software Inc

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Feb 04, 2005 4:39 pm

Strange one - bearing in mind that the Image-XChange library is used extensivley in our PDF-XChange product which has perhaps as many as 1 million + users of all types this is I think more to do with your users local enviroment/hardware than product related.

In tests we have converted literally 1000's of varied images without issue.

Can we get a sample app to test ?

And also some info on your users OS/Service packs and hardware/Memory/Virtual memory and so on.

Also where do the images and app reside - locally/network etc.

The more info the better.

I suspect that this is going to be tough to trace,

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Fri Feb 04, 2005 10:49 pm

It certainly sounds like a resource issue of some kind.

I'm going to watch this topic.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Post by ebucher » Mon Feb 07, 2005 4:00 pm

I have attached the code that I am using to generate the images. The first section of the code shows how perform the generate routine (GenerateTIFF) for each page.

The second section of the code is the generate routine. Am I missing anything that I should be doing to free up resouces after generating the image?
Attachments
TIFFCODE.ZIP
(833 Bytes) Downloaded 303 times
Eric Bucher
Prelude Software Inc

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Mon Feb 07, 2005 7:43 pm

Hi Eric!

First, if you are not creating hardcopy: after you create the TIFF file you should run the qTIFF queue and delete the WMF files that you are using, otherwise they can build up over time.

LOOP WHILE RECORDS(qTIFF)
GET(qTIFF,1)
REMOVE(qTIFFPreviewImage)
DELETE(qTIFF)
END

If you are creating hardcopy then the Clarion Report Engine will perform the cleanup for you.

I need to know which imgxtool.inc and clw you are using; whether they have a "3" in their names like imgxtool3.inc/clw; and what the date/time and file size is.

Thanks!
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Post by ebucher » Mon Feb 07, 2005 9:33 pm

Thanks, I will try adding the code you suggest and have the client retest.

I don't see that we are using imgxtool.inc / .clw or imgxtool3.inc / .clw. We are using imgxrpt.inc and filepath.inc. But I can't find any references to a .clw from your libraries.

The Image-XChange global extension template I am using generates the following includes:

!*** Image-Xchange v1.0 Start
INCLUDE('imgxrpt.inc'),ONCE
INCLUDE('filepath.inc'),ONCE
!*** Image-Xchange v1.0 End

The imgxrpt.inc file has a date/time of 4/25/2003 10:08AM and a file size of 5,103 bytes.

The filepath.inc file has a date/time of 8/14/2002 7:43AM and a file size of 1,572 bytes.
Eric Bucher
Prelude Software Inc

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Mon Feb 07, 2005 10:25 pm

imgxrpt.inc should have an "INCLUDE('imgxtool.inc'),ONCE" statement around line 10. It requires it for the ImageSDKTools class.

Also, imgxrpt.inc should have a line: "ImageXReportClass CLASS,TYPE,MODULE('imgxrpt.clw'),LINK('imgxrpt.clw')" that references the companion clw file for the class. Likewise, imgxtool.inc has the line "ImageSDKTools CLASS,TYPE,MODULE('imgxtool.clw'),LINK('imgxtool.clw')" which references its companion imgxtool.clw file.

All four of these files MUST be in your 3rdparty\libsrc folder:

imgxrpt.inc
imgxrpt.clw
imgxtool.inc
imgxtool.clw


or the program cannot compile. I need the date/time and filesize of all four files.

Thanks!
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Post by ebucher » Mon Feb 07, 2005 10:50 pm

Sorry about that.

Here are the date/time and file sizes:

imgxrpt.inc 4/25/2003 10:08AM 5,103 bytes
imgxrpt.clw 4/26/2003 6:10AM 27,598 bytes
imgxtool.inc 4/25/2003 10:39PM 17,563 bytes
imgxtool.clw 4/25/2003 10:39PM 78,641 bytes
Eric Bucher
Prelude Software Inc

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Tue Feb 08, 2005 1:11 pm

Hi Eric!

The files are a bit dated, but I found the cause of the problem I think. I was using NEW() not followed by DISPOSE() so there was a resource leak. Sorry about that. :oops:

I am attaching the latest imgxtool.inc and .clw files. WARNING: they may not work correctly depending on the rest of the files, but I am sending a set on to John to update the current Image-XChange. If you have compile problems then I suggest downloading the latest version. :)
Attachments
ImgXTool.zip
imgxtool.inc
imgxtool.clw
after correcting a NEW/DISPOSE issue
(19.23 KiB) Downloaded 316 times
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Feb 08, 2005 1:36 pm

Hi Eric,

If you do have problems - please email upgrades@tracker-software.com with your purchase info as V1 is no longer available direct from our web site - in preperation for the V3 release (already released for non-Clarion users) - Craig is working on the 'Clarionisation as we 'speak'

V3 is a free upgrade for all V1 users (V2 was an internal build only)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Post by ebucher » Tue Feb 08, 2005 1:48 pm

Thank you very much. I really appreciate the excellent support you provide.

I load this, test it here and then send it to my client for testing.
Eric Bucher
Prelude Software Inc

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Feb 08, 2005 5:04 pm

Pleasure Eric.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

ebucher
User
Posts: 16
Joined: Wed Feb 02, 2005 3:21 pm
Location: Natick, MA
Contact:

Post by ebucher » Wed Feb 09, 2005 5:39 pm

Unfortunately, things went from bad to worse at the client site. Now none of the image files are generated. We are still getting a successful return code from the .generate function, but no files are actually created. And, as before, it works fine here so I cannot recreate the problem.

I have attached two files: the code to generate the image and directory listings of the .clw and .inc files and the .dll files.
Attachments
IMAGECOD.ZIP
(442 Bytes) Downloaded 315 times
IMAGEFIL.ZIP
(25.43 KiB) Downloaded 274 times
Eric Bucher
Prelude Software Inc

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Wed Feb 09, 2005 11:05 pm

Hi Eric!

We have resolved the memory leak problem and this seems to be a different problem altogether. We are having no problems creating files here either.

I am attaching the "latest" DLL's from that particular set as I noted one or two seemed to be less than current, and I have also included the Clarion LIB files for the two major dlls.

I think the current problem may be a "timing issue." This is a suggestion ONLY. I do not guarantee it will cure your problem, but I think it might. When you build the qTIFF, do not simply point the qTIFF entry at an existing PrintPreviewQueue entry, but use the COPY() command to make a copy of the wmf file that the PrintPreviewQueue is pointing to, then point the qTIFF at the copied file. If there's a timing issue between the Report Engine and the TIFF generation then this should remove it.
Attachments
ImageXCdlls.zip
Latest dlls and lib files
(322.29 KiB) Downloaded 303 times
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply