Click here to Skip to main content
15,920,111 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: mesh picking using directx and c# .net Pin
selvarajanlatha23-Feb-08 20:19
selvarajanlatha23-Feb-08 20:19 
GeneralRe: mesh picking using directx and c# .net Pin
selvarajanlatha3-Mar-08 21:07
selvarajanlatha3-Mar-08 21:07 
GeneralGetting stream type from FOURCC Pin
Sugantha12-Feb-08 23:57
Sugantha12-Feb-08 23:57 
QuestionGDI+ Ruler problem Pin
22sas12-Feb-08 18:58
professional22sas12-Feb-08 18:58 
GeneralRe: GDI+ Ruler problem Pin
Christian Graus12-Feb-08 19:57
protectorChristian Graus12-Feb-08 19:57 
GeneralNullReferenceException on device.Clear( ... ) [modified] Pin
Gavin Williams11-Feb-08 14:03
Gavin Williams11-Feb-08 14:03 
GeneralRe: NullReferenceException on device.Clear( ... ) Pin
Mark Salsbery12-Feb-08 6:27
Mark Salsbery12-Feb-08 6:27 
GeneralRe: NullReferenceException on device.Clear( ... ) Pin
Gavin Williams13-Feb-08 14:25
Gavin Williams13-Feb-08 14:25 
My debugging skills are probably not very developed, but yes, that's what it looks like to me. Funny thing is, now it doesn't throw that exception in windowed mode, but if i start in fullscreen mode the exception will be thrown. It looks like at the breakpoint (at the vDevice.Clear instruction) -- that's where the yellow arrow is ! -- the device, textures and VertexBuffers are all disposed, as should be the case during termination. But still, the code logic says that the vDevice.Clear instruction wont be reached if vDevice == null.

I now think that the yellow arrow indicates the next instruction to be executed, as indicated by it's tooltip. Though it is the vDevice.Clear() line that is highlighted in yellow and has the Exception Helper attached. I consider the following possibilites :

1. The device is being disposed after the (device != null) test and before the next instruction. That seems ridiculous to me, and would render code logic breakable.

2. The (device != null) test is not working as i expect. Is there something i've forgotten about null comparisons.

3. The device still exists, but it is the device.Clear method that is raising the Exception because although the device exists, it is disposed and has no PresentParams.

Just typing this 3rd option, im thinking that's the case. And I'll try either setting device=null after it is disposed or setting an appState=suspended after device is disposed and test the appState instead.
GeneralRe: NullReferenceException on device.Clear( ... ) Pin
Christian Graus12-Feb-08 19:58
protectorChristian Graus12-Feb-08 19:58 
GeneralRe: NullReferenceException on device.Clear( ... ) Pin
Gavin Williams13-Feb-08 14:30
Gavin Williams13-Feb-08 14:30 
AnswerRe: NullReferenceException on device.Clear( ... ) Pin
Dmitri Nеstеruk28-Feb-08 4:55
Dmitri Nеstеruk28-Feb-08 4:55 
QuestionYCrCb Resultant Image? Pin
jamilkhan00710-Feb-08 21:00
jamilkhan00710-Feb-08 21:00 
AnswerRe: YCrCb Resultant Image? Pin
El Corazon11-Feb-08 4:28
El Corazon11-Feb-08 4:28 
AnswerRe: YCrCb Resultant Image? Pin
Dan18-Feb-08 18:20
Dan18-Feb-08 18:20 
Questionmesh picking using directx with c# .net Pin
selvarajanlatha10-Feb-08 6:31
selvarajanlatha10-Feb-08 6:31 
GeneralRendering/Vectors etc.. Pin
Nevi6-Feb-08 2:30
Nevi6-Feb-08 2:30 
GeneralRe: Rendering/Vectors etc.. Pin
El Corazon6-Feb-08 3:38
El Corazon6-Feb-08 3:38 
GeneralRe: Rendering/Vectors etc.. Pin
Nevi6-Feb-08 3:47
Nevi6-Feb-08 3:47 
GeneralRe: Rendering/Vectors etc.. Pin
El Corazon6-Feb-08 4:58
El Corazon6-Feb-08 4:58 
GeneralRe: Rendering/Vectors etc.. Pin
Jeremy Falcon6-Feb-08 7:10
professionalJeremy Falcon6-Feb-08 7:10 
GeneralRe: Rendering/Vectors etc.. Pin
El Corazon6-Feb-08 7:33
El Corazon6-Feb-08 7:33 
GeneralRe: Rendering/Vectors etc.. Pin
Nevi6-Feb-08 7:39
Nevi6-Feb-08 7:39 
GeneralRe: Rendering/Vectors etc.. Pin
El Corazon6-Feb-08 8:53
El Corazon6-Feb-08 8:53 
GeneralRe: Rendering/Vectors etc.. Pin
Jeremy Falcon6-Feb-08 9:43
professionalJeremy Falcon6-Feb-08 9:43 
GeneralRe: Rendering/Vectors etc.. Pin
El Corazon6-Feb-08 10:04
El Corazon6-Feb-08 10:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.