Java Runtime Environment Display Issues on NVIDIA GeForce FX 5200

June 2, 2011

The Java Runtime Environment (often called JRE, J2RE, Java Standard Edition, or JSE) is a set of software which allows your Windows system to run Java programs alongside your regular applications or within your web browser. Java is a programming language and software platform. Java applications run inside of a virtual machine which translates the portable Java code to native code on the host operating system. More information is available here.

On Windows, you usually use the Oracle (previously Sun Microsystems) version of the Java runtime (downloads available here), older versions available here. Note that there is a Microsoft Java VM (also called the MSJVM, or Microsoft VM), but because of a lawsuit from Sun, Microsoft is no longer allowed to distribute it. It can be downloaded from here and will still install into modern Windows versions, but it is quite old and unmaintained. There is also an IBM JVM (also known as J9), however IBM requires that you license it, so it is really only used internally or made available for IBM branded systems.

I’m currently running the current release of the JRE: Java 6 Standard Edition Version 6 Update 25 (build 1.6.0_25-b06). The issue I’m experiencing has appeared in many older releases which I was running under 32-bit Windows 7.

Basically what happens is that Java applications fail to display some contents of windows or controls. The objects which fail to be drawn correctly are different across various Java applications (ie. one might fail to draw the contents of a text box, another may fail to draw in a button caption, a third may not have any problems at all). However, for each application the same thing will always fail to be drawn no matter how many times you run it again (ie. the first application will fail to draw text box content, and this will happen every time the application is run). The buggy control will function normally even though you cannot see it’s contents (ie typed text will still be in the edit field, blank buttons can still be clicked). In a few cases the window is not functional at all (parts of the Java control panel even do this sometimes).

At first I thought my system was running out of handles, but Task Manager was able to load correctly with all of it’s window contents. Under Task Manager I was able to confirm that the Java process wasn’t using any resources excessively or doing anything else out of the ordinary. When I started troubleshooting the issue, I tried many different JRE versions, web browsers, and even a completely different installations of Windows 7. I also tried changing various settings under the Java control panel with no success. There were also not many other users who were reporting the same problem on the net, so it’s most likely not an issue caused directly by the Java Runtime.

I found that it would usually draw the missing content if I would minimize the window to the taskbar and then restore it (by clicking it’s icon in the taskbar). It also works sometimes if you drag the window onto another screen. As soon as the control refreshes or updates itself, the content will disappear again. You can keep minimizing and restoring the window over and over again in so you can view and interact with the missing contents…this can quickly become very annoying though!

Because the graphical content of the window is visible when it’s restored, it appears to be a problem with the display driver and some hardware accelerated graphics routines which Java uses. I tried lowering the graphics acceleration slider under the advanced display properties, but it didn’t have any effect (even at the lowest level).

I have an NVIDIA GeForce FX 5200 and am running the most current Windows 7 compatible driver release provided by NVIDIA (from their support/download page) for that adapter: version 9.6.8.5 (09/10/2006). The NVIDIA drivers and tools don’t provide many options which you can customize, I changed a few of the 3D options but none of them had any effect on the problematic Java applications.

The driver is old and will never be updated to fix this bug. From the sounds of their release notes, this version fixes many more significant problems in other programs, so downgrading to older versions of the drivers is probably a really bad idea. Java has used hardware accelerated drawing for a long time now, and you’d have to downgrade to a much older version which probably leaves you open to some nasty exploits. In the end it’s probably going to be easier to just replace the video adapter! The GeForce FX 5200 is old and was never a great video card anyway (I just use it because it was the cheapest AGP card I was capable of running Aero).

So for now the best solution is to use the minimize/restore trick for the Java applications that have problems, or replace the video card. If I have any more ideas or discover anything else, I’ll post it here!


Fixes for a Few Lotus Notes Issues

June 1, 2011

A few years ago, I was an IBM employee and was introduced to their incredibly complex and broken groupware solution known as Lotus Notes/Lotus Domino.

