Mail Archives: djgpp/2001/06/09/03:45:53

From: vandyrk AT gmx DOT de (Dirk Pawlowski)
Newsgroups: comp.os.msdos.djgpp
Subject: [Allegro] Page fault in my compiled program
Date: 9 Jun 2001 07:32:19 GMT
Lines: 51
Message-ID: <>
NNTP-Posting-Host: (
Mime-Version: 1.0
X-Trace: 992071939 5965285 (16 [88819])
X-Posting-Agent: Hamster/
User-Agent: Xnews/4.05.11
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I am learning c++ and have already worked with gxx and allegro. Normally I 
get no problems by compiling little graphic programs using allegro. But now 
- after a little break of learning - there is a serious problem and I can't 
see any reasons for that. Maybe you can help me.

If I want to compile a program like this (it is only an example):

#include "allegro.h"

int main()
   BITMAP *b;
   set_gfx_mode(GFX_VGA , 640, 480, 0, 0); // no different if I use 
   putpixel(b, 12, 12, 1);
   return 0;

After compiling this program (no errors!!!) I start the exe-File and get 
the following error message:

Shutting down Allegro
Exiting due to signal SIGSEGV
Page fault at eip=00001011, error=0006
eax=00000001 ebx=0000000c ecx=0000d370 edx=00000000 esi=0000000c 
ebp=000ca134 esp=000ca110 program=C:\DJGPP\TEMP\A.EXE
[snip some register values]
App stack: [000ca178..0004a178]  Exceptn stack: [0004a058..00048118]
Call frame traceback EIPs:

If I remove putpixel, nothing will happen. The program works. But if I add 
any graphical function (rect, circle, etc) my compiled program will not 
I'm a little bit confused, since in former times I make everything in the 
same and it worked. And now I always get this error.
I have already read the FAQ, but I find nothing which can explain or solve 
my problem (If I am blind: sorry, but I have really not find anything!)

Thanx for your effort...
Tot ziens
DIE Fussball-Liste... anmelden unter

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019