From: manni DOT heumann AT gmx DOT de (Manni Heumann) Newsgroups: comp.os.msdos.djgpp Subject: Re: [Allegro] Page fault in my compiled program Date: 9 Jun 2001 07:49:51 GMT Lines: 32 Message-ID: References: NNTP-Posting-Host: 129.70.164.173 X-Trace: fu-berlin.de 992072991 6282399 129.70.164.173 (16 1428 [54749]) 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 Dirk Pawlowski wrote in message news:Xns90BB60C66B2B6vandyrkgmxde AT user DOT dfncis DOT de: [snip] > #include "allegro.h" > > int main() > { > BITMAP *b; > allegro_init(); > install_keyboard(); > set_gfx_mode(GFX_VGA , 640, 480, 0, 0); // no different > if I use > AUTODETECT > 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 [snip] Read your code before reading the FAQ. You are trying to put a pixel on the BITMAP b. But b is just a pointer, pointing somewhere, to something and nobody knows where. You will have to create that bitmap first (b = create_bitmap (width, height); ). Manni