Exception when printing a VA Report

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Exception when printing a VA Report

Postby Robert Webb » Tue Jul 31, 2007 8:34 am

Our customers frequently get an exception when trying to print from a VA Report Part in our app. This is VisaulAge 6.0.2 running under Windows XP. I've come across posting on the IBM newsgroup that say this problem is due to a missing clks.bmp file, but we verified that file exists and besides that wouldn't explain why the error is intermittant. Any help would be appreciated. Here is a partial stack trace.

SmallInteger(Object)>>#error:
receiver = 0
arg1 = 'Primitive failed in: SmallInteger>>#rem: due to Divide by zero in argument 1'
SmallInteger(Object)>>#primitiveFailed:withArgument:backUp:
receiver = 0
arg1 = 10
arg2 = 1
arg3 = 1
SmallInteger(Object)>>#primitiveFailed
receiver = 0
SmallInteger>>#rem:
receiver = 0
arg1 = 0
SmallInteger(Integer)>>#/
receiver = 0
arg1 = 0
temp1 = nil
temp2 = nil
temp3 = nil
CoImageField>>#resizeProportionalRectangleFromFieldRectangle:
receiver = CoImageField
arg1 = 544 @ 500 corner: 4350 @ 4256
temp1 = 544
temp2 = 500
temp3 = nil
temp4 = 3756
CoImageField>>#targetRectangleFromFieldRectangle:resolution:emulatedResolution:
receiver = CoImageField
arg1 = 544 @ 500 corner: 4350 @ 4256
arg2 = 600 @ 600
arg3 = 600 @ 600
temp1 = 544 @ 500 corner: 4350 @ 4256
CoImageFieldProcessor>>#createProcessedFieldIn:
receiver = a CoImageFieldProcessor
arg1 = 544 @ 500 corner: 4350 @ 4256
temp1 = nil
temp2 = nil
CoImageFieldProcessor>>#basicLayout
receiver = a CoImageFieldProcessor
temp1 = 544
temp2 = 0
temp3 = 3806
temp4 = 3756
temp5 = 544 @ 500 corner: 4350 @ 4256
CoImageFieldProcessor(CoRowElementProcessor)>>#layout
receiver = a CoImageFieldProcessor
temp1 = nil
[] in CoRelativeRowProcessor(CoRowProcessor)>>#layout
receiver = a CoRelativeRowProcessor
temp1 = 500
temp2 = nil
temp3 = nil
temp4 = false
blockarg1 = a CoImageFieldProcessor
OrderedCollection>>#do:
receiver = OrderedCollection(a CoImageFieldProcessor )
arg1 = [] in CoRowProcessor>>#layout
CoRelativeRowProcessor(CoRowProcessor)>>#layout
receiver = a CoRelativeRowProcessor
temp1 = 500
temp2 = nil
temp3 = nil
temp4 = false
[] in CoCompositeProcessor>>#layoutRows
receiver = a CoCompositeProcessor
temp1 = 0
blockarg1 = a CoRelativeRowProcessor
blockarg2 = 1
OrderedCollection>>#doWithIndex:
receiver = OrderedCollection(a CoRelativeRowProcessor )
arg1 = [] in CoCompositeProcessor>>#layoutRows
CoCompositeProcessor>>#layoutRows
receiver = a CoCompositeProcessor
temp1 = 0
CoCompositeProcessor>>#basicLayout
receiver = a CoCompositeProcessor
temp1 = nil
temp2 = 500
temp3 = nil
temp4 = 0
CoCompositeProcessor(CoRowElementProcessor)>>#layout
receiver = a CoCompositeProcessor
temp1 = nil
CoCompositeProcessor>>#layout
receiver = a CoCompositeProcessor
temp1 = nil
CoPrinterDevice(CoPaginatingDevice)>>#processTemplate
receiver = a CoPrinterDevice
temp1 = a CoCompositeProcessor
CoPrinterDevice(CoDrawableDevice)>>#initializeLayout
receiver = a CoPrinterDevice
[] in CoPrinterDevice(CoDrawableDevice)>>#initiateOutput
receiver = a CoPrinterDevice
[] in Process>>#executeBlock:withArguments:
receiver = Process:12339{running,5}
arg1 = [] in CoDrawableDevice>>#initiateOutput
arg2 = ()
Robert Webb
 
Posts: 4
Joined: Fri Jul 27, 2007 7:47 am
Location: Memphis, TN

Postby wembley » Wed Aug 01, 2007 4:31 am

Robert -

The problem with missing the clks.bmp file shows up in a different location (the print previewer), so that is not the problem.

However, the problem does appear to be related to a missing image. Looking at the walkback, I see that the failure occurred while processing a CoImageField. Further, in the #resizeProportionalRectangleFromFieldRectangle: method, tempVars 1, 2, and 4 have valid values. So that leads me to conclude the problem occurs in the line:
Code: Select all
targetWidth := (self imageWidth * targetHeight / self imageHeight) asInteger.

The walkback occurs due to dividing 0 by 0, so both imageWidth and imageHeight must be 0. Looking at the imageWidth and imageHeight methods, I see that they both will answer 0 if the image does not exist.

So, does your customer's report include an image that could be missing?
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby Bob Nemec » Thu Aug 02, 2007 7:14 am

Is is possible that the image is not found because of a change to the default directory? That would explain the intermittent nature of the error: only users that had changed their default directory entry would experience the error.

We had a similar experience with the .tdl file for WkBarGraphWidget. If a user saved a file sometime during their session, the file prompt would remember the file location and that would affect where the .tdl was looked for. The user would then get an error message when they opened the graph widget because the .tdl file was not found.

We fixed it, but this was a long time ago, so I don't have all the details.
Bob Nemec
Northwater Capital
Bob Nemec
[|]
 
Posts: 16
Joined: Mon Oct 16, 2006 5:07 am

Postby Robert Webb » Tue Aug 07, 2007 1:24 pm

The report does contain an image, but it is not a static file. The application populates the report with an image, so the image data must not be populating correctly. We may need some more error handling around this to determine what is causing the failure to populate the image. Thanks for the responses!
Robert Webb
 
Posts: 4
Joined: Fri Jul 27, 2007 7:47 am
Location: Memphis, TN


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest