Latest build (r344) problem with names

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Latest build (r344) problem with names

Post 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).
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post 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...)
User avatar
Galileo
Dangerous
Dangerous
Posts: 103
Joined: Tue Nov 15, 2005 1:55 am
Location: Tasmania, Australia

Post 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.
Eat talking tree, food blenders!
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post 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.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Could this be a fix for the “Commander Jamesonxxlnjbarnej” bug, too?
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

It's quite likely.
Post Reply