Troubleshooting

I cannot start the profiling of my application

  1. My application starts correctly, however an alert explaining that Optimizeit failed to attach is displayed
  2. My application ran successfully, however the Optimizeit profilers are not working correctly. Most of the profiler buttons are disabled. The CPU profiler shows "No profiler information"
  3. When starting my application, I get an alert reporting a Class not found
  4. When starting my application, the console reports that my JDK is not supported
  5. When starting my application, the console reports a java.lang.UnsatisfiedLinkError
  6. When starting my application, the console appears but closes immediately, Optimizeit times-out and I get a warning that Optimizeit was not able to attach to my application
  7. When starting my applet, the console throws an error: java.util.MissingResourceException: Can't find resource at java.util.ResourceBundle.getObject
  8. The previous statements did not help. What should I do next?
  9. Starting an applet from JBuilder does not work. Optimizeit keeps displaying error messages about the vm being not found
  10. Attaching to a remote process does not work. The remote audit system throws some exceptions and switching to the virtual machine information mode hangs the profiler

I have a problem during the profiling

  1. While profiling my application, my application stops or crashes unexpectedly
  2. While profiling my application, the console shows a lot of lines saying "Should not happen GCOPBuffer too small..." and then the virtual machine crashes
  3. While profiling my application, the application stops, the console shows a java.lang.OutOfMemoryError
  4. During a profiling session, OptimizeIt user interface becomes unresponsive. OptimizeIt window is all white

Miscellaneous

  1. How do I undo the integration with Symantec Visual Cafe?
  2. How do I undo the integration with IBM VisualAge?
  3. Why can't I profile applets with my JRE?
  4. Opening a snapshot does not work, Optimizeit says it could not attach to the virtual machine

I cannot start the profiling of my application.

1. My application starts correctly, however an alert explaining that Optimizeit failed to attach is displayed.

Optimizeit uses a default connection time-out of 10 seconds to attach to the virtual machine.
In some environments, the Optimizeit audit system may require more than 10 seconds to initialize. If this happens, select "Preferences" from the edit menu, select the "Launch" section and increase the connection time-out value.

2. My application ran successfully, however the Optimizeit profilers are not working correctly. Most of the profiler buttons are disabled. The CPU profiler shows "No profiler information".

Optimizeit's profiler runs inside the same virtual machine as the tested application. If the tested application ends, the virtual machine exits and Optimizeit loses contact with its profiler and cannot retrieve performance data (an alert saying "Test program exited" pops up in Optimizeit).

To resolve this problem, Optimizeit provides an option to disable the Java method System.exit(). This option can be enabled either by using the option "VM cannot exit" in the settings editor or by using the command line option "-noexit" (java ... intuitive.audit.Main -noexit ...). That way the virtual machine will not exit when your application ends. Use the Stop button in Optimizeit to exit the program when your profiling is complete.

3. When starting my application, I get an alert reporting a Class not found.

This error is very likely related to a CLASSPATH setting problem. Open the setting editor from the File/Settings menu, and make sure that the Class path section includes the paths to the packages and classes required by your application.

4. When starting my application, the console reports that my JDK is not supported.

The virtual machine you are using is not supported by Optimizeit. Optimizeit supports Sun JDK 1.1.x, 1.2 and 1.3, IBM JDK 1.2.2 and 1.3, as well as most virtual machines derived from Sun's virtual machine. Make sure to select a supported virtual machine in the Virtual Machines tab of the settings editor.

5. When starting my application, the console reports a java.lang.UnsatisfiedLinkError.

This error may happen if for some reason Optimizeit loads a library of an older version of Optimizeit. If you have a previous version of Optimizeit installed, make sure that your PATH does not point to this older version.
This problem can also happen if you have integrated a previous version of Optimizeit with an IDE or an application server. When you integrate Optimizeit with an IDE or an application server, the wizard that performs the integration may copy the Optimizeit library oii.dll in the Windows directory or in the IDE directory. The PATH may still reference the IDE directory causing the old oii.dll to be used, even if you have uninstalled the previous version of Optimizeit. In order to make sure the correct oii.dll is used, perform a find on your hard drives for the oii.dll library. Remove any oii.dll that is not located under the Optimizeit directory.

6. When starting my application, the console appears but closes immediately, Optimizeit times-out and I get a warning that Optimizeit was not able to attach to my application.

The console may flash when you are using a JDK or JRE located in a path with space. In the Virtual Machines tab of the settings editor, make sure to select a virtual machine located in a path without space.

7. When starting my applet, the console throws an error: java.util.MissingResourceException: Can't find resource at java.util.ResourceBundle.getObject.

Optimizeit starts your applet in the Sun applet viewer in order to profile it. The applet viewer throws that error when the HTML file of your applet specifies the size of your applet in percent. Make sure that the HTML file you are using to start your applet uses hard values for the width and height.

8. The previous statements did not help. What should I do next?

The best way to investigate the cause of the problem is to start your application from the command line.
In the following <OptItDir> is the directory where you installed Optimizeit (e. g. : c:\OptimizeItDemo\OptimizeIt40D)
In order to do that:

This may give more information.

If that still does not help, send an email to the Optimizeit support support@intuisys.com. Remember to include the version of Windows you are running, the version of Optimizeit and the version of the JDK you are using, and give as much information as possible about the problem. The more information you provide the quicker and more effective the response from the support team!

9. Starting an applet from JBuilder does not work. Optimizeit keeps displaying error messages about the vm being not found.

When you define a new virtual machine within JBuilder, make sure to select the executable "java.exe" in the bin directory, not in jre/bin
Optimizeit uses oldjava.exe to start applets and this executable does not exist inside the jre/bin directory.