You have to understand that Lotus Notes and Domino are an excellent system for rapidly developing and sharing database applications across large networks. IMHO there was some point where IBM needed a groupware system for handling stuff like messaging, calendars, meetings, contact lists and so on. Storing this information in database files is the most efficient way (when done right) for storing and retrieving that kind of data (Microsoft Exchange and Outlook do this and are extremely fast). Since Lotus Notes/Domino was already a capable database system, they shoe-horned the groupware features onto it. The bolted on features do work but they have many issues. They have continued to bolt on features as newer things (like internet e-mail, instant messaging, and web sites) have become more relevant, resulting in a lot of additional complexity. Although it often appears to be a huge mess, it’s configuration is very flexible and deep down in it’s design there some very intelligent features.

Over the years I learned quite a few little tricks which are quite handy and can make Notes less frustrating when you have to use it daily.

“An Error Occurred While Opening a Windows” When Notes is Launched

This error usually occurs when Lotus Notes is terminated unexpectedly from a crash or the user ending it’s task when it’s locked up. I’ve also seen it appear when Notes Minder (nminder.exe) has been loaded before the Notes (notes.exe) application itself.

Lotus Notes uses quite a few different executables other than just ‘notes.exe’ which work together in the background. When some are still left open from an older session this and other errors can pop up. I suspect that it is because of an important shared DLL which all of the Notes executables use.

Simply open Task Manager and kill off the Notes background processes (ntaskldr.exe nlnotes.exe). If the error persists kill off any other Notes processes, or just reboot the workstation.

Lotus Notes Opens and Immediately Exists Without and Error

The Notes.ini file in the Lotus Notes program folder (usually “C:\Program Files\IBM\Lotus\Notes”) contains the bulk of the core Lotus Notes client configuration (most of the user configuration is stored in separate NSD files). You can open this file up in a text editor like notepad.exe and edit it.

If there are any invalid characters that appear in the file before the “[Notes]” section header, the Notes application will not read the configuration file and will fail to work. Usually Windows Notepad will display a bunch of black boxes to indicate that the character is not part of the regular ASCII range (which Notes expects). Remove any invalid characters you can see, or often it’s better just to delete all of the file contents at the beginning of the file, up to and including the “[Notes]” header, and then just re-type it so there is no way it is corrupt.

Clearing Notes.ini to Set Lotus Notes Back to it’s Original Configuration

The Notes.ini file in the Lotus Notes program folder (usually “C:\Program Files\IBM\Lotus\Notes”) contains the bulk of the core Lotus Notes client configuration (most of the user configuration is stored in separate NSD files). You can open this file up in a text editor like notepad.exe and delete all but the first three or four lines so that it reads:

[Notes]
KitType=1
Directory=C:\Program Files\IBM\Lotus\Notes\Data
InstallType=2

The next time the Notes application is run, it will go through the initial  setup wizard and restore all of the deleted settings with fresh ones that will hopefully work properly. Note that user information like their mail, address book, workspace…even connection documents are all stored in separate NSD databases which are untouched and will be able to work again as soon as the wizard completes.

Create a New Connection Document Using the Server’s IP Address

If your connection documents are broken or if you notice that Lotus Notes is taking a long time searching for servers (by contacting other known servers) , you may have problems with corrupt connection documents.

It is easy to force Lotus Notes to create a new connection document. Bring up the open database dialog (CTRL-O) and paste the server’s IP address into the top (Look In) field. When you hit enter it will create a new set of correct connection documents for that server.

This also can work with servers that are connected to your Lotus Notes client via a passthru server. If the passthru is configured correctly, Notes can contact any of the other Domino servers behind the passthru and obtain the connection information for the server you want to create a connection document for.

Finding Missing Files Using “Add Documents” View

If you’re ever missing a file record that you know should be present in a database but you cannot see in the regular work views, you can always locate it under the “All Documents” view. If the file exists in the database it will appear under this view, you can view it’s properties to find the path if it’s been moved, or confirm if it’s not showing under the regular view (see the date issue below for an example). If it’s not there then it’s really been removed.

Improper Modification Dates on Databases (Future Date Issue)

Sometimes the dates on database files (especially e-mail boxes) become out of sync. When this happens, documents will not appear in the regular views because they have a delivery date which is in the future. They will become visible when the system date reaches the future date that Lotus Notes thinks is the present, however newer documents delivered in the present will continue to be delivered with a future date and will continue to be hidden.

You can spot it by checking the database properties. If it’s modification date is in the future, you have this problem. Database consistency checks (in the GUI or with nfixup.exe) will fail as a result of the bad dates.

