TealPoint Logo


    The Palm Foleo - Thoughts for the Future
    Living with NVFS (updated)
  Crashes, Errors and PalmOS
    PalmSource Post Report
    What's That I Hear?
    Palms, ARMs, and Handhelds
    The Future of PalmOS
    Movies on the Move
    Hacks on your Handheld
    PalmOS Version-o-Rama
    Memory and the Modern Palm
    New PalmOS handhelds hit market
      Am I Compatible?
      How to Purchase
      How to Install
      Get Support
      Tech Articles
      Contact Us
      Site Map

Our Company...

      About Us
      Online Store

      Ad Banners
      PalmOS Links


PalmOS Tech Articles > #10, November 2004

Crashes, Errors and PalmOS
Your Guide to a Healthy and Stable Palm

PalmOS handhelds have become immensely popular largely due to their stability and ease of use. Sadly, though, in the end, Palm handhelds are really computers, designed and created by people, running software written and designed by other people, all of whom are decidedly imperfect. So, inevitably, from time to time, Palms still occassionally crash. Knowing the reasons why, and how to prevent them, is key to keeping your device as stable as possible and maximizing your handheld experience.


In the PC world, an epidemic of transmittable nasties have made viruses nearly synonymous with computer instability. At the same time, a booming industry has appeared protecting our desktops from catching the sniffles. But what is a virus anyway? Viruses, put simply, are programs that can replicate themselves, spreading onto other machines via infected disks, documents, and emails. They tend to make PCs unstable either by design or by the invasive methods they use to secretly spread.

So, when a Palm crashes, many assume it too must be a virus. The truth is, on the handheld, a crash is much more likely due to occur due to an invasive virus checker than an actual virus. Today, no Palm viruses are known to be in circulation, probably because current devices are not connected enough to allow an infection to spread very well. In fact, a careful read of the documentation of one virus product seems to indicate that the only viruses the product really stops are a few test viruses the manufacturer made themselves, calling into question the value of even installing a virus checker in the first place.


In reality, a large number of difficulties actually come when upgrading to a new handheld. PalmOS 5 is internally radically different from PalmOS 4 and earlier versions, and many older programs can't run correctly under PalmOS 5 without modification. Even worse, some apps cannot even be upgraded because they require functionality that PalmSource "voted off the island" when they "upgraded" PalmOS. Thus, when upgrading your handheld to OS5, be sure to check with program manufacturers to see if you'll need to upgrade your software first.


Sometimes, a crash is frustratingly difficult to track down because it's not obvious which program is at fault. For instance, after a system reset, PalmOS calls every program in main memory to perform initialization. If one of those programs has a bug or incompatibility with the operating system, it can crash or lockup the device with no hint of it being responsible. Worse yet, if the reset were originally prompted by the installation or activation of another program, the crash might falsely imply that the innocent new program were responsible.

To get around a reset-induced crash, perform a safe boot, sometimes called a "warm" reset. To do this, pinhole-reset the device while holding down the page-up button. PalmOS will start up without calling any applications, allowing you to use the device. You can then selectively delete suspect apps, performing a normal reset afterwards to confirm if the deleted apps had been the cause of the problem. Note that drivers and some system functionality will be disabled when running in "safe" mode, so you'll want to reset again after your tests to restore full functionality to your handheld.


Occasionally, problems occur during the HotSync process, particularly on OS5 handhelds. This is because the PalmOS5 HotSync application is unique amongst PalmOS applications, being compiled natively for the ARM processor. There is an ugly bug in the PalmOS PACE emulation layer which causes hacks, drivers, and background apps to crash if they call certain system functions during HotSync.

Unfortunately, there's no quick fix for this with a program whose manufacturer has not already found a workaround. At worst case, you may need to manually disable certain hacks or drivers during HotSync to prevent a crash or conflict.

