[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Stack Overflow Error
- To: info mcl <info-mcl@cambridge.apple.com>
- Subject: Stack Overflow Error
- From: Mark Carlotto <Mark_Carlotto@b1mac144.read.tasc.com>
- Date: Thu, Jan 21, 1993 3:48:27 PM
Subject: Time:3:38 PM
OFFICE MEMO Stack Overflow Error Date:1/21/93
Hi,
I am using the following code to display images stored as PICT resources. By
increasing
the size of the rectangle, I'm able to effectively roam and zoom the image. My
problem
is that if I make the rectangle too large (i.e., I attempt to zoom the image
too much),
the system crashes (type 28 stack overflow error). Any suggestions/fixes?
P.S. The same thing happens when I use your code for displaying PICT images.
P.P.S I have tried to increase the sizes of the stack and heap using
make-application
without success.
(defun DISPLAY-IMAGE-RESOURCE (the-window rfile-name-string pict-num
left top right bottom)
(let (string-ptr resrefnum pict-handle)
(setf string-ptr (#_newptr 256))
(%put-string string-ptr rfile-name-string 0)
(setf resrefnum (#_openresfile string-ptr))
(rlet ((r :rect
:topleft (make-point left top)
:bottomright (make-point right bottom)))
(with-focused-view the-window
(window-select the-window)
(#_framerect r)
(setf pict-handle (#_getpicture pict-num))
(#_drawpicture pict-handle r)
(#_closeresfile resrefnum))))
t)
*******************