I don’t recall the exact explanation of why this occurs, but it does happen in a few ways, and I remember it was often caused as a result of switching time zones under Windows, or from performing date adjustments while Lotus Notes is running. Lotus Notes probably maintains an internal time counter when it’s launched that goes out of sync with the actual system time.

Using NFIXUP.EXE to Perform Consistency Checks

Notes comes with a command line tool named NFIXUP.EXE in it’s program folder which can be used to manually perform consistency checks on database files. It requires the full path to the nsf file, and make sure Notes is closed before you use it.

Performing the check through the command line tools is much faster than checking the files in the Notes GUI, and it provides extra details about the problems fixed or any fatal errors. It sometimes has better success with fixing the files as well.

It should also be noted that templates and layouts are also regular database files, only with a different file extension, so they can be fixed with this tool as well.

Using NCOMPACT.EXE to Compact Databases

When you delete a record or series of items from a Notes database, it doesn’t actually remove the data or resize the database file. It most likely just marks the records or blocks as deleted in a bitmap. When it needs to copy new data into the database, it writes the new data into the blocks and space which were marked as deleted. This increases the performance of the database a lot because it doesn’t have to shift existing data blocks or resize the database file, it just fills the old blocks and updates a few pointers in an internal structure.

However, there may situations where the database file grows to a large size and remains that way, with only a small amount of it’s space actually being used for data. For example, your mail box may have a large number of messages and attachments which makes your mail file over 1GB in size. If you delete all of the messages and attachments, and only receive a couple of messages in the months afterward, you will still have a mail file over 1GB in size (even though it’s almost empty)! Compacting it will remove all of the extra blocks of space in the database which are empty and will never be used.

You can check the percentage of database space actually used against the database file size in the database properties, and compact it from here as well (if you have the permissions).

The command line tool NCOMPACT.EXE will also compact a provided database file, and is often faster at performing the operation from the command line (close Notes first).

Rebuilding Views and Indexes

Indexes speed up searching the database by and it’s beneficial to create one for all of your databases if you can. Indexes can become out-dated or corrupt causing problems. You can delete the old index (if corrupt or really old) and create a new one under the database properties.

Views also use their own indexes and these can also become corrupt and invalid. You can force them to be updated by pressing CTRL-SHIFT-F9.

Moving Records Between Databases With Cut and Paste

You can easily copy selected files/records or all of them into another database file using copy and paste. It is that easy! This is especially handy for doing manual archiving or backing up data from encrypted databases into other database files.

Corrupted Database Templates

This can be an issue when you are suddenly receiving strange errors related to variables or other Lotus Script elements while using the database layout, and it hadn’t been updated or reported the errors when used previously.

Replace the database template with a copy from server. Sometimes you may just have to use one of the generic ones that ships with Notes. Also remember to update the views again as well, since they may cause other errors after a template update/replace.


Solution for Compaq Presario 2100 Laptop Random System Lock-ups With a PCMCIA Wireless Adapter

April 28, 2011

Over the past few months a strange problem had surfaced on my Compaq Presario 2100 laptop where it would lock up completely while it was in use. If any sound was playing it would skip endlessly, the mouse and keyboard would not respond, the hard drive led would remain lit. The system would freeze completely and not respond until it was powered off and on again (by holding the power button down for 4 seconds). The problem became more frequent over time and was completely random, making it extremely frustrating to use.

Troubleshooting:

My Compaq Presario 2100 was running Windows Vista (using the driver setup from my earlier blog post) and had initially attributed it to a possible driver issue with my hacked Vista setup. I tried many different configurations (different versions of the drivers, various BIOS and driver settings, different PCMCIA wireless cards and drivers) in an attempt to locate the incompatible driver(s). Eventually I performed a clean install of Windows XP, and was dismayed when it started locking up (before I had even finished installing the drivers and system updates). This confirmed that the problem must be related to the physical hardware.

I cleaned the vents and internal fans with compressed air and confirmed that there was no problem with excessive heat inside the laptop. I ran a full chkdsk (with the option to test and locate bad sectors) which found no problems with the file system and didn’t lock up during testing, which indicates to me that the hard disk is good. I swapped out the two sticks of DDR SDRAM and it didn’t seem to affect the issue at all. This was extremely frustrating because I knew the system had worked fine before, yet after so much troubleshooting I was unable to find any reasonable cause or solution for the laptop locking up constantly.

