Welcome, Guest. Please login or register.

Author Topic: Find what is causing GURU 8000003  (Read 10803 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Find what is causing GURU 8000003
« on: March 08, 2012, 11:18:24 PM »
Quote from: bbond007;682987
More interestingly it was able to detect this condition as "trailer trashed". see the "* DisplayBPP" in the AllocVec... I know thats wrong, i just find it strange that it would trash memory. I'd think its simply a waste of memory (MAX_POLY_VERT was already way more than needed) . unless displayBPP was a floating point between 0 and 1... which its not...


   if(areaBuffer = AllocVec(MAX_POLY_VERT * DisplayBPP, MEMF_CLEAR))
   {
      InitArea(&areaInfo, areaBuffer, MAX_POLY_VERT);

This is what InitArea autodoc says:
Quote
This function provides initialization for the vector collection matrix
such that it has a size of (max vectors ).  The size of the region
pointed to by buffer (short pointer) should be five (5) times as large
as maxvectors. This size is in bytes.

The multiplier must be 5. It has nothing to do with display bits per pixel.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Find what is causing GURU 8000003
« Reply #1 on: March 09, 2012, 12:44:59 AM »
Quote from: bbond007;682994
I wonder why 5?
The buffer provided to InitArea is split into two arrays 1) flag table and 2) vector table.

Flag table is byte array, while vector table holds SHORTs (x, y). This gives you the multiplier of 5 (2 * sizeof(SHORT) + sizeof(UBYTE)).

Ellipse consumes two entries, move and draw one, except when closing a polygon, in which case extra entry for the final draw is added. There are also some internal optimization where unnecessary moves are removed.