CompuServe Thread

CopyBits on SE

9 messages in this thread
#163664From: Jody ThreetMar 13, 1994 12:37 PM
I was wondering about how to set the stack size!! Much appreciated, I'll let you know if it works. By the way, is it really important that the number of bytes per row be even (i.e. word aligned) ? Because it didn't complain on most machines I tried when I had an odd number of bytes in a row. I've since changed it so that it's word aligned to try to get it work on the SE and Classic, but was just wondering. Jody
#163733From: Steve StockmanMar 13, 1994 5:42 PM
Jody: >>> By the way, is it really important that the number of bytes per row be even (i.e. word aligned) ? Because it didn't complain on most machines I tried when I had an odd number of bytes in a row. <<< On some machines, it absolutely has to be an even number per row to work. The only exception is when it is one byte per row. On other machines, it may work with an odd number per row, but it is more efficient with even numbers, usually still more efficient if each row begins on a multiple of four. With 68040 machines, it's probably still more efficient on multiples of 16. I don't know about PowerPC. Steve
#163821From: allen joslinMar 14, 1994 6:34 AM
bytes per row? if you mean offscreen stuff, I never wrote that code — just copied it from tech notes & didn't look at it after that. hope that stack size does the trick. if not then I'd say search backwards on the stack from the Point-Of-Failure for something that's trashing the system, when a toolbox call breaks on me it's usually because I messed up something in a routine that executed just before the POF. al;
#163851From: Jody ThreetMar 14, 1994 8:58 AM
Looks like I must have trashed something important earlier. By the way..If you use TCL, I found out that using SetApplSize() isn't enough because the TCL will get confused on stack and heap size. Not sure why, but it cause the heap and stack to collide immediately when I used SetApplSize(). Anyhow TCL has a utility function your supposed to call as the very first line of code called SetMinimumStack (long minstack). But it still dies, so I must be poking into the wrong places with pointers. thanks for the suggestion, Jody :}
#163866From: allen joslinMar 14, 1994 10:48 AM
Jody, Hmmm, <just checking> 1. you're not looking for a PixHandle in a GrafPort (or visa-versa). 2. just before the CopyBits the heap is ok. (app & sys) 3. it's Monday… tell me more about the state-of-affairs just before the CopyBits call. "It'll work, it doesn't have a choice!" Al;
#163918From: Jody ThreetMar 14, 1994 4:38 PM
I fingered it out just a little while ago. 🙂 🙂 Its one of those where you wanna hit yourself, but never considered masicism very fun. I had read a few days ago that you must have an even number of bytes in the bitmap.rowBytes field. So I took care to declare my bitmaps so that rows ended on word boundaries. But I have some other code that crops a bitmap after I'm done putting together what amounts to a collection of smaller bitmaps (font chars, tiff images, etc., this is very portable code). To make a long story short, the cropping routine didn't try to word align the rows, so I would get these weird crashes on 68000 based machines where sometimes it worked and sometimes it didn't. What surprised me was that it would work fine on 68030 machines regardless of the row aligned, but not on any 68000 machines, viz., SEs and old Classics. Anyhow it feels great to move on. And it was a real pain to have to hunt down an SE or Classic every time I thought I found something that MIGHT fix it. Thanks for the input. "I dread the day when they will have a choice, then we'll have to coax 'em into doing what we want." Jody
#163960From: allen joslinMar 14, 1994 8:49 PM
>> 🙂 🙂 YAHOO!! & GREAT!! >> a real pain to have to hunt down an SE or Classic Yeah, finally I just broke down and bought an old Plus. Now at least if I could only get my app to run on it… >> Anyhow it feels great to move on. yeah, I'm really looking forward to seeing the *ss end of my current bug waddling away. >> …they will have a choice… Good One! I like it! Al;
#164079From: Jody ThreetMar 15, 1994 3:01 PM
>> yeah, I'm really looking forward to seeing the *ss end of my >> current bug waddling away. How has yours been misbehaving? I'll offer my two bits of information (sometimes two bits can be the beginning of a lot). Jody
#164108From: allen joslinMar 15, 1994 5:51 PM
It's a MacApp program — you sure you want to get into this? <g> It runs fine on non-68000's but not very well on 68000's. The symptom I've been watching is an inability to list resources w/MacsBug (i.e. rd PICT). I put Debugger() as the first line of code in my main() and it's already doing it!! (only on the Plus, not on the bigger Mac). I've been trying to find out what code runs before main(), and also why the %A5Init segement is greater than 32K (which I think may be part of the problem…) Al;