[Not a bug] Acos function cause AL error 0xa003 [4.6.0]

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Acos function cause AL error 0xa003 [4.6.0]

Postby Apeirogon » Mon Jul 05, 2021 1:44 pm

Start gzdoom with attached zip file with doom2 wad. Start new game. Hold w for several seconds, or any other button which move doomguy forward. Observe warning in console.
Close gzdoom.
Open zip archive, open zscript.zc, comment line 31 and uncomment line 30.
Start gzdoom again and repeat previous steps. Warning in console will not appear.

An addition notes, player "arrow" on automap would disappear as soon as you hit teleportation line for thee first time, in first case scenario.
acos_bug.zip
You do not have the required permissions to view the files attached to this post.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Acos function cause AL error 0xa003 [4.6.0]

Postby Graf Zahl » Mon Jul 05, 2021 1:52 pm

Have a look at the graph and think a bit: https://en.wikipedia.org/wiki/Inverse_t ... _functions
What most likely happens here is that you pass an out of range value as its argument, get a NaN as return which then wreaks havoc everywhere you pass it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Acos function cause AL error 0xa003 [4.6.0]

Postby Apeirogon » Mon Jul 05, 2021 2:17 pm

Ahh yes, values for arccos should be inside [-1, 1] range...
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests