Frequent crashes in Windows 7 !!

After my 31st Blue Screen Crash just now, I just have to let off some steam and ventilate here.

Since Nov-2009, I have had 31 blue screen crashes. Everytime the culprit is always win32k.sys.

Here’s the extract of an analysis report (generated by WhoCrashed):

On Mon 4/12/2010 1:52:23 AM your computer crashed
This was likely caused by the following module: win32k.sys
Bugcheck code: 0x3B (0xC0000005, 0xFFFFF960000AB890, 0xFFFFF88009226450, 0×0)
Error: SYSTEM_SERVICE_EXCEPTION
Dump file: C:\Windows\Minidump\041210-19515-01.dmp
file path: C:\Windows\system32\win32k.sys
product: Microsoft® Windows® Operating System
company: Microsoft Corporation
description: Multi-User Win32 Driver
The crash took place in a standard Microsoft module. Your system configuration may be incorrect, possibly the culprit may be another driver on your system which cannot be identified at this time.

I logged a report (SRX1118765656ID) with Microsoft Support. They initially told me the culprits were my 32-bit applications:

1. Firefox

2. Vim

Then I upgraded Vim to the 64-bit Vim.

But the crashes continued unabated and it could happen when I click on anything, be it Vim, Firefox and sometimes even Microsoft Excel XP !!

Microsoft Support has been working at the problem since Dec-2009 and has no solution at all besides asking me to reinstall Windows 7 on my laptop. I have plenty of applications installed on my laptop and reinstalling will take too long and I will have to get a spare machine to keep a copy of my system for backup. In many cases, reinstalling is not a solution at all. I told the Support staff that and after that he does not even bother to respond anymore.

As far as blue screen crashes go, I have had more in the 6 months I have with Windows 7 than in the 8 years I had with Windows XP !

I would have switched to another operating system if I am not so attached to so many applications that work on only Windows.

This is a very good reason why a Windows-only world is BAD for for everyone !

 

 

Update on 20-Apr-2010:

32nd crash today – today’s happened when I was using Excel.

 

Technorati tags: , , , ,

Delete control characters in VIM

image

Recently I had to review some very large registry files (.reg).

Trouble was when the file was large, VIM somehow displays also the control characters.

This made the file difficult to read.

The solution is to delete all the control characters with

:%s/[[:cntrl:]]//g

and voila:

image

Technorati tags:

Microsoft’s support disappoints !! My experience of fixing “Class not registered” for mscomct2.ocx control after Microsoft support staff abandoned the case

I had a very disappointing experience of dealing with Microsoft Dynamics support.

Last month, my client started deploying Meeting Room Manager. I first noticed that the customization on my PC stopped working and soon the problem spread to the citrix server.

The symptoms of the problem was that when I fired up a customized form in GP, it would complain of missing components. The components were Microsoft Listview control and Microsoft Date and Time Picker control.

We tried to fix the problem by reimporting the package but the import also failed.

clip_image002

I (not Microsoft) identified that the problem was due to Meeting Room Manager installing its mscomct2.ocx. Microsoft only allows 1 version of the ocx. So when Meeting Room Manager installed its version, it dumped the version that GP was using.

Microsoft Dynamics support then asked us to unregister and re-register the version that is found in c:\windows\system32. It registered successfully but the problem still persisted.

Microsoft Dynamics support said they were stumped and then they went into 7 days of ‘I am following up with my colleague in US’ , ‘I am in discussion with my colleague in US’ mode without any progress. They hinted that we should just rebuild the server and not waste time fixing the cause.

At this point, the users and I were very frustrated.

I updated the case with this:

GP is a Microsoft product, Meeting Room Manager is a Microsoft Gold Certified partner product. We purchased 1 and then the other and now we cannot get both to work together. Where did we misplace our confidence.

To which, this undynamic Dynamics support chap replied to the effect of:

‘GP was working fine. After Meeting Room Manager, GP does not work, so go after the Meeting Room Manager vendor, it’s not our problem. So there. Go rebuild your server and update us on outcome’

That was SHOCKING !! Both are Microsoft or Microsoft certifed products and they cannot work together and this chap said it was not their (Microsoft) problem !!

That chap could only see that it was not a Microsoft Dynamics GP problem and so it was not his problem.

 

Utterly fed up with his attitude, I did my own research on the issue.

The issue is actually not very complex.

clip_image002[5]mscomct2.ocx though registered successfully, was actually not registering the classes within correctly.

That was the issue.

So I focused on investigating how mscomct2.ocx was distributed.

I got a recently reformatted laptop and tried to add a Microsoft Date and Time Picker control on a VB form in Excel. It worked. I thought that the Meeting Room Manager messed up some operating system files.

I then did a Windows repair. But the problem still persisted.

Then I found out that mscomct2.ocx was previously distributed with Office XP Developer. So I downloaded the mcsomct2.cab file and unzipped its contents (mscomct2.inf, mscomct2.ocx).

