Click or drag to resize
DigitalRuneFAQ
Setup and first steps

Installation of Window Phone SDK 7.1.1 fails.

The setup of the Windows Phone SDK 7.1.1 fails if a newer version of the Microsoft Advertising SDK for Windows Phone is already installed on the system.

Solution:

  1. Download the latest version of the Microsoft Advertising SDK for Windows Phone 8.
  2. Remove the previous installation by running the setup. (If the Ad SDK on the PC is older, then install latest version first, and then run the setup again to uninstall it.)
  3. Install the Windows Phone SDK 7.1.1.
  4. Re-install the latest version of Microsoft Advertising SDK for Windows Phone.

Installation of XNA Game Studio or Windows Phone SDK fails on Windows 8.

Error "Object reference not set to an instance of an object" when loading sample.

Error loading pipeline assembly "..\References\XNA\Windows\x86\DigitalRune.xyz.dll".

When .NET libraries are downloaded from the web, they are treated as assemblies from a network location. This results in a reduced set of privileges on the local machine.

Solution: Unblock the ZIP package before extracting the files. See Installation instructions.

Error loading pipeline assembly "MonoGameContentProcessors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"

This error message may appear when trying to build content for MonoGame.

Solution: According to https://monogame.codeplex.com/discussions/362886 you need to have

installed. Older version of XNA Game Studio do not work and will cause this error.

Unable to load DLL 'd3dcompiler_43.dll'.

Solution: Install the latest DirectX Runtime.

A first chance exception of type 'X' occurred in Y.dll

Depending on your Visual Studio settings, you might see first chance exception messages in the Visual Studio Output window. For example: A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll . This message is printed even if the code properly catches and handles the exception. Therefore, this message does not necessarily indicate a problem.

Sometimes exceptions cannot be avoided in .NET. For example, some storage APIs do not allow to check if a file exists, and the only way to check if the file exists is to try to access the file and catch an exception if it doesn't exist.

Whether the debugger breaks on first chance exceptions can be configured in the Visual Studio | Debug | Exceptions… dialog. If Visual Studio | Options | Debugging | General | Enable Just My Code is enabled, the debugger will not handle or log first chance exceptions in third-party DLLs.

Content

Cannot load effect: Wrong MGFX file version!

This error occurs when an effect built for XNA is loaded in MonoGame.

Solution: Check if the content processor is set to "MonoGame Effect" in the content project and rebuild the content.

InvalidOperationException: Cannot find content processor "MGEffectProcessor".

This exception may be thrown when trying to build an XNA project.

Solution: Check whether the environment variable "MONOGAME_PLATFORM" is set on the system. If so, remove the environment variable.

This environment variable causes the content pipeline to build the content for a MonoGame platform instead of XNA. The environment variable is set and removed automatically when a MonoGame project is built. However, if the build of the MonoGame project fails, the environment variable may not be removed. This subsequently causes problems when an XNA project is built.

What is the recommended scale for 3D models?

We recommend using the SI standard units. For length: 1 unit = 1 meter (Currently all constants in our libraries are using the SI standard units. If you prefer a different system of units, you need to adjust the constants in the libraries and in the samples.)

Some models in our samples are modeled with a different scale. We correct the scale by settings the Scale parameter of the Model content processor (in the VS Properties window).

Miscellaneous

How to enable/disable multithreading

Error: Overflow or underflow in the arithmetic operation.

Problem: A Math method unexpectedly throws an ArithmeticException ("Overflow or underflow in the arithmetic operation."). This exception may originate in user code or in one of the DigitalRune libraries.

Solution: The problem is usually not caused by the DigitalRune libraries. The problem is most likely caused by a native third-party library, which has set the C floating-point math package into a state that is incompatible with .NET. To resolve the problem call _fpreset as described here: "Overflow or underflow in the arithmetic operation" on StackOverflow

Why is feature X slow / not optimized?

If you are using a feature of the DigitalRune Engine and it is not fast enough, let us know. Many problems can be improved using some simple performance tips. Also, if you tell us how the engine is used and which parts can be bottlenecks, we can try to optimize these parts in future releases.

Please note that we spend a lot of time profiling and optimizing the DigitalRune Engine. However, our libraries are general purpose libraries, which means, they are sometimes not as efficient as a simple highly optimized library which has only a single purpose. For example: The DigitalRune Geometry library supports collision detection with closest-point queries, mirrored objects, many different shape types, and many other edge cases. These features make the engine powerful and simple to use - but it can add a performance overhead.

In addition, the engine is optimized for typical usage in 3D simulations and games. For example, the collision detection and physics simulation are designed for typical gaming scenarios (regarding shape types, number of objects, etc). The API is flexible and can be used for wildly different scenarios (e.g. large scale simulations, ray-tracing, etc.) - but the engine might need minor modifications to optimally support scenarios which we have not anticipated.

If you need maximal performance, you can also download the source code and optimize the code for your specific use case.