Old 29th August 2006, 19:11   #1
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
minor set-back

well i went ahead and got a new system to devlop on, and a book on directx and shaders....

heres what i got:
amd64 3000+
pcchips MOBO
gig of ddr2 ram
gforce 7300GS PCI-E
for $250

got it all put together, it even ran on my old install of xp for a while!
was having some problems with it, it keept restarting randomly... and application kept failing silently. ran a mem test, let it got for like 27 runs. had 69 errors, but only on the 20th run and only on the 5th and 8th tests... was really wierd. anyway slowed the bus down a little, and now it seems to be stable, runs BF2 with no lag on low, moderate lag on med, md looks better too.
now i just gotta pay for it(did the "bill me later" option)


i was hoping that the picutre up date would suddenly start working on this system, but of course it didnt. i'm still pretty clueless on whats causing my errors, but once i get this system all set up, i can play with it some more, but i may need some help... from somewhere... dont really have any friends that are good at directx

anyway just wanna to let you guys know it'll prolly be a bit before i release 1.05, once i recomplie it( i think i lost the .dll in the reformat, still got the code though) i may post it here to see if you guys can help me figure out exactly when it does and doesnt happen(i'm still confused)

Blah!
redi jedi is offline   Reply With Quote
Old 29th August 2006, 22:48   #2
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
I'm totally familiar with DirectX 9 on the level of HLSL shader code and all of the math/techniques that are used in optimization etc. Only vaguely familiar with programming it on the C++ side but I am in the process of getting myself to know all of that, I can also ask programmers at work and possibly get answers to stuff too.
So I may be able to help on this....

If you could elaborate [or point to the thread] on details on the 'picture update' problem
Eo.S. is offline   Reply With Quote
Old 30th August 2006, 00:36   #3
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Yeah post it here and I'll have a look.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 30th August 2006, 06:14   #4
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
well heres what i did...
if you've looked at the code for the framecycle you've seen the texture array that was orriganly just used for the main and flip buffers, and i used them for the shape textures so you can capture. well i simply added another one, and called the same function from the user sprites, the DX function that loads texture from file(and i think thats the name too), anyway, i simply call the function when the file name or file type changes(tryed calling every frame too)


and it runs fine, as long as you dont resize the window... ya can go full screen and back, but if ya resize it gives an out of video memory error, witch upon investigation is comming from InitMyDirectxstuff function in PluginShell so its ither when it Destroys the textures or trys to rebuild them that the error throws.... yet it worked with 2 textures then worked with 6, then 7.. but no 8?.. i think i tryed it with having the texture declared localy as a static(inside of the function that i made for loading them), but i didnt know the error was happing then, so i dont think to check.

oh ya! and if ya start it up on an old preset, it works fine, but when a preset is using it, it wont resize(but goes fullscreen )

i also found that theres some function that doesnt need to be called(cant rember witch) when going fullscreen, but it is called for OnUserResize() so its a good culpret too..


i'm pretty sure it isnt actualy running out of memory, and i think a problem with the SDK woulda been found already... soo its most likely something in my code thats abusing D3D, kinda sounds like a memory leak to me....what do you guys think? if ya can make anything from that

Blah!
redi jedi is offline   Reply With Quote
Old 30th August 2006, 07:26   #5
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
heres the source, dont have a dll right now, lost it while reformating for new hardware, should compile though, if not i have like 3 versions right now so...

Blah!
redi jedi is offline   Reply With Quote
Old 30th August 2006, 20:44   #6
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
sorry was late...

here it is

Blah!
redi jedi is offline   Reply With Quote
Old 31st August 2006, 00:52   #7
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
Sounds like you're saying that you are reloading the textures when the screen is resized...
You should be able to resize the window without reloading the textures. Assuming you are reloading them are you sure they are being deleted beforehand and just loaded in additional memory. I doubt DX would say out of memory if it wasn't.

haven't looked at the code yet btw...
Eo.S. is offline   Reply With Quote
Old 31st August 2006, 01:02   #8
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
I can't build the project I get a load of errors about unresolved external symbols (40 to be exact).

I also cannot find InitMyDirectxStuff anywhere...

Last edited by Eo.S.; 31st August 2006 at 01:19.
Eo.S. is offline   Reply With Quote
Old 31st August 2006, 02:03   #9
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
Quote:
I can't build the project I get a load of errors about unresolved external symbols (40 to be exact).
lemme install VS and i'll check if that was the right one or not(like i said i have like 3, one of witch works)

Quote:
I also cannot find InitMyDirectxStuff anywhere...
isnt the exact name, but its something like that.

gimme a min to install VS i'll get back to ya with more

Blah!
redi jedi is offline   Reply With Quote
Old 31st August 2006, 02:23   #10
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
PS I am using VS 2K3 .net at my curent location, but also have a VS 6.0 elsewhere
Eo.S. is offline   Reply With Quote
Old 31st August 2006, 04:02   #11
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
sorry about that
milkdrop.us/milkdrop105.zip

that should work

Blah!
redi jedi is offline   Reply With Quote
Old 31st August 2006, 04:52   #12
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
Heres a preset and a picture
here