I unregistered mscomct2.ocx.

I installed mscomct2.inf. That copied mscomct2.ocx to the system32 directory.

Then I registererd mscomct2.ocx and Voila !! Everything was working again !

There was no secret juice, just about 1 day’s research and trial and error. That’s much better than Microsoft Dynamic’s month long of ‘discussing with my colleague’, ‘following up with my colleague’ without any results !!

Technorati tags: , ,

Dell’s reliability

image

Dell has only marginally higher malfunction rate than Apple according to the report that can be downloaded at ComputerWorld.

Given that Apple is significantly more expensive than Dell, I would say Dell gives greater value for money.

I am a long time Dell customer (my last 4 laptops were Dell) and I am super happy with the convenient on-site service.

 

Technorati tags: ,

Coupon codes for RM 500 discount on Dell Studio systems – limited time offer

image

Dell is giving RM 500 off for Studio 14 laptop and Studio One 19 desktop.

Laptop coupon code: T79KXQ8$6P9G4W

Desktop coupon code: T79KXQ8$6P9G4W

This offer is valid from October 20-23, 2009 only.

I just bought the laptop that was configured like my dream laptop for RM 4,822. My dream previously cost RM 6,067 in July 2009.

Granted that Studio is not the Studio XPS, but my Studio has a faster T9600 CPU.

The catch is that Studio 14 is soon to be replaced by Studio 14z.

I love to get this end of season deals.

string.Template with default substitution value

I wanted a string.Template class that will substitute placeholders with a default value if the mapping is not provided.

For example, say I create a template

A template with $value1, $value2

When I substitute this template with values, say I provide only $value1, I want other $variables to be substituted with a default value. If my default value is HAHA. and I provide this map {‘value1′: ‘first_value’}, the result is

A template with first_value, HAHA

Creating the class was very simple (in retrospect).

I just subclassed string.Template and provided my own version of safe_substitute.

 

Here’s the class, complete with doctest code.

 

import string
 
class Template(string.Template):
    """
        Template with modified functions
 
    -- doctests ----
    >>> t = 'this is a $test with $result'
    >>> st = Template(t, 'haha')
    >>> d = {'test': 'a big test'}
    >>> result = st.safe_substitute(d)
    >>> expected_result = 'this is a a big test with haha'
    >>> test_result = True if expected_result == result else 'expected %s >>> but got <<< %s' % (expected_result,  result)
    >>> test_result
    True
    >>> st = Template(t)
    >>> d = {'test': 'a big test'}
    >>> result = st.safe_substitute(d)
    >>> expected_result = 'this is a a big test with $result'
    >>> test_result = True if expected_result == result else 'expected %s >>> but got <<< %s' % (expected_result,  result)
    >>> test_result
    True
 
 
    """
 
 
    def __init__(self, template, default_substitution_value = None):
        string.Template(template)
        self.default_substitution_value = default_substitution_value
        self.template = template
 
 
    def safe_substitute(self, *args, **kws):
        '''
            Returns template with placeholders substituted
              if no substitution value is specified, the
                  default_substitution_value
                  is used
        '''
        if len(args) > 1:
            raise TypeError('Too many positional arguments')
        if not args:
            mapping = kws
        elif kws:
            mapping = _multimap(kws, args[0])
        else:
            mapping = args[0]
        # Helper function for .sub()
        def convert(mo):
            named = mo.group('named')
            if named is not None:
                try:
                    # We use this idiom instead of str() because the latter
                    # will fail if val is a Unicode containing non-ASCII
                    return '%s' % (mapping[named],)
                except KeyError:
                    if self.default_substitution_value:
                        return self.default_substitution_value
                    return self.delimiter + named
 
            braced = mo.group('braced')
            if braced is not None:
                try:
                    return '%s' % (mapping[braced],)
                except KeyError:
                    return self.delimiter + '{' + braced + '}'
            if mo.group('escaped') is not None:
                return self.delimiter
            if mo.group('invalid') is not None:
                return self.delimiter
            raise ValueError('Unrecognized named group in pattern',
                             self.pattern)
        return self.pattern.sub(convert, self.template)

 

I built the above because I was building an interface to populate P2 Energy’s Field Operations equipment readings. The application sends data via xml files and there are many attributes in the file that I did not care to populate. Rather than hand code a default value for each of them, I built the above python class.

Windows 7 upgrade

According to this piece of news, Windows 7 upgrade from Vista can take a almost a day !

Whoa ! I was tempted to get a Vista system with upgrade option but now I would not.
Slashdot Technology Story | Windows 7 Upgrade Can Take Nearly a Day

A clean 32-bit install on what Microsoft calls ‘high-end hardware’ should take only 30 minutes. In the worst case scenario, the process will take about 1220 minutes. That second extreme is not a typo: Microsoft really did time an upgrade that took 20 hours and 20 minutes.

Pages:«123»