10. Attaching to a remote process does not work. The remote audit system throws some exceptions and switching to the virtual machine information mode hangs the profiler.

Optimizeit 4.0 adds several new features and is not therefore compatible with earlier audit systems. Make sure the remote process you are attaching to is from a 4.0 version of Optimizeit.


I have a problem during the profiling.

1.  While profiling my application, my application stops or crashes unexpectedly

Take a look at the external console. It may give more information on what went wrong. If you do not have an external console, it means you have not selected the option "Open a console" in the settings editor. Make sure to select the option, and start the profiling again.

2. While profiling my application, the console shows a lot of lines saying "Should not happen GCOPBuffer too small..." and then the virtual machine crashes

This problem happens when the gc operation buffer is full. You can increase this buffer size with the GCOPSIZE property. For example:

in order to use 4 Mb:
-DGCOPSIZE=4
in order to use 6 Mb:
-DGCOPSIZE=6

The default value is 2 Mb and is generally large enough.
Add -DGCOPSIZE=n in the Extra Java parameters field of the settings editor if you start the profiling from Optimizeit.
Add this property to the command line if you start your application from the command line. For example:
java -classic -Xrunoii -Xnoclassgc -Djava.compiler=NONE -GCOPSIZE=6 intuitive.audit.Audit BusyApp

The gc operation buffer is a buffer that Optimizeit uses to take into account garbage collector actions.
When an action is received while the garbage collector is running, Optimizeit cannot use malloc and increases this buffer. This is why a constant needs to be used.

3. While profiling my application, the application stops, the console shows a java.lang.OutOfMemoryError

The virtual machine ran out of memory. You can increase the size of the java heap by using the extra java parameters -ms -mx (JDK 1.1) or -Xms -Xmx (JDK 1.2 and 1.3). For example -Xms128m -Xmx128m sets the size of the java heap to 128 Mb.
If you are starting the profiling from Optimizeit, add those parameters in the settings editor, in the field "Extra Java parameters".
If you are starting your application from the command line, add those parameters to the command line. The following command line starts for example the profiling of BusyApp with the JDK 1.3, setting the size of the java heap to 256 Mb:
java -classic -Xrunoii -Xms256m -Xmx256m intuitive.audit.Audit BusyApp

4. During a profiling session, OptimizeIt user interface becomes unresponsive. OptimizeIt window is all white

This problem can occur if OptimizeIt user interface runs out of memory. OptimizeIt itself is a Java program. By default the virtual machine is created with a minimum heap set to 8 Mb and a maximum heap set to 64 Mb.

You can override these default values by using the following environment variables:

These variables should be set to a new memory size. The notation should be compatible with the virtual machine options -ms and -mx. For example, 12000 means 12000 bytes, 64K means 64 Kb and 64M means 64 Mb.

The following procedure describes how to increase the max heap to 128 Mb on Windows NT.

  1. From the Start menu, select the Settings menu and then Control Panel
  2. Double-click on the System icon
  3. Select the Environment tab
  4. In the Variable field, type OIMAXHEAP
  5. In the Value field, type 128M
  6. Click on Set and then Apply
If increasing the heap size does not help, use the following procedure to troubleshoot the issue:
  1. Open Windows Explorer
  2. Browse and select the directory containing OptimizeIt
  3. Select the jre directory
  4. Double click on startOptimizeIt.bat to start OptimizeIt with a console window
  5. Recreate the issue. Please send us any error message / exception to support@intuisys.com
You may need to increase the console window buffer size to capture the whole error message. This can be done by:
  1. Selecting the Properties menu from the console window
  2. Selecting the Layout tab
  3. Entering a larger value in the Screen buffer size height field


Miscellaneous

1. How do I undo the integration with WebGain Visual Cafe?

Delete the file <CafeDir>\Bin\Components\oivcplugin.jar

Also, VisualCafe stores some classes and other archives in a repository. This repository can sometimes hold a reference to plugins. Rename the file <CafeDir>\local.rps <CafeDir>\local.rps.old and then start Cafe.
When a dialog popups, click yes. Cafe rebuilds the repository and the problem goes away.

2. How do I undo the integration with IBM VisualAge?

Remove the directory <VisualAge>\ivjtools\tooldata\OptimizeItPlugin and the directory <VisualAge>\ide\tools\OptimizeItPlugin

3. Why can't I profile applets with my JRE?

When you profile applets with JDK 1.2 or 1.3, Optimizeit runs your applet in the applet viewer using oldjava rather than java, in order to avoid security exceptions. The JRE 1.2 and 1.3 do not include oldjava. This is why Optimizeit requires a JDK to profile servlets.
However you can still profile applets with a JRE from Optimizeit by following these steps:
- edit the java.policy file of your JRE located under the lib\security directory of your jre
- at the end of the file include the following lines:
  grant codeBase "file:<OptItDir>/lib/optit.jar" {
   permission java.security.AllPermission;
  };
  You should replace <OptItDir> with the directory where you installed Optimizeit, using / instead of \ (for example: c:/OptimizeItDemo/OptimizeIt40D).
- set the environment variable OI_APPLET_JRE to true

4. Opening a snapshot does not work, Optimizeit says it could not attach to the virtual machine.

When you open a snapshot in Optimizeit, Optimizeit starts the snapshot reader with your snapshot and attach to it. Set the environment variable SnapAuditConsole to true. This causes the console to open when you start the profiling. The console may give important information if there are some problems.


Copyright (c) 1997, 1998, 1999, 2000, 2001 Intuitive Systems Inc. All rights reserved. Specifications subject to change without notice.
Optimizeit is a trademark of Intuitive Systems, Inc.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. All other brand names and products are trademarks or registered trademarks of their respective holders.