Showing posts with label bug. Show all posts
Showing posts with label bug. Show all posts

Wednesday, July 07, 2010

Flex Builder Error 1046: "Type was not found or was not a compile-time constant"

Problem:
While editing a big .as file in Flex Builder 3, the compile is broken suddenly. Got this error:
1046: Type was not found or was not a compile-time constant: ?????.


Cause:
Seems like Flex editor tend to wrongly remove import statement at the top of .as file without user consent.

Solution:
Disable Flex Builder feature:
Windown > Preferences > Flex > Editors > ActionScript Code, uncheck "Remove unused imports when organizing"

Friday, September 26, 2008

Blue Screen Trying to Install Windows XP SP3

During last few months, I have been through a couple of Windows XP SP3 installation. They are mostly eventless. One of the worst was a computer that hung after reboot, but after a forced power recycle that system seem to be fine.

Just when I am about to conclude that Windows XP SP3 update is pretty good, I got the famous Blue Screen of Death.

While trying to install Windows XP SP3 on my computer, I got an "Access is denied" error message. So that was not too scary, I typed the error message along with keyword "Windows XP SP3" in Google and found an MSKB 949377 which provided a solution to this exact problem.

Now, following KB 949377, I downloaded full Windows XP SP3 package and subinacl.exe, and created Reset.CMD. But, I tried it 3 times, everytime I ran Reset.CMD, it gave me Blue Screen of Death with error message about registry access. So, I did another Google search with keywords: "windows xp sp3 access denied subinacl registry blue screen". Now "I'm feeling lucky". The first hit provides a solution that works perfectly for me. Here is link to Jason's blog post that solved my problem: http://www.mrfloppysa.com/wordpress/?p=13

The trick is to remove the HKLM line in RESET.CMD. The new RESET.CMD file would be like this:

cd /d "%ProgramFiles%\Windows Resource Kits\Tools"
REM subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f
secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose

Monday, July 07, 2008

C++/CLI Warning C4945

Reason: This warning was generated because I referenced multiple C# projects in the C++/CLI project, and they all have "copy local" set to true.

Solution: Change reference to the C# projects, set all "copy local ..." properties to false.

A hotfix is available, which does not seem to be in SP1 as of 7/7/2008. So this fix probably will never be publicly available. This proves again C++/CLI is not on the top of TODO list for Visual Studio team.

Reference:
Microsoft KB 922271: http://support.microsoft.com/kb/922271

Friday, September 28, 2007

100,000 + 100 = 65635? Excel 2007 bug

100,000 + 100 = 65635?

The math is not right, but apprently Microsoft Excel 2007 wants you to believe that. See the screenshot below:


Ok, this is a recently published bug: when you ask Excel to multiply 77.1 by 850, it will show you 100,000, although it knows the correct answer. It messes up when formatting the answer on the screen. In cell A1, I actually have formular: "=77.1*850". :-)

Friday, August 31, 2007

YUI widget "Dialog" now depends on "Button Control"

Environment: YUI 2.3, IE 7.0

This is another problem I discovered during update from YUI 0.12 to YUI 2.3. As always, when updating library, there are many surprises that you have to run into.

Problem: Error message: "Error: Function expected" appears when I call the "render" method of YUI "Dialog" control a second time on the web page. Turn out the offending line is here: container.js, line: 6373,
if (oButton instanceof YAHOO.widget.Button) {

Why: The new "Dialog" implementation depends on the "Button" control now. Due to the above offending line, the dependency is not "optional" as stated in the documentation even if you don't use the new button control. If you don't include "button.js", you program will break at the above point.

Fix: If you are willing to change the source code, we can change the offending line to something like this:
if (YAHOO.widget.Button && oButton instanceof YAHOO.widget.Button) {
BUT, I am 80% sure, at another line, or in another control, I may run into the same problem again.
So, the best bet is to include "Button.js" to my web page.

Friday, March 24, 2006

A Welcoming Breaking-Change in .Net Framework 2.0

Finally, after a few years waiting, Microsoft admits its implementation of DateTime serialization in web service is flawed, and made a breaking change to it. See the last item on this page: http://msdn.microsoft.com/netframework/programming/breakingchanges/runtime/xmlserial.aspx

In one sentence, under the old framework, only local time can be transmitted correctly by web service. If you save UTC time in database, and try to transmit using web service, bad luck. You will have to convert all the time in to your web server's local time, then send it out. And, on the other end, the receiving computer will have to convert again the date time to UTC time. And, under the hood the web server and receiving computer both did some conversion during XML serialization and de-serialization too. That is about 4 times CPU time wasted on the conversion that leads you back to where you started!!! Even worse, this behavior is not well documented in MSDN, and causes big confusion for developers.

I had to send an internal memo to all developers in my company to raise the awarness of this issue back in 2004. Really glad it finally gets attention and being resolved.