The Cause:

There are numerous reports from people having problems with the Presario’s PCMCIA/CardBus under both Windows and Linux. After reading through many manuals, technical documents, FAQ’s, forums and various other bits of information related to the Compaq Presario 2100, I found that some Compaq Presario laptops have poorly implemented PCMCIA/CardBus chipsets or non-standard sockets that do not supply enough power to the cards. Some are so bad you simply cannot use any PCMCIA cards at all.

This is no surprise… Compaq used cheap hardware components and many of their systems were poorly designed. The USB on the Presario 2100 is also underpowered, when you plug devices into both USB ports it can cause the system to stop responding (until one device is unplugged) or the USB devices may behave erratically. The onboard MacPhyter ethernet controller also has problems with being flakey and having poor network performance.

The Solution:

Avoid using any PCMCIA cards in the laptop.

I stopped using my PCMCIA wireless adapter and the laptop has not frozen a single time since.

I haven’t tested a wide range of cards but I did try three or four different PCMCIA wireless adapters and all of them caused the laptop to lock up (some more often than others). I will try a few other cards in the near future and see if they still cause problems, but I suspect all of them will cause the laptop to lockup.

Other Solutions for Connecting to Wireless:

If you use a PCMCIA wireless adapter then there are a few solutions for wireless networking on the Presario 2100 which do not use the PCMCIA slot.

A USB wireless adapter or tethered mobile device (like a cell phone) will work fine, however performance may not be the best. The Presario 2100 doesn’t have USB 2.0 so the transfer speed of the USB ports is fairly slow. There are also problems with the power to the ports (as mentioned above), which may cause issues if another USB device is plugged in or the wireless adapter draws too much power.

The Presario 2100 has a mini-PCI slot on the bottom of it’s motherboard which you can access via a removable metal panel on the bottom of the laptop. The panel is unmarked (no icon beside it or on it) and positioned to the right. You have to remove two small black phillips screws and the panel should open up revealing a single card slot.

The mini-PCI slot is standard and can use any kind of mini-PCI wireless card you put into it, even models from other laptops. You may have issues with some Intel wireless adapters which rely on an Intel chipset for some functions (and will not work properly on an ATI chipset like mine has). Broadcom wireless cards are very popular and should work without any problems. The mini-PCI slot is fast and will not have any issues with performance like you would have using USB.

I used a Broadcom BCM4x card which I pulled from an old Acer TravelMate in my Presario 2100 and it worked flawlessly. The only problem I had with this method was that my Presario 2100 had no wireless antennas inside the chassis at all (many other laptops have the antenna wires inside the display or base with open connectors by the mini-PCI slot which you can connect to the card when it is installed). The Presario 2100 has nothing. Without antennas the internal wireless card will not be able to pick up wireless signals properly and is almost useless. I had to salvage two antennas from a broken Dell Latitude and manually install them into the Presario 2100 chassis.


How to Backup/Sync iPhone Apps Installed With Installous and iTunes

March 27, 2011

Installous is an app used on jailbroken iPhones which you can use to easily locate, download and install cracked iPhone applications. It can be installed using Cydia from the cydia.hackulo.us repository. Installous provides a nice app store style interface with download links for cracked packages stored on popular file storage web sites (like MediaFire). It manages the downloads, stores the cracked IPA packages on the iPhone’s file system, and then installs them onto the iPhone. I also use AppSync which allows you to use iTunes to sync cracked IPA packages from your iTunes library and install them onto a jailbroken iPhone.

Installous provides an option for iTunes Sync but it does not always work as expected. If you install cracked apps using installous and then perform a sync in iTunes, you might run into a problem where iTunes removes the apps during a sync. You might also want to copy the cracked IPA packages which Installous downloads onto your iPhone to your iTunes library, but find that the packages are not backed up during a sync like other packages from the app store.

The solution is to first install the app with Installous and then connect the iPhone to the computer with iTunes. Right click on the iPhone under the left pane in iTunes and select “Transfer Purchases” (or left click to select the iPhone under the left pane and go to “File” –> “Transfer Purchases from … Phone” under the main iTunes menu). iTunes will copy the cracked apps into the iTunes library without any problems and they will no longer be deleted during the next sync.


