From: nitehawk91 AT aol DOT com Newsgroups: comp.os.msdos.djgpp Subject: Strange behaviour. Allegro & Cwsdpmi, please help. Date: 7 Apr 1997 16:08:04 GMT Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com Message-ID: <19970407160700.MAA20976@ladder01.news.aol.com> NNTP-Posting-Host: ladder01.news.aol.com Lines: 58 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hello all. I've got a really strange problem with a programm I wrote. I'm using DJGPP v2.01, Allegro 2.2, Win95 & MS-DOS 6.22, CWSDPMI release 3 & PMODE 3.07 Now a drescription of the problem : (see source code below) If I run my program either in a Win95 Dos Box or under DOS 6.22 using PMODETSR, it works fine. If I use cwsdpmi instead of pmode under Dos 6.22 the programm aborts. I get a message like : Allegro shutting down exiting due to SIGSEV...and so on. I tried symify to locate the functions in which the error occours, but I got only Allegro & DJGPP internal functions, and as the programm runs with PMODE I guess the error has to be somewhere in my code. BTW : All other porgrams I wrote not using Allegro work fine with cwsdpmi. Here's the relevant source : I'm working on a ModeX screen with an resoulution of 320x200. The only thing this function has got to do is to fade in a picture. Some variables are not used now, as this function is not complete yet. I left them in the code, as they may concern to the error I recieve. void introduction(void) { BITMAP *Main_Screen; /* = create_bitmap(320,200) DID NOT WORK! I do not know why */ RGB white = {63,63,63}, black = {0,0,0}; PALLETE *Main_Pallete, *Mask; int i=0; Main_Screen = create_bitmap(320,200); clear(Main_Screen); for (i = 0;i < 255;i++) /* Fill a palette with black values */ (*Mask)[i] = black; set_pallete(black_pallete); /* Load a picture into Main_Screen and blit it to the screen */ Main_Screen = load_pcx("picture.pcx", *Main_Pallete); blit(Main_Screen, screen,0,0,0,0,320,200); fade_from(black_pallete,*Main_Pallete,1); /* Free reserved memory */ destroy_bitmap(Main_Screen); } Hope you can help me. I do not know what's going wrong - and I would like to use cwsdpmi. Thanks in advance ! Matthias