Illegal Inception

Started by Dualnames, Thu 05/07/2012 15:23:57

Previous topic - Next topic

Dualnames

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x004038E8 ; program pointer is +379, ACI version 3.21.1115, gtags (1,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK
---------------------------


I run into this. This is always the same and it happens randomly when one loads the inventory, I am using direct 3d and AGS 3.2.1, there were some inventory items that had either no sprites (thus a bigbluecup appeared instead) or were 16bit sprites while the game is 32bit. Is there a way to find out the exact line that's causing the crash by those pointers?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Crimson Wizard

#1
Now that we have an engine source this became little easier.
"Program pointer" is a special value that is being set throughout the engine (called our_eip).
our_eip = +379;
eip_guinum = 1; (from gtags)
eip_guiobj = 0; (from gtags)

Code: cpp

GUIMain::draw_at(int xx, int yy)
{
  <...>

  SET_EIP(379)

  for (aa = 0; aa < numobjs; aa++) {
    
    set_eip_guiobj(drawOrder[aa]);

    GUIObject *objToDraw = objs[drawOrder[aa]];

    if ((objToDraw->IsDisabled()) && (gui_disabled_style == GUIDIS_BLACKOUT))
      continue;
    if (!objToDraw->IsVisible())
      continue;

    objToDraw->Draw();

    int selectedColour = 14;

    if (highlightobj == drawOrder[aa]) {
      if (outlineGuiObjects)
        selectedColour = 13;
      wsetcolor(selectedColour);
      draw_blob(objToDraw->x + objToDraw->wid - get_fixed_pixel_size(1) - 1, objToDraw->y);
      draw_blob(objToDraw->x, objToDraw->y + objToDraw->hit - get_fixed_pixel_size(1) - 1);
      draw_blob(objToDraw->x, objToDraw->y);
      draw_blob(objToDraw->x + objToDraw->wid - get_fixed_pixel_size(1) - 1, 
                objToDraw->y + objToDraw->hit - get_fixed_pixel_size(1) - 1);
    }
    if (outlineGuiObjects) {
      int oo;  // draw a dotted outline round all objects
      wsetcolor(selectedColour);
      for (oo = 0; oo < objToDraw->wid; oo+=2) {
        wputpixel(oo + objToDraw->x, objToDraw->y);
        wputpixel(oo + objToDraw->x, objToDraw->y + objToDraw->hit - 1);
      }
      for (oo = 0; oo < objToDraw->hit; oo+=2) {
        wputpixel(objToDraw->x, oo + objToDraw->y);
        wputpixel(objToDraw->x + objToDraw->wid - 1, oo + objToDraw->y);
      }      
    }
  }

  SET_EIP(380)
  <...>
}



BTW, I like how "Illegal Inception" sounds :P.

EDIT: If you can run engine and your game in MSVS debugger, you could find exact point. Also you may give your game to some of the active devs for a test.
EDIT2: I've actually forgot about the dump. I guess it can be used to check the program state at the moment of exception.

SMF spam blocked by CleanTalk