Using the NVIDIA GeForce2 MX400 on 32-bit Windows Vista / Windows 7

January 8, 2011

The GeForce2 MX400 is an older NVIDIA graphics card which is no longer supported in Windows Vista or later versions of Windows (including Windows 7).

Windows Vista introduced a new display driver model (WDDM) which offers significant changes and improvements over the previous model (XPDM) used in Windows XP/2000/2003. WDDM requires advanced GPU features which are not available on many older graphics cards. Windows Vista can use XPDM drivers which means you can install versions of drivers which vendors have provided for Windows XP, but there are a lot of stability issues with most of them. Vista includes updated XPDM drivers for a limited number of legacy cards which are installed automatically work properly. For most legacy display adapters it will simply install the “Standard VGA Adapter” driver. This driver works fine for many things, but it ignores the extra features supported by many adapters (like multiple displays, larger screen resolutions, configurable CRT monitor refresh rate, and DirectX/OpenGL hardware acceleration).

The GeForce2 MX400 has decent enough features to be useful for regular users who don’t need a lot of GPU power (for gaming etc.). The problem is that the XPDM drivers for legacy NVIDIA display adapters included with Windows Vista only support the GeForce4 series or newer.  The GeForce2 MX400 is installed as a standard VGA adapter which cripples many of it’s capabilities.

Luckily, the Windows 2000/XP drivers provided by NVIDIA (version 91.31) work flawlessly in Windows Vista and Windows 7 without any modifications. Download the driver package here. The installation will fail if you try and run it, but you can extract the contents of the exe package to a directory using WinRAR. Open Device Manager (devmgmt.msc) and  expand the “Display Adapters” section, then update the driver for the “Standard VGA Adapter” (right click on it and select “Update Driver Software…”). Choose to manually select the device driver and then browse to the location where you extracted the NVIDIA driver files (you should see the ‘nv4_disp.inf’ file within the directory). Windows should find the correctly matching “NVIDIA GeForce2 MX/MX 400” driver and allow you to install it. Once you reboot the system the driver should work properly and support all of the adapter’s additional features. You can confirm that they are working correctly by running ‘dxdiag’ and checking under the ‘Display’ tab. All of the features listed under the “DirectX Features” section should be “Enabled”.


Windows Live Messenger Shows Contacts as Offline When They Are Really Online and You Cannot Send Offline Instant Messages to those Contacts

November 7, 2010

Recently I discovered a strange phenomenon under Windows Live Messenger 2011 (and it apparently also affects Windows Live Messenger 2010 as well). Some of your contacts will always be shown as being in “Offline” status when they are actually online (they show up as Online in other Messenger clients). You can receive instant messages from them, and messages sent to them from other clients also show up in the instant message windows of Windows Live Messenger 2011. When you attempt to send them an offline instant message, it reports: “The following message could not be delivered to all recipients”, and fails to send it it.

My wife is usually logged into a Windows Live Messenger instance through her cell phone carrier, and I often use Windows Live Messenger to send messages to her cell phone. For the past week or so my copy of Windows Live has shown her as Offline and failed to send her offline instant messages, which I initially thought to be a problem with her cell phone carrier’s system. When I started receiving messages from her which I could not reply to, I opened up Windows Live Web Messenger and verified that she was actually online the whole time. Web Messenger could also send her instant messages, which oddly enough would show up in the Windows Live Messenger 2011 instant message window.

I suspect that it is most likely a problem between the Windows Live servers and different versions of the Messenger protocol.

In the case of my wife’s account, I think her cell phone carrier’s software is using the old Messenger protocol, and it is somehow not being properly linked to the Windows Live servers (and ultimately clients) using the new protocol. Windows Live Web Messenger probably uses the old protocol.

The only solution seems to be to use a client which uses the older Messenger protocol.

You can use Windows Live Web Messenger which has no problems. The online version of Windows Live Messenger which is integrated into Windows Hotmail doesn’t work as it seems to (at least on my system). You can install Windows Messenger alongside MSN/Windows Live Messenger. It is lacking a lot of features and doesn’t always work well…but it is handy for situations where MSN/Windows Live Messenger is not working. You can download Windows Messenger 5.1.0701 here. To install it under Windows Vista or Windows 7 you will need to use a workaround or disable UAC to get the messenger.msi file to install correctly.