Homesource Forums

Homeworld Source Editing Talk
It is currently Tue Jul 25, 2017 7:37 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: rev 659: Effects bugs
PostPosted: Wed Apr 01, 2009 4:55 pm 
Offline

Joined: Sat Mar 29, 2008 11:06 am
Posts: 61
When hyperspaceing the effects that "flicker" at the sides of the hyperspace window stretch across the screen.
Ion cannon beams don't render most of the time and when they do they are in the wrong location
The field that gets emitted by harvesters and healing ships doesn't render most or the time and if it does in the wrong location.

Image:
http://img5.imageshack.us/img5/8702/hyperspacebug.png

I tried to log this issue with Manits but when I submitted it I got the error:
Code:
A necessary field 'Affected: Linux' was empty. Please recheck your inputs.


As far as I could see there is no Affected field and pressing back didn't highlight an issue (which Mantis said it would do)


Top
 Profile  
 
 Post subject: Re: Effects bugs
PostPosted: Wed Apr 01, 2009 8:56 pm 
Offline
coder

Joined: Wed Oct 01, 2008 2:55 pm
Posts: 103
Location: Michigan
I think Ive seen the ion cannon problem before, If what i saw was what you are describing. I had a block of code in the middle of etgEffectDraw that told it to return prematurely. I dont have the block of code anymore, (for obvious reasons), but i believe it did something like this.

Psudo Code
Code:
if((void *)effect.collMyBlob == 0x(some address)){
    return;
}


I put the block right before the call of the partRenderSystem() function. (about line 2396)

the address that I was testing for was one that commonly popped up when ion cannon beams fired. the address would eventually find itself as the handle in the function trMakeCurrent and cause a crash....(it would come up as a null pointer).

hope this helps.


Top
 Profile  
 
 Post subject: Re: Effects bugs
PostPosted: Wed Apr 01, 2009 9:10 pm 
Offline
coder

Joined: Wed Oct 01, 2008 2:55 pm
Posts: 103
Location: Michigan
I take it back... I found the block. it still resides in render.c under the rndMainViewRenderFunction() i just commented it out.

it looks like this.
Code:
/*
#if defined (_MACOSX_86)
               if ((long)effect->collMyBlob == 1013904225){//0x3c6ef361
                  dbgMessagef("rndMainViewRenderFunction: sent invalid handle: 0x%lx",(long)effect->collMyBlob);
                  return;
               }
               else if ((long)effect->collMyBlob == 1701209669){//0x65666645 )
                      dbgMessagef("rndMainViewRenderFunction: sent invalid handle: 0x%lx",(long)effect->collMyBlob);
                  return;
               }
               //else if (handle >= 6000){
               //   dbgMessagef("Valid handle: 0x%lx",handle);
               //}
#endif
*/            
                    etgEffectDraw(effect);


the addresses I was checking ultimately ended up in trMakeCurrent() as invalid handles, and i was trying to figure out how far back the problem originates... I believe my problem was actually in etgEffectDraw someplace (I havent found it yet)...

the function trace looks like this.
rndMainViewRenderFunction() //render.c
etgEffectDraw() //ETG.c
partRenderSystem() //Particle.c
partRenderMeshSystem() //Particle.c
partMeshMaterialPrepare() //Particle.c
trMakeCurrent() //texreg.c

returning at rndMainViewRenderFunction instead of trMakeCurrent caused an ion cannon bug similar to the one you are describing above. so I would imagine one of these functions is to blame.

edit: also my logic was flawed when i wrote this block. effect->collMyBlob does not become the handle down the line, it just has the same address at this point.


Top
 Profile  
 
 Post subject: Re: Effects bugs
PostPosted: Thu Apr 16, 2009 4:51 pm 
Offline

Joined: Sat Mar 29, 2008 11:06 am
Posts: 61
Still no luck adding this issue to mantis, but I did add something "new" to the wishlist :). Feel free to assign it to me!


Top
 Profile  
 
 Post subject: Re: Effects bugs
PostPosted: Sun May 17, 2009 7:06 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 14, 2004 12:41 am
Posts: 326
I've verified the problem on Linux, seems that it was introduced in rev 659.

basicmark: you want to go ahead and write it up in mantis?


Top
 Profile  
 
PostPosted: Fri May 22, 2009 3:13 pm 
Offline

Joined: Sat Mar 29, 2008 11:06 am
Posts: 61
Thanks zapkitty, mantis accepts the bug report now. I also updated my feature request :)


Top
 Profile  
 
PostPosted: Sat May 23, 2009 9:13 am 
Offline
Site Admin
User avatar

Joined: Tue Dec 14, 2004 12:41 am
Posts: 326
basicmark wrote:
Thanks zapkitty, mantis accepts the bug report now. I also updated my feature request :)


I used the "move issues" button to move this bug and the ARM issue from "wishlist" to "Homeworld SDL"...

... I'd feel so smart if it hadn't taken me so long to figure it out :)


Top
 Profile  
 
PostPosted: Mon May 25, 2009 3:27 pm 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Oh.

r659. That was me then. :(

Aunxx.


Top
 Profile  
 
PostPosted: Thu Dec 24, 2009 9:09 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Possibly a compiler issue.

Please see
http://homesource.nekomimicon.net/sourceforum/viewtopic.php?f=8&t=313
for more info.

Aunxx


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group