recreating rendertargets and view-stages

Posted By: Kartoffel

recreating rendertargets and view-stages - 06/22/14 15:51

Okay, sorry for digging this one up again and sorry for posting in here but I still didn't manage to solve my problem that I've posted here.

Originally Posted By: Kartoffel
hey there,

I'm having trouble removing and recreating all the VIEWs and BMAPs in my postprocessing chain.
(needed when changing the resolution or quality settings, for example)

Can anyone show me how to properly do this?

what I'm doing at the moment is this:
I remove all views stages with ptr_remove, release the video memory for every rendertarget with bmap_purge (not sure if this is needed)
and remove the bmaps with ptr_remove. After that I recreate everything.

Doing this I can't see a change in the used memory (debug panel) but after recreating the rendering pipeline for the ~13th time I get this error:

Error E2005: Can't create DirectX texture unnamed

So what exactly am I doing wrong here confused
kind regards, Kartoffel
Posted By: jcl

Re: recreating rendertargets and view-stages - 06/23/14 10:08

It looks like either an unsupported format, or a problem with the video memory. What you're doing seems right, except that you don't need to purge the bmaps because removing them purges them anyway.

Does this happen on different systems or only on one?
Posted By: Kartoffel

Re: recreating rendertargets and view-stages - 06/23/14 15:27

Thanks for your answer!
It has the same effect on different systems.
However, I tried to recreate this problem with a simple example but the error didn't appear.

...so maybe something else is causing this. I'll have a closer look and will post it here when I know more.
Posted By: Superku

Re: recreating rendertargets and view-stages - 09/14/14 18:46

