Page 1 of 1

Latest build (r344) problem with names

Posted: Sat Mar 25, 2006 9:58 pm
by aegidian
steps:-

start new game

save under name 'Anything'

screen goes to status screen with name set correctly

go to chart screen [f6]

go to long range chart [f6]

return to status screen [f5]

Name is now blank!


I suspect that at some point the commander name (held as a pointer to an NSString) is being set to be the same as the text input (also held as a pointer to a NSString) when in fact it is the content of the name NSString that should be set from the content of the text input.

(Just installed new NVidia drivers on the GF's PC and Wow! does it make a difference to how well Oolite runs - from 5fps to 50fps).

Posted: Sat Mar 25, 2006 10:37 pm
by winston
If it made that much difference it sounds like the old drivers weren't working at all and it was using software rendering (well, that's what happens on Linux if your accelerated drivers aren't working).

The bug prolly isn't specific to the Win32 build, I bet it happens in Linux (but I'm going to bed now so I can't say for sure, and my sinuses feel ready to explode in a giant snotty explosion so...)

Posted: Sun Mar 26, 2006 2:37 am
by Galileo
winston wrote:
The bug prolly isn't specific to the Win32 build, I bet it happens in Linux
Yep, I'm seeing it in Linux.

Posted: Sun Mar 26, 2006 12:25 pm
by winston
As predicted this is caused by the commander name being set to the GUI's pointer to the commander string rather than a copy of the string being made. The one-liner fix is in r367.

Posted: Sun Mar 26, 2006 8:10 pm
by JensAyton
Could this be a fix for the “Commander Jamesonxxlnjbarnej” bug, too?

Posted: Sun Mar 26, 2006 8:30 pm
by winston
It's quite likely.