Posts Tagged ‘Bugs’

Windows 7 Command Line Help mistake for IF command

If you type

help IF

at the Windows 7 command-line (can launch this by searching at Windows Start menu search box for “Command” or by typing cmd there and pressing ENTER), you get in one of the help pages printed out for the batch files’ IF command:

%ERRORLEVEL% will expand into a string representation of
the current value of ERRORLEVEL, provided that there is not already
an environment variable with the name ERRORLEVEL, in which case you
will get its value instead. After running a program, the following
illustrates ERRORLEVEL use:

goto answer%ERRORLEVEL%
echo Program had return code 0
echo Program had return code 1

If a program you launched from the batch file returns error code 0 (meaning usually no error), then you jump to label (using “goto” command) answer%ERRORLEVEL% that is answer0 (labels are prefixed with : in DOS/Windows batch files) and it prints out (using echo command) on the console “Program had return code 0”.

Fine till here, but then it will proceed to next commands (the block labeled :answer1) and also print out “Program had return code 1”. Obviously the correct example should be:

goto answer%ERRORLEVEL%
echo Program had return code 0
goto finish
echo Program had return code 1

Could also have a goto finish after the last echo, but its needless since we don’t have :answer2 etc. labels after that and proceeds to finish by itself anyway.

Thinking of this example again, it’s a pretty silly one since one could do instead:

echo Program had return code %ERRORLEVEL%

BTW, to output an empty line to the console you can use echo:
And speaking of batch file tips, you can use :: for comment lines instead of REM command.

Η σελίδα σφάλματος του YouTube

500 Internal Server Error

Λυπούμαστε, κάτι δεν πήγε καλά.
Η διευθέτηση του ζητήματος έχει ανατεθεί σε μια άρτια εκπαιδευμένη ομάδα μαϊμούδων.

If you see them, show them this information:

Categories: Posts Tags: , , , ,

VB gotcha: when If function isn’t equivalent to an If-Then-Else block

Just got bitten by the following:

Dim takeN As Integer = If(Integer.TryParse(EdTake.Text, takeN), takeN, itemsCount)

I had used that instead of writing in 2 lines:

Dim takeN As Integer

If not Integer.TryParse(EdTake.Text, takeN) then takeN = itemsCount

However, there’s an important difference:

“If” is a function, so its arguments are evaluated at call-time. The “If” signature is:


I guess the default is to pass arguments ByVal (by value) and not ByRef (by reference), although I’d expect the signature to specify it explicitly to avoid confusion. When one passes a literal value (say 15) to TruePart or FalsePart it just gets “boxed” into an Object, whereas if one passes an expression (e.g. “takeN+1” or even just “takeN”) it gets evaluated first, then result is boxed and passed as an Object.

So, whereas one might think (esp. if coming from the ALGOL “Call-By-Name” era) the 1st line to be equivalent to:

Dim takeN As Integer

If Integer.TryParse(EdTake.Text, takeN) then takeN = [RESULT OF TRYPARSE] else takeN = itemsCount

in fact it’s equivalent to:

Dim takeN As Integer

If Integer.TryParse(EdTake.Text, takeN) then takeN = [ANY] else takeN = itemsCount

where ANY is whatever the takeN variable one had defined contains.

I thought the VB compiler was warning when using a variable before having assigned a value to it, but it seems in this case it misses to issue a warning. In fact I just tried:

Public ReadOnly Property Take As Integer
     Dim takeN As Integer
     Return takeN
   End Get

End Property

and it still doesn’t complain. Strange, probably it sets new local variables to 0 by default, but it shouldn’t encourage a programming style that relies on implicit default values – such syntax usually means there’s a mistake in the source code that can lead to a nasty bug.

The moral of the story? Avoid such shorthand expressions and stick to classic keyword-based syntactical structures – after all structured programming had been introduced as an alternative to the many times incomprehensible programs written in functional programming languages (e.g. due to overuse of nested function calls).

Zune window preview at Win7 taskbar acts as mini-player with rating


Just noticed a nice little touch by Microsoft at Zune player when running on Windows 7. When you move the mouse cursor over the running Zune application button on the taskbar you see a mini-player in the preview window that pops up. It even has a “heart” button there to rate the current song as a favorite one (full heart) or one you dislike (broken heart). Note that songs rated as dislikes can be configured at Zune settings to not sync with external portable devices.

There is one bug there though, it only shows the album/song title (alternating at every popup of the preview [the taskbar previews are live window previews btw on Windows 7]) if the Zune application is minimized. Else it doesn’t show the title at the top of the preview window.

Twitter bug calls you a moron?

Now who has to be more clever? Me or the Twitter programmers who apart from not being polite have managed to fail in simple character counting?

