gamedevlists-windows Mailing List for gamedev (Page 20)
Brought to you by:
vexxed72
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(58) |
Nov
(49) |
Dec
(38) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(124) |
Feb
(83) |
Mar
(17) |
Apr
(37) |
May
(12) |
Jun
(20) |
Jul
(47) |
Aug
(74) |
Sep
(62) |
Oct
(72) |
Nov
(54) |
Dec
(13) |
2003 |
Jan
(36) |
Feb
(8) |
Mar
(38) |
Apr
(3) |
May
(6) |
Jun
(133) |
Jul
(20) |
Aug
(18) |
Sep
(12) |
Oct
(4) |
Nov
(28) |
Dec
(36) |
2004 |
Jan
(22) |
Feb
(51) |
Mar
(28) |
Apr
(9) |
May
(20) |
Jun
(9) |
Jul
(37) |
Aug
(20) |
Sep
(23) |
Oct
(15) |
Nov
(23) |
Dec
(27) |
2005 |
Jan
(22) |
Feb
(20) |
Mar
(5) |
Apr
(14) |
May
(10) |
Jun
|
Jul
(6) |
Aug
(6) |
Sep
|
Oct
(12) |
Nov
(1) |
Dec
|
2006 |
Jan
(18) |
Feb
(4) |
Mar
(3) |
Apr
(6) |
May
(4) |
Jun
(3) |
Jul
(16) |
Aug
(40) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
(2) |
2007 |
Jan
(5) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(13) |
Jun
|
Jul
(26) |
Aug
(3) |
Sep
(10) |
Oct
|
Nov
(4) |
Dec
(5) |
2008 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: tweety <mi...@sy...> - 2004-03-14 04:02:35
|
Ok, I'll try it. Thanks. By the way, I did it in w98/me a long time ago, it just crashes on xp... :) You know, I find really sad that there's a function in *foxpro* to find the cluster size of a drive and there's not ONE thing in the whole windows 32 api to return the cluster size reliably in all operating systems... Maybe longhorn?... ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Simon O'Connor Sent: March 13, 2004 5:06 PM To: gam...@li... Subject: RE: [GD-Windows] retrieving the cluster size on xp Hi Tweety, GetDiskFreeSpace() is supported on Windows XP, Windows 2000, Windows NT, Windows Me, Windows 98, Windows 95, and Windows Server 2003... My comments about 9x were just addressing your preference for a portable method. Cheers, Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > tweety > Sent: 13 March 2004 21:55 > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > I specified in the subject that I'm interested in finding out the > cluster size (it's not a hint, but not partitionmagic, I'm just trying > to find out the waste of space on my drive) on *xp*, not 9x/me. And > I'd really, REALLY, REEEALY preffer not to go to the ddk... > > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 > > > > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Simon O'Connor > Sent: March 13, 2004 4:42 PM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > > Hi Tweety, > > > You can use GetDiskFreeSpace() to find the number of sectors per > cluster and the number of bytes per sector so simply multiply them to > find the size of a cluster. > > > The docs for GetDiskFreeSpace() do mention that the returned sectors > per cluster value can be inaccurate under Windows 9x/ME for drives > with more than 64 sectors per cluster (the 80Gb drive in this machine > only has 8 per cluster so it might be a fairly unusual case). > > This is probably only an issue for you if your application needs to > use this for something more than a "hint" (e.g. if you're writing > something like PartitionMagic etc). If you do need the totally > accurate value, you could obtain the DDK and take a look at the > Win9x/Me specific FS_GetDiskInfo() function. > > > Cheers, > > Simon O'Connor > Programmer @ Acclaim > & Microsoft DirectX MVP > > > ________________________________ > > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > tweety > Sent: 11 March 2004 23:39 > To: gam...@li... > Subject: [GD-Windows] retrieving the cluster size on xp > > > Can someone please tell me how to get the cluster allocation size in > windowsxp? of course, a portable way is the best, but just 2000/xp is > fine. > i searched the internet far and wide and all i could find is how to > find it on fat16/12 partitions and on w95/98/xp. i looked at > deviceiocontrol's functions, but none seems to return the cluster size > or something that i could use... can you tell me? > > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 > > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: > 26/02/2004 > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux > tutorial presented by Daniel Robbins, President and CEO of GenToo > technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free > Linux tutorial presented by Daniel Robbins, President and CEO > of GenToo technologies. Learn everything from fundamentals to > system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Simon O'C. <si...@sc...> - 2004-03-13 22:05:46
|
Hi Tweety, GetDiskFreeSpace() is supported on Windows XP, Windows 2000, Windows NT, Windows Me, Windows 98, Windows 95, and Windows Server 2003... My comments about 9x were just addressing your preference for a portable method. Cheers, Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of tweety > Sent: 13 March 2004 21:55 > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > I specified in the subject that I'm interested in finding out > the cluster size (it's not a hint, but not partitionmagic, > I'm just trying to find out the waste of space on my drive) > on *xp*, not 9x/me. And I'd really, REALLY, REEEALY preffer > not to go to the ddk... > > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 > > > > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of Simon O'Connor > Sent: March 13, 2004 4:42 PM > To: gam...@li... > Subject: RE: [GD-Windows] retrieving the cluster size on xp > > > Hi Tweety, > > > You can use GetDiskFreeSpace() to find the number of sectors > per cluster and the number of bytes per sector so simply > multiply them to find the size of a cluster. > > > The docs for GetDiskFreeSpace() do mention that the returned > sectors per cluster value can be inaccurate under Windows > 9x/ME for drives with more than 64 sectors per cluster (the > 80Gb drive in this machine only has 8 per cluster so it might > be a fairly unusual case). > > This is probably only an issue for you if your application > needs to use this for something more than a "hint" (e.g. if > you're writing something like PartitionMagic etc). If you do > need the totally accurate value, you could obtain the DDK and > take a look at the Win9x/Me specific FS_GetDiskInfo() function. > > > Cheers, > > Simon O'Connor > Programmer @ Acclaim > & Microsoft DirectX MVP > > > ________________________________ > > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of tweety > Sent: 11 March 2004 23:39 > To: gam...@li... > Subject: [GD-Windows] retrieving the cluster size on xp > > > Can someone please tell me how to get the cluster > allocation size in windowsxp? of course, a portable way is > the best, but just 2000/xp is fine. > i searched the internet far and wide and all i could find is > how to find it on fat16/12 partitions and on w95/98/xp. i > looked at deviceiocontrol's functions, but none seems to > return the cluster size or something that i could use... can > you tell me? > > ---------------------------------- > Peace and love, > Tweety > mi...@sy... - twe...@us... > YahooID: tweety_04_01 > > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: > 26/02/2004 > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free > Linux tutorial presented by Daniel Robbins, President and CEO > of GenToo technologies. Learn everything from fundamentals to > system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free > Linux tutorial presented by Daniel Robbins, President and CEO > of GenToo technologies. Learn everything from fundamentals to > system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 |
From: tweety <mi...@sy...> - 2004-03-13 21:55:28
|
I specified in the subject that I'm interested in finding out the cluster size (it's not a hint, but not partitionmagic, I'm just trying to find out the waste of space on my drive) on *xp*, not 9x/me. And I'd really, REALLY, REEEALY preffer not to go to the ddk... ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Simon O'Connor Sent: March 13, 2004 4:42 PM To: gam...@li... Subject: RE: [GD-Windows] retrieving the cluster size on xp Hi Tweety, You can use GetDiskFreeSpace() to find the number of sectors per cluster and the number of bytes per sector so simply multiply them to find the size of a cluster. The docs for GetDiskFreeSpace() do mention that the returned sectors per cluster value can be inaccurate under Windows 9x/ME for drives with more than 64 sectors per cluster (the 80Gb drive in this machine only has 8 per cluster so it might be a fairly unusual case). This is probably only an issue for you if your application needs to use this for something more than a "hint" (e.g. if you're writing something like PartitionMagic etc). If you do need the totally accurate value, you could obtain the DDK and take a look at the Win9x/Me specific FS_GetDiskInfo() function. Cheers, Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP ________________________________ From: gam...@li... [mailto:gam...@li...] On Behalf Of tweety Sent: 11 March 2004 23:39 To: gam...@li... Subject: [GD-Windows] retrieving the cluster size on xp Can someone please tell me how to get the cluster allocation size in windowsxp? of course, a portable way is the best, but just 2000/xp is fine. i searched the internet far and wide and all i could find is how to find it on fat16/12 partitions and on w95/98/xp. i looked at deviceiocontrol's functions, but none seems to return the cluster size or something that i could use... can you tell me? ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Simon O'C. <si...@sc...> - 2004-03-13 21:41:51
|
Hi Tweety, You can use GetDiskFreeSpace() to find the number of sectors per cluster and the number of bytes per sector so simply multiply them to find the size of a cluster. The docs for GetDiskFreeSpace() do mention that the returned sectors per cluster value can be inaccurate under Windows 9x/ME for drives with more than 64 sectors per cluster (the 80Gb drive in this machine only has 8 per cluster so it might be a fairly unusual case). This is probably only an issue for you if your application needs to use this for something more than a "hint" (e.g. if you're writing something like PartitionMagic etc). If you do need the totally accurate value, you could obtain the DDK and take a look at the Win9x/Me specific FS_GetDiskInfo() function. Cheers, Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP ________________________________ From: gam...@li... [mailto:gam...@li...] On Behalf Of tweety Sent: 11 March 2004 23:39 To: gam...@li... Subject: [GD-Windows] retrieving the cluster size on xp Can someone please tell me how to get the cluster allocation size in windowsxp? of course, a portable way is the best, but just 2000/xp is fine. i searched the internet far and wide and all i could find is how to find it on fat16/12 partitions and on w95/98/xp. i looked at deviceiocontrol's functions, but none seems to return the cluster size or something that i could use... can you tell me? ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 |
From: tweety <mi...@sy...> - 2004-03-11 23:49:23
|
Can someone please tell me how to get the cluster allocation size in windowsxp? of course, a portable way is the best, but just 2000/xp is fine. i searched the internet far and wide and all i could find is how to find it on fat16/12 partitions and on w95/98/xp. i looked at deviceiocontrol's functions, but none seems to return the cluster size or something that i could use... can you tell me? ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 |
From: Brett B. <res...@ga...> - 2004-03-08 00:10:44
|
Thanks everybody for the info so far. Here is what I found in the = control word conditions and value: with no error =3D 0x037f where 0x033f =3D (_PC_64 | _EM_INVALID | = _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT | = _EM_DENORMAL) and I can't seem to figure out where the last bit 6 comes = from???? when I get an error =3D 0x007f which means I lost precision down to = _PC_24. That doesn't seem enough to cause the problem though does it? The error gets generated practically anyplace if we try to do math, for = example: out.right.x =3D 1.0f - (yy + zz); where out.right.x is a vector, yy =3D 0.0f and zz =3D 0.0f. thus I'm getting: -nan =3D 1.0f - (0.0f + 0.0f); Given the control word and the line above, is this the expected = behavior? Thanks, Brett ----- Original Message -----=20 From: "Simon O'Connor" <si...@sc...> To: <gam...@li...> Sent: Monday, March 08, 2004 12:17 AM Subject: RE: [GD-Windows] Strange float bug? >=20 > Hi Brett, >=20 >=20 > Personally, almost every NaN I've ever encountered has been due to = something > earlier on such as passing out of domain values to trig functions, = divisions > by zero, square roots of negatives etc.=20 >=20 > However, the fact that resetting the FPU control word to its default = fixes > the problem hints that something else is changing it behind your back. = What > value is the control word set to when the NaN occurs = (_controlfp(0,0))? >=20 >=20 > The "something" is likely to be a third party library... >=20 > ...What immediately springs to mind is if you're using Direct3D and = also > using double precision floating point anywhere (probably unwittingly - = evil > things as you'll know from your PS2 experience :o) >=20 > IDirect3D*::CreateDevice() changes the control word so that the FPU = uses > 24bit mantissa precision (_PC_24) rather than the default 53bit = precision > (_PC_53). It also (re)masks FP exceptions (which is the _controlfp() > default, but it'll re-mask them if you'd unmasked them). It does this = for > performance reasons. >=20 > If you use double precision values in your code with _PC_24 you'll = likely > get denormals, under/over flows and generally unexpected behaviour. If = you > force the control word back to default, you might get unexpected = behaviour > from D3D too. >=20 > If you really need double precision or exceptions unmasked, you can = pass the > D3DCREATE_FPU_PRESERVE flag to CreateDevice() - it will impact = performance > slightly though since it makes D3D save, change and restore the = control word > for every call that might change the control word. >=20 >=20 > Unmasking FP exceptions can be handy during debugging for trapping = things > like domain errors at source too IMO. >=20 >=20 > Cheers, >=20 > Simon O'Connor > Programmer @ Acclaim > & Microsoft DirectX MVP=20 >=20 >=20 > > -----Original Message----- > > From: gam...@li...=20 > > [mailto:gam...@li...] On=20 > > Behalf Of Brett Bibby > > Sent: 07 March 2004 13:39 > > To: Gam...@li... > > Subject: [GD-Windows] Strange float bug? > >=20 > > We have been tracking down the wierdest bug for several days.=20 > > Our code was crashing randomly and then we finally found a=20 > > repeatable case where an assert on an identity matrix when we=20 > > check the orthonormalness of it and we chanced upon a line of=20 > > code that returned -nan that was simply x =3D (1.0f - (a + b)).=20 > > Anyway, I suddenly remembered a GDC talk about Windows=20 > > denormals, did a quick google and pasted a _controlfp(=20 > > _CW_DEFAULT, 0xfffff ) into our code and presto it now works. > >=20 > > We make games for PS2 and GCN and are Windows amateurs, but I=20 > > hate the idea of not understanding what went wrong and how to=20 > > properly handle this. Has anybody ever encountered something=20 > > like this before? > >=20 > > Brett > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free=20 > > Linux tutorial presented by Daniel Robbins, President and CEO=20 > > of GenToo technologies. Learn everything from fundamentals to=20 > > system = administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_idU5 > >=20 > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > > =20 > >=20 >=20 > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > =20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Daniel V. <vo...@ep...> - 2004-03-07 19:42:58
|
> D3DCREATE_FPU_PRESERVE flag to CreateDevice() - it will impact performance > slightly though since it makes D3D save, change and restore the control word > for every call that might change the control word. Does anyone have any horror stories of this noticeably affecting performance? We've been using this flag for years and never noticed a measurable performance difference. > > We make games for PS2 and GCN and are Windows amateurs, but I > > hate the idea of not understanding what went wrong and how to > > properly handle this. Has anybody ever encountered something > > like this before? We actually just ran into something slightly related the other day. We had some code that did something like Clamp( 0.f / 0.f, 0.f, 1.f ) with the implementation of Clamp being template< class T > inline T Clamp( const T X, const T Min, const T Max ) { return X<Min ? Min : X<Max ? X : Max; } and it was returning 1.f (Max) if being compiled with VS.NET 2003 but 0.f/0.f (X) if you use gcc which was consistent across several versions used for Linux (2.95.3) and Mac (3.something). We ended up just fixing the code instead of looking into what causes the differences in handling QNaNs so I can't provide any further insight. -- Daniel, Epic Games Inc. |
From: Donavon K. <kei...@ea...> - 2004-03-07 19:23:36
|
Sounds like a and/or b is set to an SNaN prior to this line, so you'll want to figure out how that's happening. I'd be willing to bet that you're dereferencing a bad float pointer or indexing outside of a float array, which would explain why the exception has been sporadic. (FPU ops never generate SNaNs.) Denormalized values are a different issue and shouldn't result in a NaN under add and subtract operations. Also note that _controlfp doesn't affect the denormal exception mask on x86. Donavon Keithley > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Brett Bibby > Sent: Sunday, March 07, 2004 7:39 AM > To: Gam...@li... > Subject: [GD-Windows] Strange float bug? >=20 > We have been tracking down the wierdest bug for several days. Our code was > crashing randomly and then we finally found a repeatable case where an > assert on an identity matrix when we check the orthonormalness of it and > we chanced upon a line of code that returned -nan that was simply x = =3D > (1.0f - (a + b)). Anyway, I suddenly remembered a GDC talk about Windows > denormals, did a quick google and pasted a _controlfp( _CW_DEFAULT, > 0xfffff ) into our code and presto it now works. >=20 > We make games for PS2 and GCN and are Windows amateurs, but I hate the > idea of not understanding what went wrong and how to properly handle this. > Has anybody ever encountered something like this before? >=20 > Brett >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Simon O'C. <si...@sc...> - 2004-03-07 16:25:02
|
Hi Brett, Personally, almost every NaN I've ever encountered has been due to = something earlier on such as passing out of domain values to trig functions, = divisions by zero, square roots of negatives etc.=20 However, the fact that resetting the FPU control word to its default = fixes the problem hints that something else is changing it behind your back. = What value is the control word set to when the NaN occurs (_controlfp(0,0))? The "something" is likely to be a third party library... ...What immediately springs to mind is if you're using Direct3D and also using double precision floating point anywhere (probably unwittingly - = evil things as you'll know from your PS2 experience :o) IDirect3D*::CreateDevice() changes the control word so that the FPU uses 24bit mantissa precision (_PC_24) rather than the default 53bit = precision (_PC_53). It also (re)masks FP exceptions (which is the _controlfp() default, but it'll re-mask them if you'd unmasked them). It does this = for performance reasons. If you use double precision values in your code with _PC_24 you'll = likely get denormals, under/over flows and generally unexpected behaviour. If = you force the control word back to default, you might get unexpected = behaviour from D3D too. If you really need double precision or exceptions unmasked, you can pass = the D3DCREATE_FPU_PRESERVE flag to CreateDevice() - it will impact = performance slightly though since it makes D3D save, change and restore the control = word for every call that might change the control word. Unmasking FP exceptions can be handy during debugging for trapping = things like domain errors at source too IMO. Cheers, Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP=20 > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Brett Bibby > Sent: 07 March 2004 13:39 > To: Gam...@li... > Subject: [GD-Windows] Strange float bug? >=20 > We have been tracking down the wierdest bug for several days.=20 > Our code was crashing randomly and then we finally found a=20 > repeatable case where an assert on an identity matrix when we=20 > check the orthonormalness of it and we chanced upon a line of=20 > code that returned -nan that was simply x =3D (1.0f - (a + b)).=20 > Anyway, I suddenly remembered a GDC talk about Windows=20 > denormals, did a quick google and pasted a _controlfp(=20 > _CW_DEFAULT, 0xfffff ) into our code and presto it now works. >=20 > We make games for PS2 and GCN and are Windows amateurs, but I=20 > hate the idea of not understanding what went wrong and how to=20 > properly handle this. Has anybody ever encountered something=20 > like this before? >=20 > Brett >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free=20 > Linux tutorial presented by Daniel Robbins, President and CEO=20 > of GenToo technologies. Learn everything from fundamentals to=20 > system = administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 > =20 >=20 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 =20 |
From: Brett B. <res...@ga...> - 2004-03-07 13:45:12
|
We have been tracking down the wierdest bug for several days. Our code = was crashing randomly and then we finally found a repeatable case where = an assert on an identity matrix when we check the orthonormalness of it = and we chanced upon a line of code that returned -nan that was simply x = =3D (1.0f - (a + b)). Anyway, I suddenly remembered a GDC talk about = Windows denormals, did a quick google and pasted a _controlfp( = _CW_DEFAULT, 0xfffff ) into our code and presto it now works. We make games for PS2 and GCN and are Windows amateurs, but I hate the = idea of not understanding what went wrong and how to properly handle = this. Has anybody ever encountered something like this before? Brett |
From: Jon W. <hp...@mi...> - 2004-03-03 17:24:09
|
Thanks all. The surprising thing is that what I'm doing is almost exactly the same thing as mentioned in the examples: add a modulate(current,diffuse) as the third stage. The other surprising thing is that this works fine on OpenGL (and, in fact, you can enable a large number of general combiners on a GF2 in OpenGL). We're using very current drivers (but we're targeting back to version 28.xx, 'cause that's what Dell shipped for one whole YEAR). Multi-passing really isn't much of an option for us. We're already REALLY tied for CPU, as we assumed hardware transform a long time ago, but the mass market still is stuck in the SuperSavage and i845 era. We also have a physics/networking system which requires a fixed update rate, leaving precious little CPU for graphics on min-spec hardware. If there were something like LockArraysEXT() to magically re-use transformed data for multi-passing, maybe it could be made to work, but something like ProcessVertices() doesn't let use re-use the card-specific set-up (texture interpolation values, etc). Perhaps it gets confused by the LERP triadic in the second stage (which uses TEXTURE|REPLICATE_ALPHA for ARG0). Or perhaps I'm not setting alpha in all three stages (but I think I am). I'll investigate some more, and ask our NVIDIA person. Thanks for the pointers, everyone! Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Daniel Vogel Sent: Wednesday, March 03, 2004 2:02 AM To: gam...@li... Subject: RE: [GD-Windows] Direct3D 8.0 texture stage states Jon, you're best off contacting NVIDIA devrel about the issue as there are only a handful 3 stage setups that work on GeForce 1/2 class hardware. Tom's blog <http://tomsdxfaq.blogspot.com/> has a little blurb on the issue. -- Daniel, Epic Games Inc. > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of Jon Watte > Sent: Tuesday, March 02, 2004 9:19 PM > To: gam...@li... > Subject: [GD-Windows] Direct3D 8.0 texture stage states > > > We're porting an OpenGL renderer to Direct3D 8.0. > > The documentation in concordance with the device caps for a > GeForce2 claim > that you can configure up to 8 texture stage states, but you > can only bind > two textures. We have a specific texturing set-up that in > OpenGL looks like > this: > > Texture0 \ > LERP \ > Texture1 / MODULATE -> done > Diffuse / > > This uses 2 texture environments on OpenGL, but it appears > that DirectX 8 > for fixed-function hardware cannot route two textures to one > texture stage > state. Thus, we want to use three stage states, in the following > configuration: > > Texture0 \ > SELECT1 \ > LERP \ > Texture1 / MODULATE -> done > Diffuse / > > We can get the first two stages to work fine, but as soon as > we turn on the > third stage, the operations from the first two stages > disappear, and we get > solid-white diffuse lit geometry. Note that we get that, even > if we choose > SELECTARG1 for the operation for the third stage state (i e > stage state > index 2). > > We are disabling the stage state with index 3, just to make > sure that we've > gotten nothing wrong. However, no matter what we do, we can't > make this > work. We've tried both debug and release DirectX 9.0b runtime (can't > downgrade on the development machines to try with 8.0 proper). > > Right now, we're feeling pretty glum. Any ideas? > > Cheers, > > / h+ > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Daniel V. <vo...@ep...> - 2004-03-03 10:07:27
|
Jon, you're best off contacting NVIDIA devrel about the issue as there are only a handful 3 stage setups that work on GeForce 1/2 class hardware. Tom's blog <http://tomsdxfaq.blogspot.com/> has a little blurb on the issue. -- Daniel, Epic Games Inc. > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of Jon Watte > Sent: Tuesday, March 02, 2004 9:19 PM > To: gam...@li... > Subject: [GD-Windows] Direct3D 8.0 texture stage states > > > We're porting an OpenGL renderer to Direct3D 8.0. > > The documentation in concordance with the device caps for a > GeForce2 claim > that you can configure up to 8 texture stage states, but you > can only bind > two textures. We have a specific texturing set-up that in > OpenGL looks like > this: > > Texture0 \ > LERP \ > Texture1 / MODULATE -> done > Diffuse / > > This uses 2 texture environments on OpenGL, but it appears > that DirectX 8 > for fixed-function hardware cannot route two textures to one > texture stage > state. Thus, we want to use three stage states, in the following > configuration: > > Texture0 \ > SELECT1 \ > LERP \ > Texture1 / MODULATE -> done > Diffuse / > > We can get the first two stages to work fine, but as soon as > we turn on the > third stage, the operations from the first two stages > disappear, and we get > solid-white diffuse lit geometry. Note that we get that, even > if we choose > SELECTARG1 for the operation for the third stage state (i e > stage state > index 2). > > We are disabling the stage state with index 3, just to make > sure that we've > gotten nothing wrong. However, no matter what we do, we can't > make this > work. We've tried both debug and release DirectX 9.0b runtime (can't > downgrade on the development machines to try with 8.0 proper). > > Right now, we're feeling pretty glum. Any ideas? > > Cheers, > > / h+ > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |
From: Carsten O. <car...@se...> - 2004-03-03 08:41:17
|
This might be obvious, but you _are_ setting up three stages for color _and_ alpha operations, right? It might also be helpful to not only disable stage 3 but to do it all the way up to stage 8. Just in case... Carsten Orthbandt Founder + Development Director SEK SpieleEntwicklungsKombinat GmbH http://www.sek-ost.de Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt =20 > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Jon Watte > Sent: Wednesday, March 03, 2004 3:19 AM > To: gam...@li... > Subject: [GD-Windows] Direct3D 8.0 texture stage states >=20 >=20 >=20 > We're porting an OpenGL renderer to Direct3D 8.0. >=20 > The documentation in concordance with the device caps for a=20 > GeForce2 claim > that you can configure up to 8 texture stage states, but you=20 > can only bind > two textures. We have a specific texturing set-up that in=20 > OpenGL looks like > this: >=20 > Texture0 \ > LERP \ > Texture1 / MODULATE -> done > Diffuse / >=20 > This uses 2 texture environments on OpenGL, but it appears=20 > that DirectX 8 > for fixed-function hardware cannot route two textures to one=20 > texture stage > state. Thus, we want to use three stage states, in the following > configuration: >=20 > Texture0 \ > SELECT1 \ > LERP \ > Texture1 / MODULATE -> done > Diffuse / >=20 > We can get the first two stages to work fine, but as soon as=20 > we turn on the > third stage, the operations from the first two stages=20 > disappear, and we get > solid-white diffuse lit geometry. Note that we get that, even=20 > if we choose > SELECTARG1 for the operation for the third stage state (i e=20 > stage state > index 2). >=20 > We are disabling the stage state with index 3, just to make=20 > sure that we've > gotten nothing wrong. However, no matter what we do, we can't=20 > make this > work. We've tried both debug and release DirectX 9.0b runtime (can't > downgrade on the development machines to try with 8.0 proper). >=20 > Right now, we're feeling pretty glum. Any ideas? >=20 > Cheers, >=20 > / h+ >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 |
From: Jon W. <hp...@mi...> - 2004-03-03 02:27:04
|
We're porting an OpenGL renderer to Direct3D 8.0. The documentation in concordance with the device caps for a GeForce2 claim that you can configure up to 8 texture stage states, but you can only bind two textures. We have a specific texturing set-up that in OpenGL looks like this: Texture0 \ LERP \ Texture1 / MODULATE -> done Diffuse / This uses 2 texture environments on OpenGL, but it appears that DirectX 8 for fixed-function hardware cannot route two textures to one texture stage state. Thus, we want to use three stage states, in the following configuration: Texture0 \ SELECT1 \ LERP \ Texture1 / MODULATE -> done Diffuse / We can get the first two stages to work fine, but as soon as we turn on the third stage, the operations from the first two stages disappear, and we get solid-white diffuse lit geometry. Note that we get that, even if we choose SELECTARG1 for the operation for the third stage state (i e stage state index 2). We are disabling the stage state with index 3, just to make sure that we've gotten nothing wrong. However, no matter what we do, we can't make this work. We've tried both debug and release DirectX 9.0b runtime (can't downgrade on the development machines to try with 8.0 proper). Right now, we're feeling pretty glum. Any ideas? Cheers, / h+ |
From: tweety <mi...@sy...> - 2004-02-19 02:21:39
|
Thanks. I've been looking for the idle event for some time now :) ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 =20 -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Jacobo Rodriguez Sent: February 18, 2004 2:23 AM To: gam...@li... Subject: Re: [GD-Windows] .NET main loop You have an alternative method to do the main loop. You can insert a delegate that executes in the idle time of the form. Here are an example = but it's write on C# (I use C++ managed too, but with opengl instead dx) http://xplsv.com/blogs/devdiary/ To find the section quickly: CTRL + F and search for "static void main" Jacobo Rodr=EDguez Villar Proyectos en desarrollo: http://www.typhoonlabs.com tweety wrote: > Sorry if this is OT, and if it is, please redirect (IIS joke :) ) to=20 > the appropiate list. > =20 > I'm writing a managed dx9 app and, coming from the c++ world (and=20 > seeing the sdk samples), my main loop is: > =20 > MainForm form=3Dnew MainForm(); > engine.Init(form); > while(form.Created) > { > engine.Update(); > engine.Render(); > Application.DoEvents(); > } > engine.Dispose(); > =20 > But I read in some blog that DoEvents is bad because it allocates=20 > ~200bytes per call (kinda a lot), forcing the form class into gen1=20 > garbage collection. > Now I'm asking you: what's the best way to do it? > =20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... <mailto:mi...@sy...> -=20 > twe...@us... > <mailto:twe...@us...> > YahooID: tweety_04_01 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Andras B. <bn...@ma...> - 2004-02-18 09:39:24
|
Ah, finally I've found the problem. Yes, it was an API call in the DLL (SetFilePointerEx) that's only supported on WinXP/2K. Thanks, Andras |
From: Jacobo R. <ffe...@ty...> - 2004-02-18 07:27:49
|
You have an alternative method to do the main loop. You can insert a=20 delegate that executes in the idle time of the form. Here are an example=20 but it's write on C# (I use C++ managed too, but with opengl instead dx) http://xplsv.com/blogs/devdiary/ To find the section quickly: CTRL + F and search for "static void main" Jacobo Rodr=EDguez Villar Proyectos en desarrollo: http://www.typhoonlabs.com tweety wrote: > Sorry if this is OT, and if it is, please redirect (IIS joke :) ) to=20 > the appropiate list. > =20 > I'm writing a managed dx9 app and, coming from the c++ world (and=20 > seeing the sdk samples), my main loop is: > =20 > MainForm form=3Dnew MainForm(); > engine.Init(form); > while(form.Created) > { > engine.Update(); > engine.Render(); > Application.DoEvents(); > } > engine.Dispose(); > =20 > But I read in some blog that DoEvents is bad because it allocates=20 > ~200bytes per call (kinda a lot), forcing the form class into gen1=20 > garbage collection. > Now I'm asking you: what's the best way to do it? > =20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... <mailto:mi...@sy...> -=20 > twe...@us...=20 > <mailto:twe...@us...> > YahooID: tweety_04_01 |
From: tweety <mi...@sy...> - 2004-02-18 02:14:25
|
Sorry if this is OT, and if it is, please redirect (IIS joke :) ) to the appropiate list. I'm writing a managed dx9 app and, coming from the c++ world (and seeing the sdk samples), my main loop is: MainForm form=new MainForm(); engine.Init(form); while(form.Created) { engine.Update(); engine.Render(); Application.DoEvents(); } engine.Dispose(); But I read in some blog that DoEvents is bad because it allocates ~200bytes per call (kinda a lot), forcing the form class into gen1 garbage collection. Now I'm asking you: what's the best way to do it? ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 |
From: Andras B. <bn...@ma...> - 2004-02-17 16:23:12
|
Monday, February 16, 2004, 5:29:54 PM, Jon Watte wrote: >> There aren't many reasons why _DllMainCRTStartup (the function called >> before DllMain) would fail, but a few examples would be: > Another would be if the "subsystem" version of the DLL, or one of the DLLs > that it's referencing, is greater than the version of Windows you're running > on. For Windows 98/ME, the "subsystem" version must be 4; on 2k/XP it can be > 5. (Didn't we discuss this just recently?) Yeah, it was me, who asked the question about subsystem versions a couple of days ago, because first I also thought it was something to do with versioning, but since then I've been told that every exec & DLL (including CRT and system stuff) is linked with version 4.0 (except 64 bit programs). Checking the version numbers with DependencyWalker confirms this. Andras |
From: Andras B. <bn...@ma...> - 2004-02-17 16:23:06
|
I've checked this with dumpbin, and it uses the "A" version from everything (eg. CreateFileMappingA), there is no W version present. Thanks, Andras Monday, February 16, 2004, 6:59:09 PM, Phil Teschner wrote: > This was asked before, but I'll just ask it again. Are you absolutely > sure you aren't uising any functions that in any way touch functions > that have unicode equivalents? > Remember that Windows 2K/XP natively support these functions while on > Win9x you need to supply an extra library to get the compatibility. > Furthermore, remember that quite a few of the standard functions have > defines in the headers which select between the non unicode (A at the > end of the function) and unicode (W at the end of the function). > For example there is a CreateWindowA and a CreateWindowW function and > CreateWindow is defined to be one or the other depending on your > settings (whether or not UNICODE is defined or not). > Running dumpbin might show you whether your DLL is indeed expecting > the wide character versions or not. For example > Phil |
From: Phil T. <ph...@mi...> - 2004-02-16 18:02:55
|
This was asked before, but I'll just ask it again. Are you absolutely = sure you aren't uising any functions that in any way touch functions = that have unicode equivalents? =20 Remember that Windows 2K/XP natively support these functions while on = Win9x you need to supply an extra library to get the compatibility. =20 Furthermore, remember that quite a few of the standard functions have = defines in the headers which select between the non unicode (A at the = end of the function) and unicode (W at the end of the function). =20 For example there is a CreateWindowA and a CreateWindowW function and = CreateWindow is defined to be one or the other depending on your = settings (whether or not UNICODE is defined or not). =20 Running dumpbin might show you whether your DLL is indeed expecting the = wide character versions or not. For example=20 =20 Phil ________________________________ From: gam...@li... on behalf of = Andras Balogh Sent: Mon 2/16/2004 01:55 To: gam...@li... Subject: Re: [GD-Windows] DLL initialization (was: Loading new DLLs on = old Windows) Hi Simon, > If the entry point (_DllMainCRTStartup, DllMain or a custom entry = point) > returns FALSE, LoadLibrary() will return the error you're getting > (ERROR_DLL_INIT_FAILED). Yeah, I know. I've already included a fake DllMain that just returns = TRUE, but the result is the same. I guess this means that it fails in _DllMainCRTStartup. > There aren't many reasons why _DllMainCRTStartup (the function called = before > DllMain) would fail, but a few examples would be: > - memory (HeapAlloc() inside the CRT stuff failing). Well, the logs say that he's got 150MB+ of free memory. > - static/global object creation failing (e.g. out of stack, exceptions = from > constructors etc). There ain't no static objects in my DLL. It shouldn't do anything upon = loading. > - clashes between the version of the C runtime library used by the DLL = and > the client app (pretty rare unless the DLL and client pass CRT objects > between each other). They are dynamically linked to the same CRT (which is installed in the = same directory as the executables + DLLs) > - CRT file handle problems (e.g. if your client app redirected the = standard > CRT handles in a bad way). Don't even know what you're talkin' about :) > - [extremely unlikely, but...] MFC DLLs built with MSVC++ version 4 - = there > were two versions of the 4.2 MFC DLLs that had identical names but = were > slightly different - some apps (mostly OLE heavy ones) where the DLL = used > one version and the client used another would have a few problems. Have not even touched MFC in any way. > Have you done anything at all special with your DLLs? (re-basing, = function > forwarding, delay loading etc) Nope. > I'd still have a DllMain with just a simple "return TRUE;" (and maybe = a > DisableThreadLibraryCalls() for DLL_PROCESS_ATTACH notifications for > performance reasons where relevant) just to be certain I knew what was = being > returned for entry. I've already done that without success... :( > Do all the plugin DLLs you load suffer from the same issue or is it = just > one? - try statically linking the offending DLL and see if the tester = gets > any more specific error message (such as the missing export message = box > you'll get if your DLL requires an OS function only present in a newer > version of Windows). Currently this program only uses one DLL, but I'll create some more = (simple ones), and see if they work or not. Now I'm pretty sure that I'm using something in my DLL, that Win98 doesn't support, just doesn't know what. = :) Thanks for your help, Andras ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 |
From: Jon W. <hp...@mi...> - 2004-02-16 16:36:13
|
> There aren't many reasons why _DllMainCRTStartup (the function called before > DllMain) would fail, but a few examples would be: Another would be if the "subsystem" version of the DLL, or one of the DLLs that it's referencing, is greater than the version of Windows you're running on. For Windows 98/ME, the "subsystem" version must be 4; on 2k/XP it can be 5. (Didn't we discuss this just recently?) Note that I'd suspect the runtime DLLs (version 71) before I'd suspect the actual DLL you built yourself. You can check the subsystem version using DEPENDS.EXE that comes with Visual Studio. Cheers, / h+ |
From: brian s. <pud...@po...> - 2004-02-16 16:01:08
|
On Monday, February 16, 2004, at 01:55 AM, Andras Balogh wrote: > Currently this program only uses one DLL, but I'll create some more > (simple > ones), and see if they work or not. Now I'm pretty sure that I'm using > something in my DLL, that Win98 doesn't support, just doesn't know > what. :) Maybe you should run "dumpbin /imports" on your DLL, and then write some code in your main app to attempt to load each and every one of those imported functions by hand. See which one fails. It's like killing a fly with a rocket launcher, but at this point it seems like you really need to kill that fly :) --brian |
From: Andras B. <bn...@ma...> - 2004-02-16 10:00:00
|
Hi Simon, > If the entry point (_DllMainCRTStartup, DllMain or a custom entry point) > returns FALSE, LoadLibrary() will return the error you're getting > (ERROR_DLL_INIT_FAILED). Yeah, I know. I've already included a fake DllMain that just returns TRUE, but the result is the same. I guess this means that it fails in _DllMainCRTStartup. > There aren't many reasons why _DllMainCRTStartup (the function called before > DllMain) would fail, but a few examples would be: > - memory (HeapAlloc() inside the CRT stuff failing). Well, the logs say that he's got 150MB+ of free memory. > - static/global object creation failing (e.g. out of stack, exceptions from > constructors etc). There ain't no static objects in my DLL. It shouldn't do anything upon loading. > - clashes between the version of the C runtime library used by the DLL and > the client app (pretty rare unless the DLL and client pass CRT objects > between each other). They are dynamically linked to the same CRT (which is installed in the same directory as the executables + DLLs) > - CRT file handle problems (e.g. if your client app redirected the standard > CRT handles in a bad way). Don't even know what you're talkin' about :) > - [extremely unlikely, but...] MFC DLLs built with MSVC++ version 4 - there > were two versions of the 4.2 MFC DLLs that had identical names but were > slightly different - some apps (mostly OLE heavy ones) where the DLL used > one version and the client used another would have a few problems. Have not even touched MFC in any way. > Have you done anything at all special with your DLLs? (re-basing, function > forwarding, delay loading etc) Nope. > I'd still have a DllMain with just a simple "return TRUE;" (and maybe a > DisableThreadLibraryCalls() for DLL_PROCESS_ATTACH notifications for > performance reasons where relevant) just to be certain I knew what was being > returned for entry. I've already done that without success... :( > Do all the plugin DLLs you load suffer from the same issue or is it just > one? - try statically linking the offending DLL and see if the tester gets > any more specific error message (such as the missing export message box > you'll get if your DLL requires an OS function only present in a newer > version of Windows). Currently this program only uses one DLL, but I'll create some more (simple ones), and see if they work or not. Now I'm pretty sure that I'm using something in my DLL, that Win98 doesn't support, just doesn't know what. :) Thanks for your help, Andras |
From: Simon O'C. <si...@sc...> - 2004-02-16 01:51:45
|
Hi Andras, If the entry point (_DllMainCRTStartup, DllMain or a custom entry point) returns FALSE, LoadLibrary() will return the error you're getting (ERROR_DLL_INIT_FAILED). There aren't many reasons why _DllMainCRTStartup (the function called before DllMain) would fail, but a few examples would be: - memory (HeapAlloc() inside the CRT stuff failing). - static/global object creation failing (e.g. out of stack, exceptions from constructors etc). - clashes between the version of the C runtime library used by the DLL and the client app (pretty rare unless the DLL and client pass CRT objects between each other). - CRT file handle problems (e.g. if your client app redirected the standard CRT handles in a bad way). - [extremely unlikely, but...] MFC DLLs built with MSVC++ version 4 - there were two versions of the 4.2 MFC DLLs that had identical names but were slightly different - some apps (mostly OLE heavy ones) where the DLL used one version and the client used another would have a few problems. Have you done anything at all special with your DLLs? (re-basing, function forwarding, delay loading etc) I'd still have a DllMain with just a simple "return TRUE;" (and maybe a DisableThreadLibraryCalls() for DLL_PROCESS_ATTACH notifications for performance reasons where relevant) just to be certain I knew what was being returned for entry. Do all the plugin DLLs you load suffer from the same issue or is it just one? - try statically linking the offending DLL and see if the tester gets any more specific error message (such as the missing export message box you'll get if your DLL requires an OS function only present in a newer version of Windows). Cheers, Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of Andras Balogh > Sent: 12 February 2004 12:21 > To: gam...@li... > Subject: [GD-Windows] DLL initialization (was: Loading new > DLLs on old Windows) > > My program supports dynamic loading of plugins. Every plugin > represents a class, and resides in a separate DLL. Instead of > exporting the class itself, I only export a factory function > and provide a header file with the declaration of the pure > virtual base class (ie. the interface). At runtime, I load > the DLL and call the exported factory function, which > instances an object and returns a pointer to the base class. > > This architecture works like a charm on most machines. > However, on some configurations, my program reports the > following: "Error Code > 1114: A dynamic link library (DLL) initialization routine failed." > > But I have no clue why. Do I have to use DllMain? MSDN says > it's only an optional entrypoint.. My DLLs are dynamically > linked to the C/CPP run-time libraries. > > > Thanks, > > Andras > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with a free > DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.588 / Virus Database: 372 - Release Date: 13/02/2004 |