Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
172 user(s) are online (85 user(s) are browsing Forums)

Members: 2
Guests: 170

white, TheMagicSN, more...

Headlines

 
  Register To Post  

« 1 (2)
Re: break an app at need it time to see current stack trace of it.
Home away from home
Home away from home


See User information
@Salas00
Tried both ways, still the same crash. Crashlog point out on "stb r9,0(r10)", and r9 is 0x00000000, and r10 is 0x5FA9A000.

But I think at least I have something to show to authors. It is for sure that function where it gets stuck: Ranger shows it correctly, once I put to the original version with original loops a "printfs", then I didn't pass even first "while" ever. But once I replace both with the solution above, then they both passes for sure just crashes on that latest loop(BPP) shifts.

So issue definitely in this function and about shifts.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: break an app at need it time to see current stack trace of it.
Home away from home
Home away from home


See User information
@Salas00
Quote:

If there is a lot of this type of code you may want to consider using macros like this (from newlib 3.1.0 libm source code):


Thanks! I just checked the whole source code on the world "shift", there is not that much mostly in this file only:
https://sourceforge.net/p/sauerbraten/ ... rc/engine/texture.cpp#l23

But if I check on ">>" or on "<<" there is damn a lot! Hope it only in texture.cpp those shift operations cause problems.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: break an app at need it time to see current stack trace of it.
Home away from home
Home away from home


See User information
@salas00
Btw, should i add some other values to when use those macroses ? I mean it want 2 values, so once i just do:

while(SAFE_LEFT_SHIFT(dh<<hshift) < sh) hshift++; , it didn't compiles, but if i do something like while(SAFE_LEFT_SHIFT(dh<<hshift,0) < sh) hshift++; then it compiles.

Or it just matter removing << and replace with , , like:
while(SAFE_LEFT_SHIFT(dh,hshift) < sh) hshift++; ?

edit: with just "while (SAFE_LEFT_SHIFT(dw,wshift) < sw) wshift++;", same stuck.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: break an app at need it time to see current stack trace of it.
Just can't stay away
Just can't stay away


See User information
@kas1e

The third version (i.e. "while (SAFE_LEFT_SHIFT(dw,wshift) < sw) wshift++;").

The first parameter (op) is the value that is to be bit-shifted and the second parameter (amt) is the amount to shift by.

Go to top
Re: break an app at need it time to see current stack trace of it.
Home away from home
Home away from home


See User information
@Salas00
Strange then... With that one, I surely stuck as before. While this one : while (wshift < (sizeof(dw)*8) && (dw << wshift) < sw) doesn't stuck for sure. Anyway will see what author's answer.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: break an app at need it time to see current stack trace of it.
Just can't stay away
Just can't stay away


See User information
@kas1e

Quote:

edit: with just "while (SAFE_LEFT_SHIFT(dw,wshift) < sw) wshift++;", same stuck.


Can you print what the values of dw and sw are just before the loop? And dh/sh for the other loop?

If dw is zero and sw is non-zero then the loop will never end because dw will remain zero no matter how much it is shifted.

Also if sw is very large it may be that dw "overflows" before it is larger or equal to sw.

Go to top
Re: break an app at need it time to see current stack trace of it.
Home away from home
Home away from home


See User information
@salas00
Just added before all loops:

Quote:

printf("dw = %d, sw = %d\n",dw,sw);
printf("dh = %d, sh = %d\n",dh,sh);


And the result:

Quote:

dw = 0, sw = 512
dh = 0, sh = 512

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: break an app at need it time to see current stack trace of it.
Just can't stay away
Just can't stay away


See User information
@kas1e

Your problem is with dw and dh values (they should not be zero).

Where are they coming from in the code? Most likely there is something wrong in the code that reads or calculates them.

Go to top
Re: break an app at need it time to see current stack trace of it.
Home away from home
Home away from home


See User information
@salas00
I only can see that this "shifttexture" called only from this function:

https://sourceforge.net/p/sauerbraten/ ... rc/engine/texture.cpp#l92


Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project