oh and it compiles in 2k3 BTW, havent checked 6


window resize failed.

Often this means the application ran out of video memory perhaps you tried to meke the window too large


BOOL DXContext::OnUserResizeWindow(RECT *new_window_rect, RECT *new_client_rect)

thats the error, and the function that pops up the error, it seems to happen because:

if (m_lpDevice->Reset( &m_d3dpp ) != D3D_OK) (error text is inside this if statment)

the device seems to not reset for whatever reasion...


Quote:
Sounds like you're saying that you are reloading the textures when the screen is resized...
no i only reload the texture if the preset tells me to IE: when the filename or filetype variable changes, when ya resize the window i guess you have to destroy all your directx stuff and re-Init all of it. the extra texture is added into the array, i used for loops to init and destroy the textures so adding one shouldnt make it not work...


EDIT:: oh ya i forgot, put the picture(s) a directory called pics inside the plugins/milkdrop dir.

Blah!

Last edited by redi jedi; 31st August 2006 at 07:23.
redi jedi is offline   Reply With Quote
Old 31st August 2006, 15:54   #13
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
I am getting link related errors on compile


code:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcpmtd.lib(newop.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmtd.lib(newaop.obj)



Any ideas?

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 31st August 2006, 15:57   #14
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Also others might need the headers for the WA_SDK_5_25_BETA
Attached Files
File Type: zip wa_sdk_5_25_beta.zip (27.9 KB, 444 views)

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 31st August 2006, 19:38   #15
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
ya i've seen those before... humm
check to make sure the winamp SDK is in the same parrent directory as the project IE:


c:/mdsource/WA SDK
c:/mdsource/milkdrop105


ither that or search for WA_IPC.h(i think) and change the path to it


thats weird though it complies fine on my comp(fresh install) so i dont see how the settings could be diffrent.

you are usig VS 2K3 right? the sdk doesnt compile as-is with VS 6

Blah!
redi jedi is offline   Reply With Quote
Old 31st August 2006, 20:18   #16
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
I got it to compile fine, after changing the output directory to winamp on my C: drive, although it does not put the compiled .dll in that folder [had to copy from the VS project folder.

However when I launch the plugin [windowed mode] it spawns the window, and promptly crashes before drawing anything. Winamp continues to run. Doing so in FS mode makes my winamp disappear [continues to run, but have to end with task manager].

I have not used VS to compile plugin .dlls before so I don't know if I should launching the plugin differently somehow?

Last edited by Eo.S.; 31st August 2006 at 20:36.
Eo.S. is offline   Reply With Quote
Old 31st August 2006, 20:29   #17
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
i think the name of the .dll should be on that line too. i'd only do the release version, i was having problems with debug for some reasion(think it cause i didnt change settings for it ither)

Blah!
redi jedi is offline   Reply With Quote
Old 31st August 2006, 20:40   #18
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
oops, totally edited my above post while redi was responding.

I put the file name in the location for output directory but that didn't seem to put the file in my winamp/plugins directory
Eo.S. is offline   Reply With Quote
Old 31st August 2006, 20:45   #19
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
wow thats odd...
you put it on release right?(important)

your doing it right, as far as starting it(although is should go to your winamp directory)

hummm crash right on start? i hate that.. you didnt change anything apart from output directory?

Blah!
redi jedi is offline   Reply With Quote
Old 31st August 2006, 20:47   #20
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
nope, didn't change anything.

PS, check your PMs
Eo.S. is offline   Reply With Quote
Old 1st September 2006, 05:56   #21
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
heres the compiled dll
(WARNING: this is not a relese, this version is broken and only for testing purpuses. End users please dont download this)
picture test

Blah!
redi jedi is offline   Reply With Quote
Old 1st September 2006, 10:22   #22
kostyap
Junior Member
 
kostyap's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Posts: 47
Quote:
Originally posted by redi jedi
anyway, i simply call the function when the file name or file type changes(tryed calling every frame too)
This might not be the best aproach depending on sprite size. It could lead to stalls. Better way to load texture is to have separate low priority thread. When preset needs new texture it should submit request to that thread. Do not use D3DXCreateTextureFromFile in that thread. Rather read image in RAM using other means. After that is done and the image is unpacked the thread will set some flag that the image is loaded. At this point your rendering loop can load that image into texture. In my case it prevented stalls and I load textures quite often
kostyap is offline   Reply With Quote
Old 1st September 2006, 18:33   #23
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
my bad, posted wrong link, heres dll
dll

Blah!
redi jedi is offline   Reply With Quote
Old 1st September 2006, 19:00   #24
Eo.S.
Milkdrop Moderator
 
Join Date: Oct 2004
Posts: 114
well that one works fine on my machine, it also does not crash when i resize the window
Eo.S. is offline   Reply With Quote
Old 1st September 2006, 21:35   #25
redi jedi
Will code for food
 
Join Date: Mar 2005
Location: orlando
Posts: 521
did you d/l the preset and picture? is it loading the picture?

from what i've seen it only crashes if the preset is using the feature. an old preset doesnt(shouldnt) cause a crash

Blah!
redi jedi is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > MilkDrop > MilkDrop Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump