exception occurs when executing mpv

Aug 22, 2010 at 1:06 PM

Hi everyone,

I have problems with executing mpv

NModel, GLEE are installed. When I start mpv in the console:

mpv /r:NewsReaderUI.dll NewsReaderUI.Factory.CreateNewsReader

mpv starts but then a dialog box pops up with an error message:

"Unhandled exception has occured in a component in your application.....Parameter is not valid"

Details:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
   at System.Drawing.Graphics.set_Transform(Matrix value)
   at Microsoft.Glee.GraphViewerGdi.GViewer.DotOnPaint(Graphics g, Boolean forPrinting)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
mpv
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/NModel/bin/mpv.exe
----------------------------------------
NModel
    Assembly Version: 1.0.21029.0
    Win32 Version: 1.0.21029.0
    CodeBase: file:///C:/Program%20Files%20(x86)/NModel/bin/NModel.DLL
----------------------------------------
NModel.Visualization
    Assembly Version: 1.0.21029.0
    Win32 Version: 1.0.21029.0
    CodeBase: file:///C:/Program%20Files%20(x86)/NModel/bin/NModel.Visualization.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.GLEE.Drawing
    Assembly Version: 1.2.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/NModel/bin/Microsoft.GLEE.Drawing.DLL
----------------------------------------
NewsReaderModel
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Users/minhquang104/Desktop/Quang/NModel/Samples/NewsReader/bin/NewsReaderModel.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.Glee.GraphViewerGDI
    Assembly Version: 1.2.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/NModel/bin/Microsoft.Glee.GraphViewerGDI.DLL
----------------------------------------
Microsoft.GLEE
    Assembly Version: 1.2.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/NModel/bin/Microsoft.GLEE.DLL
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Has anyone ever encounter this problem?

Developer
Aug 23, 2010 at 2:32 PM

Dear minhquang104,

What model are you using? The NewsReader sample from Samples.zip does not contain any code for producing NewsReaderUI.dll nor does it use NewsReaderUI namespace. Please post the code that is causing the problems. The default NewsReader sample seems to work fine on 64 bit Windows 7.

Aug 24, 2010 at 9:01 AM

Hi jpe,

Thanks for your reply. My OS is Windows 7 64 bit.

 

The exception problem also occurs when I launch mpv for the samples. Here are the steps I did:

- Open C:\Samples\NewsReader\NewsReader.sln with Visual Studio 2008

- In Visual Studio: build that solution

- In C:\Samples\NewsReader\bin I can see all these .DLL files

Microsoft.GLEE.dll

Microsoft.GLEE.Drawing.dll

Microsoft.GLEE.GraphViewerGDI.dll

NewsReaderImpl.dll

NewsReaderModel.dll

NModel.dll

NModel.Visualization.dll

- In the C:\Samples\NewsReader\bin folder, I execute the console command

mpv /r:NewsReaderModel.dll NewsReader.Factory.CreateNewsReader

=> The above mentioned exception occurs

Any suggestions?

Developer
Aug 24, 2010 at 12:58 PM

Hi!

I can reproduce the problem now after having installed updates to the Windows 7 x64 I was experimenting in.

It seems that the modification to the GDI libraries of Windows 7 that cause the problem you describe were introduced with recent windows updates. NModel works fine in vanilla Windows 7 x64 but with updates it fails with the error you describe. It appears to be a problem related to how native Windows GDI APIs are called from the GLEE library. We will try to contact the people behind GLEE to see if they can provide a fix.

There is now a bug report for this issue. Thanks for reporting it!

-- jpe

Aug 24, 2010 at 1:56 PM

Hi jpe,

Thanks for your effort! Hopefully, the bug will be fixed soon.