Saturday, November 7, 2009

How buggy software could bring great hardware to it's knees

Having development skills feels sometimes like a curse. Even though it is useful in resolving software issues, 3rd party installs, etc... It is also painful to see 2-7 hours of you personal life time burn away because of another an outrageous development mistake. Superior hardware components brought down on it's knees because of one line of code, or lack of it.

My latest painful experience was with the "HP Wireless Office Jet 8500 All in one Printer, Fax and Scanner" installer. At some point during installation, the software tries to install Flash9f.ocx V9. My computer; however, had Flash V10 installed. This caused an error. The TITLE of that error window had the following error code:

"hpzsetup.exe" "-f" ".\autorun_network.inf" "-networkonly" "-wStub" "263454"
This simple Flash version check (which is less than 2 hours worth of development time) could have saved me "a single customer" 14+ hours of my time. I am sure that many other novice customers, would have returned this after a couple of hours of frustration and fiddling with the uninstall/install options. If not, they would have settled for 1/8 of the installed features during that buggy and faulty installation.
I wonder how much did this mistake cost HP; returns, phone support, reputation which equals future recurring purchases. That was my experience with Cannon scanners, and that's why I decided to try HP this time "Drivers". It seems that HP has fallen behind in this particular instance. The reviews on Amazon at the time of writing this blog were 26 (one stare) / 39 (5 star)
I guess they will keep falling, unless someone at HP wakes up and fix the installer before flash 12 :)

Below is another error code generated and logged after a recovery attempt.

---------------------------
Error Situation Code: 24749208
---------------------------
The following lines were retrieved from the installation error logs.



= Application did not return ERROR_SUCCESS. Returned 0x2

Exit code=1602

= Application did not return ERROR_SUCCESS. Returned 0x2

LaunchApp(X:\hpqtra08.exe -shutDown,1,00000000,00000000) failed with 2

Error opening key HKLM\SOFTWARE\Hewlett-Packard\Install\{624E7452-BA43-4f55-B9D5-FC75EEA0808B}. error=2

Error message received: Module X:\Flash9f.ocx failed to register. HRESULT -2147220473. Contact your support personnel.

Timed out waiting for product finish event

RUN: Driver UI Plug-In exits returning 50

= Application did not return ERROR_SUCCESS. Returned 0x2

RUN: Driver UI Plug-In exits returning 50

= Application did not return ERROR_SUCCESS. Returned 0x2

LaunchApp(X:\hpqtra08.exe -shutDown,1,00000000,00000000) failed with 2

Error opening key HKLM\SOFTWARE\Hewlett-Packard\Install\{624E7452-BA43-4f55-B9D5-FC75EEA0808B}. error=2

Error message received: Module X:\Flash9f.ocx failed to register. HRESULT -2147220473. Contact your support personnel.

X:\GPBaseService2.msi failed with return code 1602

MSIInstall() failed with 1602 for MSI GPBaseService2

Exit code=1602

Exit code=21

= Application did not return ERROR_SUCCESS. Returned 0x2

LaunchApp(X:\hpqtra08.exe -shutDown,1,00000000,00000000) failed with 2

Error opening key HKLM\SOFTWARE\Hewlett-Packard\Install\{624E7452-BA43-4f55-B9D5-FC75EEA0808B}. error=2

Timed out waiting for product finish event

GetDatFileName() returned FALSE. We need a dat file to run.

= Application did not return ERROR_SUCCESS. Returned 0x2

LaunchApp(X:\hpqtra08.exe -shutDown,1,00000000,00000000) failed with 2

Error opening key HKLM\SOFTWARE\Hewlett-Packard\Install\{624E7452-BA43-4f55-B9D5-FC75EEA0808B}. error=2

Error message received: Module X:\Flash9f.ocx failed to register. HRESULT -2147220473. Contact your support personnel.

Timed out waiting for product finish event


---------------------------
OK
---------------------------

Thursday, August 6, 2009

Problem upgrading Teradata ODBC drivers from v6 --> v12

Problem upgrading Teradata ODBC drivers from v6 --> v12

I get this error while installing the Teradata ICU libraries v12
---------------------------
Shared ICU Libraries for Teradata
---------------------------
Error applying transforms. Verify that the specified transform paths are valid.

C:\WINDOWS\Installer\{8AFBC2EB-BB17-43C8-8AE0-5B7961A4A217}\1033.mst
---------------------------
OK
---------------------------

So I found a similar issue here http://support.microsoft.com/kb/299699 and I decided to remove the Teradata ICU reference using Windows Installer Cleaner http://support.microsoft.com/kb/290301

That seems to have resolved my problem, and this is why I share it :)



Tuesday, January 27, 2009

SharePoint Unit Tests on a Vista Ultimate 64bit

An issue/problem I’ve experienced recently with VS Unit Testing & SharePoint OM Mode. It is impossible to run VS Unit Tests that connect to the OM on a 64bit machine. Reason is that Visual Studio is a native 32bit app and since it runs in splwow64 mode, it cannot connect to a WSS 64bit process. 32bit & 64bit COM dlls can't mix.

