From: David B. <boily@DMS.UMontreal.CA> - 1999-01-31 06:49:26
|
I just wrote my map editor and to save a map which is a 400x400 array of 3 bytes structs, I do this : void save(MAP map[][MAP_SIZE], char *file) { PACKFILE *to_save; strcpy(file, "c:/dave/prog/projects/djgpp/zoltrax/src/"); if (file_select("save as :", file, "dat")) { if((to_save = pack_fopen(file, "w"))) { pack_fwrite(map, sizeof(MAP)*MAP_SIZE*MAP_SIZE, to_save); pack_fclose(to_save); } else alert("error saving file", "", "", "ok", NULL, KEY_ENTER, 0); } } but it crashes every time (I get allegro shut down) I tried with FILE, fopen, fwrite and fclose but I get the same result. Here's what I get : Shutting down Allegro Exiting due to signal SIGSEGV Stack Fault at eip=0003a298 eax=0000000e ebx=001d00b7 ecx=00000001 edx=00038116 esi=00000014 edi=00001807 ebp=00000007 esp=00000003 program=C:\DAVE\PROG\PROJECTS\DJGPP\ZOLTRAX\MAPEDIT\MA PEDIT.EXE cs: sel=00af base=84292000 limit=fe6a5fff ds: sel=00b7 base=84292000 limit=fe6a5fff es: sel=00b7 base=84292000 limit=fe6a5fff fs: sel=00c7 base=00000000 limit=0010ffff gs: sel=00c7 base=00000000 limit=0010ffff ss: sel=00b7 base=84292000 limit=fe6a5fff App stack: [001d0a18..000d0a18] Exceptn stack: [000d08f8..000ce9b8] Call frame traceback EIPs: 0x0003a298 just as I save, the strange thing is that there is a file written on my drive (the size seems ok). any help would be appreciated thanx Dave >From <all...@ma...> Sat Jan 30 23:10:02 1999 Received: from bretweir.total.net [205.236.175.106] by mail.canvaslink.com with ESMTP (SMTPD32-4.06) id A7983760128; Sat, 30 Jan 1999 23:10:00 DT Received: from localhost.localdomain (ppp-annex-0764.mtl.total.net [205.205.162.218]) by bretweir.total.net (8.9.1/8.8.5) with SMTP id XAA26442; Sat, 30 Jan 1999 23:09:42 -0500 (EST) From: Krastazor Latrus <al...@to...> To: al...@ma..., David Boily <boily@DMS.UMontreal.CA>, al...@ca... Subject: Re: [AL] file problems Date: Sat, 30 Jan 1999 23:08:39 -0500 X-Mailer: KMail [version 1.0.14] Content-Type: text/plain References: <199...@le...> MIME-Version: 1.0 Message-Id: <99013023095500.01927@localhost.localdomain> Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by bretweir.total.net id XAA26442 Precedence: bulk Sender: all...@ma... Reply-To: al...@ma... X-UIDL: 905450786 Status: O Content-Length: 1643 Lines: 56 Vous =EAtes un cr=E9tin! Voil=E0 pourquoi =E7a ne fonctionne pas. Ardy are are! On Sat, 30 Jan 1999, David Boily wrote: >I just wrote my map editor and to save a map >which is a 400x400 array of 3 bytes structs,=20 >I do this : > >void save(MAP map[][MAP_SIZE], char *file) >{ > PACKFILE *to_save; > > strcpy(file, "c:/dave/prog/projects/djgpp/zoltrax/src/"); > > if (file_select("save as :", file, "dat")) > { > if((to_save =3D pack_fopen(file, "w"))) > { =20 > pack_fwrite(map, sizeof(MAP)*MAP_SIZE*MAP_SIZE, to_save); > pack_fclose(to_save); > } > else alert("error saving file", "", "", "ok", NULL, KEY_ENTER, 0); > } >} =20 > >but it crashes every time (I get allegro shut down) >I tried with FILE, fopen, fwrite and fclose but >I get the same result. > >Here's what I get : > >Shutting down Allegro >Exiting due to signal SIGSEGV >Stack Fault at eip=3D0003a298 >eax=3D0000000e ebx=3D001d00b7 ecx=3D00000001 edx=3D00038116 esi=3D000000= 14 edi=3D00001807 >ebp=3D00000007 esp=3D00000003 program=3DC:\DAVE\PROG\PROJECTS\DJGPP\ZOLT= RAX\MAPEDIT\MA >PEDIT.EXE >cs: sel=3D00af base=3D84292000 limit=3Dfe6a5fff >ds: sel=3D00b7 base=3D84292000 limit=3Dfe6a5fff >es: sel=3D00b7 base=3D84292000 limit=3Dfe6a5fff >fs: sel=3D00c7 base=3D00000000 limit=3D0010ffff >gs: sel=3D00c7 base=3D00000000 limit=3D0010ffff >ss: sel=3D00b7 base=3D84292000 limit=3Dfe6a5fff >App stack: [001d0a18..000d0a18] Exceptn stack: [000d08f8..000ce9b8] > >Call frame traceback EIPs: > 0x0003a298 > >just as I save, the strange thing is that there is >a file written on my drive (the size seems ok). > >any help would be appreciated >thanx >Dave >From <all...@ma...> Sun Jan 31 00:06:04 1999 Received: from mail.rdc1.on.home.com [24.2.9.66] by mail.canvaslink.com with ESMTP (SMTPD32-4.06) id A4B887D0152; Sun, 31 Jan 1999 00:06:00 DT Received: from cr299797-a ([24.112.0.39]) by mail.rdc1.on.home.com (InterMail v4.00.03 201-229-104) with SMTP id <19990131050553.CAS14711.mail.rdc1.on.home.com@cr299797-a> for <al...@ma...>; Sat, 30 Jan 1999 21:05:53 -0800 Message-ID: <001401be4cd7$b67bd140$270...@cr...> From: "Fire Dragon" <al...@ho...> To: <al...@ma...> Subject: Re: [AL] sound card drivers Date: Sun, 31 Jan 1999 00:08:17 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Precedence: bulk Sender: all...@ma... Reply-To: al...@ma... X-UIDL: 905450787 Status: O Content-Length: 1238 Lines: 30 -----Original Message----- From: Russ Gibson <ru...@rn...> To: al...@ma... <al...@ma...> Date: Saturday, January 30, 1999 7:46 PM Subject: Re: [AL] sound card drivers >Fire Dragon <al...@ho...> wrote: >>I was looking at my SB Live and discovered it can use a custom ammount of >>memory (using system RAM) for MIDI Sound Fonts. I was wondering if this >is >>possible on other cards too. Also are there any sound fonts of 16Mb or >>more? The SB Live only shipped with 2,4 & 8 Mb ones. > > >Creative is releasing a bunch (like 500 or so...) of free ones over the >next several week - but I believe they are all just a few megs. > >BTW, the SB Live is *limited* to 32 Megs of system RAM for its soundfonts. Ummm, I just tested that and on my system the slider goes up to 47.50 Mb (out of 96Mb RAM). >Take a look at support.soundblaster.com to get all those specs... to bad >they didn't bother to put the live technical spec on ther too :-) Now that would be good! We could make sure that at least on SB Live the MIDI music sounds like it should (by uploading the right soundfont.). I d/l-ed that 12Mb soundfont Tom mentioned and it's quite an improvment over the 8Mb that came w/ the card. |