I just got the same error again when switching to a different resolution in my game (this happened before, but it really only happens rarely, the last time maybe more than a year ago - still I'd hate to publish my game with that bug!):

Code:
Log of A8 Engine 8.45.4 run at Sun Sep 14 20:15:01 2014
Felix on Windows NT/2000/XP version 6.1 Build 7601
Options superku.c -eq -nwnd -diag -nx 128 -tu
App: [...]

MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened(c) Conitec - www.3dgamestudio.com
A8 Engine - Pro Edition V8.45.4 - Jan 16 2014
Development version
Registered to: Felix Pohl

DI Microsoft-PC-Joysticktreiber 6 axes 14 buttons initialized
Mouse found
Joystick found
Lautsprecher (SB Recon3D PCIe) opened
AMD Radeon HD 5800 Series pure T&L device 1ff9 detected
D3D device AMD Radeon HD 5800 Series 1ff9 selected.
[...]
LevelReady at 1166.407
menu_clip4.wmv video opened
D3D_Resize Window: 1280x800 failed -> Window: 1x1920x1080x32
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
D3D_DrawPrimitive: D3DERR_INVALIDCALL
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
D3D_DrawPrimitive: D3DERR_INVALIDCALL
D3D_DrawPrimitive: D3DERR_INVALIDCALL
Malfunction W1246: DirectX driver failure: D3DERR_INVALIDCALL
D3D_DrawPrimitive: D3DERR_INVALIDCALL
Malfunction W1246: DirectX driver failure: D3DERR_INVALIDCALL
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
Error E2005: Can't create DirectX texture unnamed
D3D_TexCreate: 8876086a - D3DERR_NOTAVAILABLE
[...]

Posted By: jcl

Re: recreating rendertargets and view-stages - 09/18/14 15:24

Is this reproducible? Does it always happen when playing that video?
Posted By: Superku

Re: recreating rendertargets and view-stages - 09/18/14 17:41

I just wanted to write that it is not reproducible but in fact it is:
It is not related to said or any video played, I've commented/ deactivated that code for now. The issue sadly seems to be a little more complex:

There is a level in my game which has caused problems for quite some time now, that is some entities do not get created successfully it seems, they are invisible and passable (but they are there, for example tested via "while(1) draw_line3d(...)" in those entities' actions). It only happens when you enter one/ some other levels prior to that.
I've thought it could be related to a damaged file but the level only uses models and textures which can be found in many other levels as well.
Then I wrote a function which writes a level protocol which sadly gives erroneous output because of engine_gettaskinfo, as discussed here: http://www.opserver.de/ubb7/ubbthreads.p...true#Post439890
(Btw. the following thread and problem probably is related: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=445593#Post445593 )
Finally, I'm starting to think that the following issue could somehow and magically have an effect on the faulty entity creation, too: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=439415#Post439415

When I enter said level and at least one entity is erroneously invisible, then leave, open the main menu (different level) and change the resolution the DirectX crash from my previous post appears.
EDIT: The DX problem and that (solved) entity problem are unrelated.

Any help would be greatly appreciated - maybe even an inofficial interim version with those two bugs (engine_gettaskinfo + compiler) fixed? Thanks.
Posted By: Superku

Re: recreating rendertargets and view-stages - 09/19/14 15:53

I think I may have found the reason for both the DirectX error and the issue with the disappearing models (finally!).
The DirectX error appeared frequently today (prior to that I changed some stuff here and there, in the code and other content files), and after stripping down some levels (including the problematic one) and some other hub world related stuff I figured I should have a look at the jetpack. I re-saved the model and halved the skin size (thus re-saved the texture, too) and every error now seems to have magically vanished!
However, I fear the cause for the issues seems to lie somewhere else and I have just postponed the next error again (esp. because now using the old texture again does not lead to an error, I may try to use an old model file from a backup and see if the model was the faulty file).

I... I don't understand it, now the DirectX error appears every time again. This sucks.

EDIT2: Crashes after loading an almost empty level (1 block + player character) but doesn't after loading the complete first level. I have no idea how I am supposed to find and fix this issue.

EDIT3: I had low hope but I tested it anyway, it's not PC (config) specific, it crashes on my laptop, too.
Posted By: jcl

Re: recreating rendertargets and view-stages - 09/22/14 11:29

Ok, can you then upload it or send it to Support? If it's reproducible we should be able to determine the reason.
Posted By: Superku

Re: recreating rendertargets and view-stages - 09/22/14 14:56

I have sent the project to the support, so thanks in advance.

Good news: I was able to fix the invisible entities bug after such a long time, it was "simply" some kind of timing error in relation to entity pointer array initialization (and old pointers from previous levels).
Posted By: Superku

Re: recreating rendertargets and view-stages - 10/06/14 17:01

Have you/ the support had time to look at the project already?
Posted By: jcl

Re: recreating rendertargets and view-stages - 10/07/14 12:31

Yes, the problem was reproducible - an attempt to create a texture in a wrong format. According to my colleague it was related to your project, not to Gamestudio. But he planned to look closer into the matter in the next time for identifying the texture in question - he'll contact you when he has found it.
Posted By: Superku

Re: recreating rendertargets and view-stages - 10/07/14 15:39

Thank you for the response and the e-mail, I've responded with an updated main file as requested.
Posted By: Superku

Re: recreating rendertargets and view-stages - 10/10/14 15:43

With the help of the support (thanks a lot!) I was able to find the reason for the DirectX crash and fix the corresponding code. The issue was as follows:

Code:
FONT* my_font = "...";

TEXT* my_text =
{
	font = my_font;
	...
}

void my_font_update()
{
	if(my_font) ptr_remove(my_font);
	my_font = font_create(...);
}



Calling my_font_update() would not result in an immediate crash but let my_text have an invalid font pointer which would lead to erroneous behavior on subsequent video_... calls.
Posted By: FBL

Re: recreating rendertargets and view-stages - 10/10/14 16:31

mean one...
Posted By: PadMalcom

Re: recreating rendertargets and view-stages - 10/10/14 20:55

But this is considered to be a bug not you fault, isn't it?
Posted By: Superku

Re: recreating rendertargets and view-stages - 10/11/14 12:17

A mean one indeed but I don't think this could be considered an engine bug (because the stuff probably only gets delegated to DirectX, here with an invalid pointer). Instead I think this should be mentioned somewhere and somehow in the manual, for example on the ptr_remove page.
© 2024 lite-C Forums