Another issue, though, while not a crash, is more common. The PalmOS 5 HotSync app is very sensitive to timing, and if you are running certain background apps and drivers, it can be flakier than the crust on Mom's apple pie. In most cases, Palm's Portable Keyboard driver is responsible, making HotSync operations fail, especially if any other background apps are running. Again, this tends to falsely implicate other applications you may have just installed. If HotSyncs are unreliable, lose connection, or won't start, make sure to try disabling the Palm keyboard driver application, if present.

Lastly, crashes during HotSync can occur when Palm Desktop is trying to install apps. Many folks already know that trying to install new Hack or background app when an older version is still running usually preceeds a frantic search for a paperclip, pushpin, or other poke-worthy reset device.

What most people don't know, however, is that files can get "stuck" in your Palm Desktop install folder, causing HotSync to try to install these files again and again every time you HotSync. When they do, you get a crash every HotSync after turning on that Hack or background app. This usually occurs because files you've installed have their "read-only" property bit set, possibly because they were copied from a CD-Rom or other protected device. To fix the problem, find the "Install" folder under your device name in the Palm Desktop directory. Delete the stray files there after turning off their "read-only" status for those files.


The overwhelming majority of crashes, however, is due to running out of stack memory. This usually shows when running hacks, drivers, pop-up programs, and other "background" applications.

Normal, "foreground" applications are ones that you run from the system launcher. When you start another program, a standard foreground application exits and has no residual functionality at all after you exit them. Background applications, on the other hand, are different in that they can still run when you are inside other applications. Apps of this type include hacks, keyboard drivers, popup launchers, text input programs, some dictionaries, and security apps.

The Stack memory that these use is a precious pool of RAM that is shared by the foreground app and all running background apps. The default system stack is only about 5k. Because PalmOS was not designed with multitasking in mind, the amount of stack memory is determined solely by the current foreground application. Thus, it's up to background apps to each use as little stack space as possible, and each foreground app to allocate more stack space than it needs and thus voluntarily "play nicely" with background apps.

The sad thing, though, is that there's no absolute guideline for how much stack space a background app can use, or for how little extra space a foreground app can leave. No matter how "friendly" all the participants are, there will always be a finite limit to which and how many background apps one can run.

If you suspect a stack space crash, look for the following warning signs:

1) Stack memory overflows tend to result in unpredictable, sometimes spectacular crashes requiring a hard reset.

2) Specific error messages are rare, being a simple "Fatal Exception" if they appear at all.

3) Stack crashes usually go away when you turn off one or more background apps. Often, people take this as a sign that one particular app is defective. However, more often it is the *combination* of multiple apps overflowing the stack together which is really the problem.

If the crashes occur only when inside a single foreground application, you can often fix the problem using TealMover, whose "info" screen lets you increase the stack space requested by that app. The app must not be in ROM or flash memory, and the change is permanent unless you manually change it back or reinstall the app. Increasing the stack by 1k or 2k is usually sufficient.

If, on the other hand, crashes occur while in many different apps, the problem is probably due to the total stack space requirements of multiple background apps. If so, your options are more limited. Under PalmOS 3 or 4, you can use TealMemBrain to globally boost the stack space for all foreground apps. The effect is temporary, only lasting while TealMemBrain is running. But under PalmOS 5, you're sadly outta luck, and just have to choose to eliminate one or more background apps and test by trial and error until the system is stable again.


And so ends our little foray into the frightening world of technical support. I hope you've enjoyed the trip, and have learned a little too. The next time you're in contact with a customer support conscript, you now know some of the issues they battle every day. Kept in perspective, your handheld has no more issues than any other device, operating system, or manifestation of technology. However, understanding what few quirks that do exist can be a key to truly maximizing you handheld owning experience.

<<previous articlenext article >>

Home  |  Software  |  Add-Ins  |  Guides  |  Community  |  Press  |  Support  |  Site Map

This site is best viewed at 800x600 with Internet Explorer 4.0 or Netscape 4.0 or higher.
(c)1997-2008 TealPoint Software All rights reserved.