views:

217

answers:

2

The renderer for my game application is not properly resetting when I sometimes lock out of my computer and log back in. The application uses the Gamebryo engine with the CEGUI (Crazy Eddie's GUI) layer on top. When using a DirectX debugger log, I get the following messages when the application fails to reset.

00004805 18156.43750000 [2848] Direct3D9: (ERROR) :The following D3DPOOL_DEFAULT surfaces/buffers/textures still exist 00004806 18156.45117188 [2848]
00004807 18156.89648438 [2848] Direct3D9: (ERROR) : D3DRTYPE_TEXTURE 00004808 18156.90039063 [2848]
00004809 18156.90039063 [2848] Direct3D9: (ERROR) : Memory Address: 0eb59530 lAllocID=54625 dwSize=00000050, (pid=00000b20) 00004810 18156.90429688 [2848]
00004811 18156.90429688 [2848] Direct3D9: (ERROR) : Stack Back Trace 00004812 18156.90625000 [2848]
00004813 18156.90820313 [2848] Direct3D9: (ERROR) : [0] : Address 015C7CE6 00004814 18156.90820313 [2848]
00004815 18156.91015625 [2848] Direct3D9: (ERROR) : [1] : Address 0169BBC3 00004816 18156.91210938 [2848]
00004817 18156.91406250 [2848] Direct3D9: (ERROR) : [2] : Address 015DFAF7 00004818 18156.91601563 [2848]
00004819 18156.91601563 [2848] Direct3D9: (ERROR) : [3] : Address 015DF4A2 00004820 18156.91796875 [2848]
00004821 18156.92187500 [2848] Direct3D9: (ERROR) : [4] : Address 015F4A40 00004822 18156.92382813 [2848]
00004823 18156.92578125 [2848] Direct3D9: (ERROR) : [5] : Address 00728194 00004824 18156.92578125 [2848]
00004825 18156.92773438 [2848] Direct3D9: (ERROR) : [6] : Address 00000000 00004826 18156.92968750 [2848]
00004827 18156.93164063 [2848] Direct3D9: (ERROR) : [7] : Address 00000000 00004828 18156.93164063 [2848]
00004829 18156.93359375 [2848] Direct3D9: (ERROR) : [8] : Address 00000000 00004830 18156.93554688 [2848]
00004831 18156.93945313 [2848] Direct3D9: (ERROR) : [9] : Address 00000000 00004832 18156.93945313 [2848]
00004833 18156.94140625 [2848] Direct3D9: (ERROR) : [10] : Address 00000000 00004834 18156.94335938 [2848]
00004835 18156.94531250 [2848] Direct3D9: (ERROR) : [11] : Address 00000000 00004836 18156.94726563 [2848]
00004837 18156.94726563 [2848] Direct3D9: (ERROR) : [12] : Address 00000000 00004838 18156.94921875 [2848]
00004839 18156.95117188 [2848] Direct3D9: (ERROR) : [13] : Address 00000000 00004840 18156.95312500 [2848]
00004841 18156.95507813 [2848] Direct3D9: (ERROR) : [14] : Address 00000000 00004842 18156.95703125 [2848]
00004843 18156.95898438 [2848] Direct3D9: (ERROR) : [15] : Address 00000000 00004844 18156.96484375 [2848]
00004845 18156.96679688 [2848] Direct3D9: (ERROR) : D3DRTYPE_TEXTURE 00004846 18156.96875000 [2848]
00004847 18156.97070313 [2848] Direct3D9: (ERROR) : Memory Address: 0ebbb4c8 lAllocID=53959 dwSize=00000050, (pid=00000b20) 00004848 18156.97265625 [2848]
00004849 18156.97265625 [2848] Direct3D9: (ERROR) : Stack Back Trace 00004850 18156.97460938 [2848]
00004851 18156.98828125 [2848] Direct3D9: (ERROR) : [0] : Address 015C7CE6 00004852 18156.99023438 [2848]
00004853 18156.99218750 [2848] Direct3D9: (ERROR) : [1] : Address 0169BBC3 00004854 18156.99414063 [2848]
00004855 18156.99414063 [2848] Direct3D9: (ERROR) : [2] : Address 015DFAF7 00004856 18156.99609375 [2848]
00004857 18156.99609375 [2848] Direct3D9: (ERROR) : [3] : Address 015DF4A2 00004858 18157.00390625 [2848]
00004859 18157.00390625 [2848] Direct3D9: (ERROR) : [4] : Address 015F4A40 00004860 18157.00585938 [2848]
00004861 18157.00781250 [2848] Direct3D9: (ERROR) : [5] : Address 00728194 00004862 18157.00976563 [2848]
00004863 18157.01171875 [2848] Direct3D9: (ERROR) : [6] : Address 00000000 00004864 18157.01367188 [2848]
00004865 18157.01367188 [2848] Direct3D9: (ERROR) : [7] : Address 00000000 00004866 18157.01562500 [2848]
00004867 18157.01757813 [2848] Direct3D9: (ERROR) : [8] : Address 00000000 00004868 18157.01953125 [2848]
00004869 18157.02148438 [2848] Direct3D9: (ERROR) : [9] : Address 00000000 00004870 18157.02148438 [2848]
00004871 18157.02343750 [2848] Direct3D9: (ERROR) : [10] : Address 00000000 00004872 18157.02343750 [2848]
00004873 18157.02539063 [2848] Direct3D9: (ERROR) : [11] : Address 00000000 00004874 18157.02734375 [2848]
00004875 18157.02929688 [2848] Direct3D9: (ERROR) : [12] : Address 00000000 00004876 18157.02929688 [2848]
00004877 18157.03125000 [2848] Direct3D9: (ERROR) : [13] : Address 00000000 00004878 18157.03320313 [2848]
00004879 18157.03515625 [2848] Direct3D9: (ERROR) : [14] : Address 00000000 00004880 18157.03710938 [2848]
00004881 18157.03710938 [2848] Direct3D9: (ERROR) : [15] : Address 00000000 00004882 18157.03906250 [2848]
00004883 18157.04101563 [2848] Direct3D9: (ERROR) : D3DRTYPE_TEXTURE 00004884 18157.04296875 [2848]
00004885 18157.04492188 [2848] Direct3D9: (ERROR) : Memory Address: 032965c0 lAllocID=51467 dwSize=00000050, (pid=00000b20) 00004886 18157.04492188 [2848]
00004887 18157.04687500 [2848] Direct3D9: (ERROR) : Stack Back Trace 00004888 18157.04882813 [2848]
00004889 18157.05078125 [2848] Direct3D9: (ERROR) : [0] : Address 015C7CE6 00004890 18157.05273438 [2848]
00004891 18157.05273438 [2848] Direct3D9: (ERROR) : [1] : Address 0169BBC3 00004892 18157.05468750 [2848]
00004893 18157.05468750 [2848] Direct3D9: (ERROR) : [2] : Address 015DFAF7 00004894 18157.05664063 [2848]
00004895 18157.05859375 [2848] Direct3D9: (ERROR) : [3] : Address 015DF4A2 00004896 18157.06054688 [2848]
00004897 18157.06054688 [2848] Direct3D9: (ERROR) : [4] : Address 015F4A40 00004898 18157.06250000 [2848]
00004899 18157.06445313 [2848] Direct3D9: (ERROR) : [5] : Address 00728194 00004900 18157.06640625 [2848]
00004901 18157.06835938 [2848] Direct3D9: (ERROR) : [6] : Address 00000000 00004902 18157.07031250 [2848]
00004903 18157.07031250 [2848] Direct3D9: (ERROR) : [7] : Address 00000000 00004904 18157.07226563 [2848]
00004905 18157.07421875 [2848] Direct3D9: (ERROR) : [8] : Address 00000000 00004906 18157.07617188 [2848]
00004907 18157.07812500 [2848] Direct3D9: (ERROR) : [9] : Address 00000000 00004908 18157.07812500 [2848]
00004909 18157.08007813 [2848] Direct3D9: (ERROR) : [10] : Address 00000000 00004910 18157.08203125 [2848]
00004911 18157.08398438 [2848] Direct3D9: (ERROR) : [11] : Address 00000000 00004912 18157.08593750 [2848]
00004913 18157.08593750 [2848] Direct3D9: (ERROR) : [12] : Address 00000000 00004914 18157.08593750 [2848]
00004915 18157.08789063 [2848] Direct3D9: (ERROR) : [13] : Address 00000000 00004916 18157.08984375 [2848]
00004917 18157.09179688 [2848] Direct3D9: (ERROR) : [14] : Address 00000000 00004918 18157.09375000 [2848]
00004919 18157.09375000 [2848] Direct3D9: (ERROR) : [15] : Address 00000000 00004920 18157.09570313 [2848]
00004921 18157.09765625 [2848] Direct3D9: (ERROR) : D3DRTYPE_TEXTURE 00004922 18157.09960938 [2848]
00004923 18157.10156250 [2848] Direct3D9: (ERROR) : Memory Address: 032904e8 lAllocID=51416 dwSize=00000050, (pid=00000b20) 00004924 18157.10156250 [2848]
00004925 18157.10351563 [2848] Direct3D9: (ERROR) : Stack Back Trace 00004926 18157.10546875 [2848]
00004927 18157.10742188 [2848] Direct3D9: (ERROR) : [0] : Address 015C7CE6 00004928 18157.10937500 [2848]
00004929 18157.10937500 [2848] Direct3D9: (ERROR) : [1] : Address 0169BBC3 00004930 18157.11132813 [2848]
00004931 18157.11328125 [2848] Direct3D9: (ERROR) : [2] : Address 015DFAF7 00004932 18157.11523438 [2848]
00004933 18157.11523438 [2848] Direct3D9: (ERROR) : [3] : Address 015DF4A2 00004934 18157.11718750 [2848]
00004935 18157.11718750 [2848] Direct3D9: (ERROR) : [4] : Address 015F4A40 00004936 18157.11914063 [2848]
00004937 18157.12109375 [2848] Direct3D9: (ERROR) : [5] : Address 00728194 00004938 18157.12304688 [2848]
00004939 18157.12500000 [2848] Direct3D9: (ERROR) : [6] : Address 00000000 00004940 18157.12500000 [2848]
00004941 18157.12695313 [2848] Direct3D9: (ERROR) : [7] : Address 00000000 00004942 18157.12890625 [2848]
00004943 18157.13476563 [2848] Direct3D9: (ERROR) : [8] : Address 00000000 00004944 18157.13476563 [2848]
00004945 18157.13476563 [2848] Direct3D9: (ERROR) : [9] : Address 00000000 00004946 18157.14062500 [2848]
00004947 18157.14062500 [2848] Direct3D9: (ERROR) : [10] : Address 00000000 00004948 18157.14257813 [2848]
00004949 18157.14257813 [2848] Direct3D9: (ERROR) : [11] : Address 00000000 00004950 18157.14453125 [2848]
00004951 18157.14648438 [2848] Direct3D9: (ERROR) : [12] : Address 00000000 00004952 18157.14843750 [2848]
00004953 18157.15039063 [2848] Direct3D9: (ERROR) : [13] : Address 00000000 00004954 18157.15039063 [2848]
00004955 18157.15234375 [2848] Direct3D9: (ERROR) : [14] : Address 00000000 00004956 18157.15429688 [2848]
00004957 18157.15429688 [2848] Direct3D9: (ERROR) : [15] : Address 00000000 00004958 18157.15625000 [2848]
00004959 18157.15820313 [2848] Direct3D9: (ERROR) : D3DRTYPE_TEXTURE 00004960 18157.15820313 [2848]
00004961 18157.16015625 [2848] Direct3D9: (ERROR) : Memory Address: 048cb8b0 lAllocID=51174 dwSize=00000050, (pid=00000b20) 00004962 18157.16210938 [2848]
00004963 18157.16406250 [2848] Direct3D9: (ERROR) : Stack Back Trace 00004964 18157.16601563 [2848]
00004965 18157.16601563 [2848] Direct3D9: (ERROR) : [0] : Address 015C7CE6 00004966 18157.16796875 [2848]
00004967 18157.16992188 [2848] Direct3D9: (ERROR) : [1] : Address 0169BBC3 00004968 18157.17187500 [2848]
00004969 18157.17382813 [2848] Direct3D9: (ERROR) : [2] : Address 015DFAF7 00004970 18157.17382813 [2848]
00004971 18157.17578125 [2848] Direct3D9: (ERROR) : [3] : Address 015DF4A2 00004972 18157.17773438 [2848]
00004973 18157.17968750 [2848] Direct3D9: (ERROR) : [4] : Address 015F4A40 00004974 18157.18164063 [2848]
00004975 18157.18164063 [2848] Direct3D9: (ERROR) : [5] : Address 00728194 00004976 18157.18164063 [2848]
00004977 18157.18359375 [2848] Direct3D9: (ERROR) : [6] : Address 00000000 00004978 18157.18554688 [2848]
00004979 18157.18750000 [2848] Direct3D9: (ERROR) : [7] : Address 00000000 00004980 18157.18945313 [2848]
00004981 18157.19140625 [2848] Direct3D9: (ERROR) : [8] : Address 00000000 00004982 18157.19140625 [2848]
00004983 18157.19335938 [2848] Direct3D9: (ERROR) : [9] : Address 00000000 00004984 18157.19531250 [2848]
00004985 18157.19726563 [2848] Direct3D9: (ERROR) : [10] : Address 00000000 00004986 18157.19921875 [2848]
00004987 18157.19921875 [2848] Direct3D9: (ERROR) : [11] : Address 00000000 00004988 18157.20117188 [2848]
00004989 18157.20312500 [2848] Direct3D9: (ERROR) : [12] : Address 00000000 00004990 18157.20507813 [2848]
00004991 18157.20703125 [2848] Direct3D9: (ERROR) : [13] : Address 00000000 00004992 18157.20703125 [2848]
00004993 18157.20703125 [2848] Direct3D9: (ERROR) : [14] : Address 00000000 00004994 18157.20703125 [2848]
00004995 18157.20703125 [2848] Direct3D9: (ERROR) : [15] : Address 00000000

It looks like certain D3D textures are not being properly released prior to resetting, which is causing the Gamebryo renderer to fail to reset. What is the best solution to determine which resource is not being released?

+2  A: 

Maintaining a database of all D3DPOOL_DEFAULT resources and releasing/recovering them upon device lost is a job for the rendering engine, Gamebryo in your case - I'd guess it's an engine problem (device resetting is always a bit tricky) and not necessarily your fault.

What you could do is

lAllocID=54625

take the ID, fire DirectX control panel, enable debug runtime, set warning level to high and enter the ID into the 'break on allocId' field. This raises a breakpoint as soon as the resource is allocated during startup.

Alexander Gessler
+1  A: 

Hi, If you submit this question to Emegent Support it should be answered promptly.

Paul Oliver