Just Something to observe if you get an error similar to 

Test method AiE.UnitTests.WorkshopBusinessRulesTest.UpdateWorkshopInstanceTest threw exception:  System.ApplicationException: Problem Accessing SharePoint site --->  System.IO.FileNotFoundException: The Web application at http://localhost:3333/workshops could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application..

Friday, October 3, 2008

C# .NET Extension Methods with a Generic List

well I was asked by a client today on how to write an extention methods and wither I use them or not, so while searching for examples in my own code I decided to share this snippet since you will at some project need to create a comma sperated list of strings, integers or objects

this example uses generic extention method to convert a list of any type to a string comma sperated list

///
/// Contains List Extention Methods
///

public static class ListExtentions
{
///
/// Converts the current list items to a comma seperated string
///

///
/// My list.
///
public static string ToCommaSeperated(this List myList)
{
string ret = string.Empty;
for (int i = 0; i < myList.Count; i++)
{
if (myList[i] != null &&
!string.IsNullOrEmpty(myList[i].ToString()))
{
if (i == 0)
ret = myList[i].ToString();
else

ret += "," + myList[i].ToString();
}

}
return ret;
}
}

}

to use the function you can do the following

List lstUsers= getAllUsers();
lstUser.ToCommaSeperated();

as long as you did a proper override of the ToString() virtual method you should get a proper list of comma seperated User names for example

public class CustomUserObject
{
.
.
.

public override string ToString()
{
return firstName+" "+lastName;
}




Enjoy ;)

}

Monday, September 8, 2008

An undocumented Error ASP.NET "Arguments to MakeRelative must be root-relative"

I've been coming accross this error in one of my applications which use EpiServer and custom Page base class... it driving me banana, anyone came accross something like this?


Server Error in '/XXX.Web' Application.

Arguments to MakeRelative must be root-relative

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Arguments to MakeRelative must be root-relative

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[ArgumentException: Arguments to MakeRelative must be root-relative]    EPiServer.UrlBuilder.MakeRelative(String fromBase, String path) +417    EPiServer.UrlBuilder.Rebase(UrlBuilder fromBaseUrl, UrlBuilder toBaseUrl, RebaseKind kind) +553    EPiServer.Web.FriendlyHtmlRewriteToExternal.HtmlRewriteUrl(UrlBuilder internalUrl, UrlBuilder externalUrl, UrlBuilder url, Encoding encoding, Object& internalObject) +139    EPiServer.Web.FriendlyHtmlRewriteToExternal.rewritePipe_HtmlRewriteUrl(Object sender, HtmlRewriteEventArgs e) +304    EPiServer.Web.RewritePipe.OnHtmlRewriteUrl(HtmlRewriteEventArgs e) +19    EPiServer.Web.HtmlRewritePipe.WriteElement(MyHtmlRewriteEventArgs e, SgmlReader reader, TextWriter writer) +404    EPiServer.Web.HtmlRewritePipe.RewriteToEnd(TextReader reader, TextWriter writer) +2063    EPiServer.Web.HtmlRewriteStream.Close() +165    System.Web.HttpWriter.Filter(Boolean finalFiltering) +69    System.Web.HttpResponse.FilterOutput() +82    System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +47    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

Wednesday, September 3, 2008

Google Chrome a Revolutionary Browser

One of the worst deficiencies in today’s browsers is the single thread per tab and one process per browser module. Opera, Firefox and IE would continually grow in memory. Memory allocated for new tabs are never deallocated and recycle, even if you close that tab.

A simple experiment with an IE instance and 50 tabs would show the defficiencies in that single process model. Once a single tab crashes, the entire process would fail; therefore, You would lose all your tabs and your work in progress. If check process explorer while running Google Chrome, you would find multiple chrome.exe instances. It is a different design, chrome uses a multi-processes design, in addition to multi threading. Every new tab in the browser is a new process with its own memory space, this is significantly different and it enhances the way of browsing and multi tasking within a browser. also If one site/tab crashes, the browsing issue is mitigated. And that single tab/process would be closed. All of it’s memory would be freed, and other tabs are saved. The main browser window has its own task manager, and could be used to close independent tabs/web applications

One of my friends has noticed increased performance of Ajax controls when running the site (SharePoint site) in Chrome, the reason for that is that Chrome is using V8 JavaScript Engine which COMPILES JavaScript to machine code that runs within the process instead of using Javascript as a script language and interpreting it, thus any JavaScript will run so much faster.
Conclusion: I believe their browser will grow very quickly in the market since they are considering Web2.0 and Web Applications into the design and architecture form the beginning, they are also performing Quality Control Tests using their Google Database of top ranked sites, can you top that with a better diverse list of test cases, I just hope it complies with CSS standards but at the same time be intelligent enough to render IE custom styles correctly as well, I also hope that they will not create their own standards and force us developers to start customizing Google Chrome hacks for it as well with their market share.