DB3D: An exception is thrown when load a wireframe from file with the option "Auto scale" checked.


By default the “Auto scale” option is checked, and the exception is always thrown and the application does nothing to handle this exception.
When the “Auto scale” option is unchecked, this issue is not repro.


1. Windows2003 ENT ENU
2. Yukon DEV ENU 09.00.3032.00
  1. Sample MSI 61214
    4. Whidbey 8.0.50727.42

Repro Steps:

1.Run script InstallCS.sql.
2.Run db3dwin.exe.
4.Click "View", check "Auto scale". (By default Auto scale is checked.)
3.Click "File" -> "Open from file...", browse to a wireframe model file and load it into the DB3D sample application.
4.Minimize the main window DB3D and an unhandled exception “System.ArgumentException: Scale” is displayed. (if NOT minimize the main window DB3D, this exception dose not affect the function of DB3D application and the exception is not displayed in front of the main window DB3D.)


The wireframe file should be loaded without any exception, even the exception is behind the main window DB3D.

Actual Results:

The Scale exception is thrown out. The exception is thrown out by the code of line69 in file Wireframe.cs.
The following is code quoted from file Wieframe.cs, which thrown out the “Scale” exception.
public double Scale {
get { return _scale; }
set {
if(0 >= value)
throw new ArgumentException("Scale");
_scale = value;
Closed Jul 28, 2009 at 7:09 AM by leilu


wrote Apr 28, 2009 at 6:41 AM

Modified the Ln 68 in the file "DB3D\CS\db3dlib\Wireframe.cs"-->set "if(0 >= value)" to "if(0 > value)".

wrote Jul 28, 2009 at 7:09 AM

Verified on Sample Build 90727