From: Nicolas Blais Newsgroups: comp.os.msdos.djgpp Subject: Allegro matrix problem now is a djgpp prob Date: Thu, 07 Oct 1999 22:26:44 GMT Organization: Deja.com - Before you buy. Lines: 56 Message-ID: <7tj6mk$e5f$1@nnrp1.deja.com> NNTP-Posting-Host: 142.169.164.28 X-Article-Creation-Date: Thu Oct 07 22:26:44 1999 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98) X-Http-Proxy: 1.1 x29.deja.com:80 (Squid/1.1.22) for client 142.169.164.28 X-MyDeja-Info: XMYDJUIDnicblais To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Well, now allegro doesn't crash anymore, it's DJGPP. Here's the error symified: Shutting down Allegro Exiting due to signal SIGSEGV Page fault at eip=00057ecd, error=0007 eax=000000b7 ebx=00057fe8 ecx=00000010 edx=7f678b89 esi=00057fe8 edi=002e9f58 ebp=00000fbc esp=00000fbc program=C:\DJGPP\PROJECTS\ILLIS\MAIN.EXE cs: sel=00af base=82e7c000 limit=fff4cfff ds: sel=00b7 base=82e7c000 limit=fff4cfff es: sel=00b7 base=82e7c000 limit=fff4cfff fs: sel=00c7 base=00000000 limit=0010ffff gs: sel=00c7 base=00000000 limit=0010ffff ss: sel=029b invalid App stack: [00416000..00396000] Exceptn stack: [000990e4..000971a4] Call frame traceback EIPs: 0x00057ecd ___djgpp_exception_table+281 I have no idead what it means but here's my modified code that makes it crash: where RGB is actually defined as makecol15, res_x is 640 and res_y is 480 and ushort is unsigned short int. PLEASE HELP. If you do, I'm thankful//******START . ushort pix_x; ushort pix_y; ushort color_red; unsigned int matrix[res_x][res_y] = {{0}}; for (unsigned int i = 0; i < (res_x * res_y); i++) { if (keypressed()) break; pix_x = (rand() % res_x); pix_y = (rand() % res_y); if (matrix[pix_x][pix_y] == 1) continue; else matrix[pix_x][pix_y] = 1; color_red = (rand() % 255) + 1; putpixel(screen, pix_x, pix_y, RGB(color_red, 0, 0)); } -- nicblais AT hotmail DOT com Powered by FreeBSD! http://www.freebsd.org Sent via Deja.com http://www.deja.com/ Before you buy.