Missing OS Design View tab in PB 5.0

A common complaint about PB 5.0 is that the OS Design View tab will sometimes mysteriously disappear. The best answer I have is that people should be using PB 6.0. Unfortunately, that answer tends to make people want to punch me. In the interest of my own safety, here is what I know about alternative methods of resolving the problem.

The OS Design View tab is one of the places where the old PB shell code (VS 6.0 vintage 1998) meets up with the new PB object model (totally re-written and designed for integration with the VS 2005 shell). So this is more evidence that you can't put new wine in old bottles -- you'll almost always end up with leaks.

In the case of the OS Design View, most of the issues I've resolved were due to an exception leaking. Exception handling is a great thing, but it has the good/bad quality that it is often easy to forget that you're calling a function that can throw an exception (good when you don't need to handle it, bad when you do...).

Ideally, the exception will be caught by PB and PB will properly recover and/or display a useful error message, but this doesn't always happen, in which case PB just silently fails or crashes. Luckily, the exception type we use does a little bit of logging. The exception constructor will send a quick message to the system debug stream. Sometimes this message is useless, but every once in a while, the exception has enough information to help you track down the problem.

There are several utilities that can monitor the debug stream. DBMon.exe is a simple console tool that is part of the Microsoft Platform SDK. DebugView can be downloaded from the SysInternals website. If you run cepb.exe under a debugger such as WinDbg or Visual Studio, you'll also see the messages from the debug stream.

In the case of Missing OS Design View tabs, I have occasionally been able to track down the problem by monitoring the system debug stream while opening an OS Design (pbxml). For example, I saw an "Access Denied" exception that occurred while trying to open a file in an OS Design. The exception message included the file name. Removing the "Read Only" attribute from the file allowed me to successfully open the OS Design.

Obviously, this is a problem with PB. PB should probably be able to do its job with read-only access to the file. And if it fails, it should at least pop up a useful error message indicating what the problem was. Hopefully, we'll do better in the future. In the meantime, you can try to identify the file that is causing trouble for PB and remove the read-only attribute. While this might cause trouble for your source control system, you'll hopefully at least be able to get back to work.

  1. Start a debug stream monitor utility such as DbMon.exe or DebugView, then start cepb.exe. Alternatively, launch cepb.exe under a debugger such as Visual Studio or WinDbg.

  2. Recreate the scenario that is causing trouble. For example, if the OS Design View tab is missing when you open a particular OS Design, open that OS Design.

  3. Examine the messages logged to the debug output stream.

  4. If you find any messages that look interesting, try to resolve the problem they indicate. For example, if you see that one of the messages refers to an access denied failure when opening a particular file, verify that the file exists and that you can access the file. If the file is read-only, try removing the read-only attribute from the file using Explorer (right-click on the file and select "Properties") or the DOS Attrib command.

  5. Leave a comment below or contact me to let me know if this does or does not work for you!

Comments (4)
  1. David Vescovi says:

    Unfortunately your suggestion on moving to CE 6.0 does not work ether. I have seen the check boxes in the project properties build options disappear also (in CE 6.0).

  2. Doug E. Cook says:


    In my experience, PB 6 is much more reliable than PB 5. In addition, bugs reported in PB 6 are much more likely to get attention — there’s very little of PB 5 left in the version of PB we’re working on today, but there is a lot of PB 6, so we’re always interested in PB 6 bugs.

    Can you tell me more about the circumstances that made the build options checkboxes disappear? I assume you mean that the build options pane comes up, but that there are no options shown in the checkbox. I made a number of changes to this area for the next version of PB, and I fixed several bugs, but I don’t specifically remember fixing anything like this.

  3. Computer Help says:

    Really great information, has given me an idea for a blog of my friends.

Comments are closed.

Skip to main content