Author Topic: Out of range  (Read 2992 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
Out of range
« on: May 02, 2012, 02:00:26 PM »
Deleted
« Last Edit: May 05, 2015, 12:02:59 PM by Peter »

Charles Pegge

  • Guest
Re: Out of range
« Reply #1 on: May 02, 2012, 04:14:40 PM »
Hi Peter,

You don't give away many clues :) but I eventually found a problem, which was related to a byte accumulator overflow. I have fixed this bug by enforcing a full width accumulator. I can only assume this was what triggered the error in your software.

It has been lurking in the woodwork for a long time, well before the 2012 Oxygens.

I need to test this fix with all the programs. Will post ASAP.

Charles
« Last Edit: May 02, 2012, 07:40:26 PM by Charles Pegge »

Charles Pegge

  • Guest
Re: Out of range
« Reply #2 on: May 03, 2012, 04:23:58 AM »
Answer: 2570

Next bug please :)


ps: oxygen.zip now removed
« Last Edit: May 04, 2012, 01:33:23 PM by Charles Pegge »

Charles Pegge

  • Guest
Re: Out of range
« Reply #3 on: May 03, 2012, 07:15:46 AM »
Hi Peter, just fix this line at the top of the prog.

int a[2] => (1, 2)

Charles Pegge

  • Guest
Re: Out of range
« Reply #4 on: May 03, 2012, 07:57:53 AM »
Your UFO demo works fine Peter, but crashes when terminated. What is your termination procedure for Opengl?

Charles Pegge

  • Guest
Re: Out of range
« Reply #5 on: May 03, 2012, 12:24:40 PM »
That one terminated without crashing, though I think Gl resources should be deleted before releasing the device context

Here is my termination sequence in winmain, after the message loop : (projects/OpenGLGUI/Openglview.inc)

Code: [Select]

while GetMessage @wm,0,0,0
    TranslateMessage @wm
    DispatchMessage @wm
  wend
  '
  glDeleteTextures( 32, texn )
  glDeleteLists drawing_list,ListCount
  glDeleteLists 1000, 255 ' font
  '
  wglMakeCurrent hDC, NULL
  wglDeleteContext hRC
  ReleaseDC hWnd,hDC

  #ifdef GDIplus
  GdiplusShutdown token
  #endif

  function=wm.wparam

  end function ' end of WinMain

Program objects and other resources are released after this.

Charles

PS: if you are using OpenGl declarations (not low level binding) then
FreeLibrary OpenGl
should not be used. Oxygen does this later, it its epilog code as with other DLLs.
« Last Edit: May 03, 2012, 12:39:11 PM by Charles Pegge »