They have added automatic link shortening if your message exceeds 140 chars, but fail to count the resulting chars correctly and allow you to press the Tweet button which results in you seeing a message expressed in a quite insulting style.



Categories: Posts Tags: , , ,

IE9 RC bug? page changes IE back/forward colors and prepends icon, maintained for window session


Strange IE9 RC bug: visited (via and then clicked back several times seeing the above strange back/forward buttons (red color) and a Vodafone icon prefixed before them! Closing the window fixed the issue.

Are they using some hidden feature of IE9? Didn’t manage to reproduce the behavior though. If you have more info on this issue, do add comment below.

UPDATE: I think I found the culpit, drag-dropping the page icon from the address bar onto the desktop with IE9 RC doesn’t create a URL shortcut (.url file) as it used to be at IE8, but creates a pinned site shortcut (.website file) and immediately closes the tab/page and reopens it in a new window with the UI appearance shown above (back/forward button colors depend on the page icon dominant color I think). Totally non-intuitive (esp. breaks the rule of “least user surprise”), plus much more slower. Read more on this at (also reported as an issue to Microsoft Connect at

Categories: Posts Tags: , , ,

Remove older crippled Google Search Provider from IE9 RC

Just installed Internet Explorer 9 (IE9) Release Candidate (RC), found the link at:

Was amazed by it’s performance and clean GUI (especially the choice to move the yellow warning bar to the bottom and make it of smaller width than the browser window in order to be more noticeable). Do visit to explore IE9’s potential (and try the billiard game at to see the graphics hardware acceleration).

However, when typing at the address bar (now combined with the search bar since new users were mixing them up and typed URLs at the search bar with unexpected outcome) the suggestions dropdown was showing two Google icons and one Bing.

Then I also noticed that one of the Google icons (the one that was already selected), didn’t allow me to turn on suggestions (send keystrokes to search engine as you type for dynamic search/suggestions).

The suggestions dropdown window just had an “Add” button that takes you to a page with more search providers to add, but no button to allow you to edit those search providers. So I right clicked the empty area at the right side of the address bar and selected to show the “Command bar” (means menu bar).



Then at menu “Tools”, I selected “Manage Add-ons”



There as you can see at the screenshot above (grabbed with ALT+PRINTSCREEN button combination and pasted into Windows Live Writer), the item selected says “Top Result Search” and has “Not Available” and also the “Top Result search address” field says the same. Also noticed in was using “” whereas the other google icon was using “” and had all search address fields filled-in.

So I reckoned I should remove that problematic entry.

A thing I don’t get is those UIs that don’t allow you to press Remove button at a Default choice and force you to first set another one as default, then they enable the remove button. Totally non-intuitive for new users of computers. They should instead prompt you to select other default after you press Remove on the current Default one. If you must always have one entry there they should just disable remove when list item count is just one.

To keep it short, I clicked Bing as the Default search engine by selecting it and pressing “Set as Default”, then clicked the problematic Google search entry and selected “Remove” (the remove button was now available since it wasn’t the default search anymore).

The clicked “Close” and all was fine with search suggestions for both Bing and Google, plus got rid of that 2nd Google icon at the search suggestions drop-down window.

Categories: Posts Tags: , , , ,

Bug: Google Maps rendering exotic place names onto Patras, Greece


Seems that day (8 Aug 2010), Google Maps system had been drinking or something, else I can’t explain how “Cara Oasis” and other exotic place names (in Arabic script?) were rendered onto a map for the outskirts of Patras, Greece.

Categories: Posts Tags: , , , ,

Bug: “The disk is full” at base.bundle.js of #NewTwitter


Sometime ago I got the above error screen (after clicking on the error notice at the statusbar) on IE8/Vista at the new Twitter UI (aka #NewTwitter). Exactly what does “The disk is full.” error mean to say? Wonder if (probably used to host images served by Twitter like avatar images) was itself running out of disk space and this was some error string returned via AJAX or if it’s some silly error message (maybe cause their code thought IE8 supports HTML5 local storage or something).

Maybe they’ve fixed it now, but in general even the classic Twitter UI didn’t seem to always play ok with IE8, e.g. Retweet didn’t always work (would see “Error on page” at the bottom) and you had to click on “x minutes ago” under a given status update to go to a page where you could retweet it…

Categories: Posts Tags: , , ,

Bug: Microsoft Office (2007) Diagnostics misleading summary view



At Office (2007) Diagnostics tests I’d expect more fine-grained status codes (rather than a mere “Completed”) so that the Summary view wouldn’t mislead you to think all the identified problems have been corrected. After all not many people would click on the “Detailed results” based on the falsely positive summary as pictured above.

Categories: Posts Tags: , , ,
%d bloggers like this: