GNOME Bugzilla – Bug 490701
base radio buttons initially fail
Last modified: 2007-10-28 20:07:03 UTC
1. Launch gcalctool and switch to the scientific calculator. 2. Select the Bin radio button, then type "10". 3. Select the Dec radio button. Expected results: 2 would be displayed. Actual results: The display doesn't change. 1. Launch gcalctool and switch to the scientific calculator. 2. Select the Hex radio button, then type "a". 3. Selec the Dec radio button. Expected results: 10 would be displayed. Actual results: "No sane value to convert" error. Possible regression of the fix for bug #485918? (The problem doesn't exist in revision 1754, but does beginning with r1756.)
I'm not seeing the "No sane value to convert" at least not with just doing the three steps above, but I do see that when you press the Dec radio button, the display is not being converted to 2. At least in arithmetic precedence mode. It seems to work just fine in left-to-right precedence mode.
Did you try it before or after Robert's latest patch for bug #485919? Since applying that patch, I'm having a much harder time reproducing the "No sane value to convert" error. I've gotten it a few times and am trying to find new, reliable steps to reproduce it. On my laptop, where I have the latest trunk sans Robert's patch, I can still reproduce it reliably.
Oh shoot, scratch what I just said. I had switched to left-to-right precedence to test something else and then forgot I had done so. In arithmetic precedence I can reliably reproduce it still. :-( Sorry about that! What I have noticed, patch or no patch, is that eventually the issue goes away -- and once it's gone, you have to quit and start over to get it to reappear. The following steps always work for me. (Some are needed per se, and using the mouse should be equally effective, but this get us both on the same page). 1. Launch gcalctool, switch to Basic mode, then quit. 2. Re-launch gcalctool. 3. Press Control S for Scientific mode. 4. Press Alt X for Hex. 5. Press a (for the digit A) 6. Press Alt D for Decimal.
Sami, could you take a look at this one please? The problem is with the code in the exprs case statement in the do_base() routine in functions.c. In particular with: ... } else if (!v->ghost_zero) { mpstr(MP, e->ans); exp_replace("Ans"); make_registers(); } ... Work from what is currently in SVN trunk (i.e. without the last Glade patch for keyboard accelerators).
Created attachment 98045 [details] [review] Patch from Sami to fix the problem (thanks). This seems to work for me. Joanie, does this fix the problems you were seeing? If so, I'll commit it and get it in for the GNOME 2.21.1 gcalctool tarball.
Seems to, yes. Thanks.
Thanks! Patch committed. Closing as FIXED.