More Freetype/FTGL trouble
When I was migrating my code to Intel, a couple of the things besides integer divide by zero which bit me were: foo(i++, i++); does not work on Intel, but did actually work on the PPC. I learned that I should not have ever done that anyway. Another thing to watch out for are uninitialized pointers. I am almost always good about initializing to NULL or something meaningful, but while switching to Intel I found a rare few that weren't. I forgot that the PPC automatically initializes variables to zero first, which saved me from the previous mistakes. The Intel is not so forgiving. Texture endian issues turned out to be very simple to fix, and never caused any crashes anyway.
AnotherJake Wrote:I forgot that the PPC automatically initializes variables to zero first, which saved me from the previous mistakes. The Intel is not so forgiving.
It doesn't...
I think that Mac OS X returns zeroed memory from malloc() more often on PowerPC than Intel, but that's nothing to do with the hardware.
It was only a fluke your code worked at all
OneSadCookie Wrote:It doesn't...I meant that whatever allocated the stack frame on the PPC zeroed out the local storage area, which did not happen on the Intel. Admittedly, I don't know how that all works, but it was in a recursive function, so it had to happen a lot.
I think that Mac OS X returns zeroed memory from malloc() more often on PowerPC than Intel, but that's nothing to do with the hardware.
It was only a fluke your code worked at all
And yes, I consider it a fluke too, since, as I noted, I always initialize because you are always to assume garbage in an uninitialized variable. But the fact remains that the code worked solidly with uninitialized pointers across different machines for months without issue. *Something* consistently made those pointers zero on the PPC architecture, and not on the Intel architecture. Fluke or not, that's what happened, and I'm reporting to say that it did. Take it as you will.
The real answer here is that I need to get off my duff and buy an intel mac. I've been waiting, since I'm a 100% laptop guy and the MBP has had so many issues. You know, 1st gen apple products and all.
Unfortunately, I can't find any possible div by zero issues in the method that crashed. And as far as I can tell, I don't have any uninitialized pointers -- I'm very serious about explicitly initializing pointers to NULL since ( unlike ObjC ) C++ doesn't zero out classes on allocation.
My plan is to buy an MBP when the apparent 2nd gen arrives, maybe when they get Core 2 Duo or something. I've got the money put away, I'm just being patient.
Unfortunately, I can't find any possible div by zero issues in the method that crashed. And as far as I can tell, I don't have any uninitialized pointers -- I'm very serious about explicitly initializing pointers to NULL since ( unlike ObjC ) C++ doesn't zero out classes on allocation.
My plan is to buy an MBP when the apparent 2nd gen arrives, maybe when they get Core 2 Duo or something. I've got the money put away, I'm just being patient.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Xcode and FTGL | hiddenspring81 | 2 | 3,598 |
Apr 26, 2010 08:38 PM Last Post: akb825 |
|
| Anyone run into this problem with FTGL? | wadesworld | 1 | 2,545 |
Apr 21, 2009 02:19 PM Last Post: Oddity007 |
|
| FTGL crash when exiting program | Malarkey | 8 | 4,287 |
Mar 27, 2008 03:33 PM Last Post: Malarkey |
|
| Freetype Demo | kodex | 0 | 2,169 |
Mar 6, 2006 10:27 PM Last Post: kodex |
|
| FTGL point size question | TomorrowPlusX | 3 | 3,094 |
Aug 26, 2005 04:56 AM Last Post: TomorrowPlusX |
|

