0

We are experiencing a strange problem with a software we already developed few month ago, today we had to reopen the app for the customer to make some improvement. But a strange exception start to show up. it seem that is coming from the ScatterView. But the strange thing the app is working on production and the code is the same what could be the cause? Here the exception.

System.TypeInitializationException was unhandled
HResult=-2146233036
Message=The type initializer for 'Microsoft.Surface.Presentation.Input.InteractiveSurface'  threw an exception.
Source=Microsoft.Surface.Presentation
TypeName=Microsoft.Surface.Presentation.Input.InteractiveSurface

Here you can find the full stack trace http://pastebin.com/y3vVurfm

Thanks I forgot to say the app is developed on .net 4.5

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
nukedbit
  • 453
  • 1
  • 4
  • 15
  • An API-call changed due to a software-update? Have you checked any Change-logs? – bash.d Apr 24 '13 at 09:00
  • Are you suggesting i should check for microsoft updates changelogs? – nukedbit Apr 24 '13 at 09:48
  • No, I mean that an implementation of the API might have changed and this is causing the errors. Check the documentation of the framework you are using. – bash.d Apr 24 '13 at 10:00
  • Ah ok, thanks but the api didn't change, microsoft do not updated it from last year – nukedbit Apr 24 '13 at 12:34
  • Have a look [here](http://msdn.microsoft.com/en-us/library/system.typeinitializationexception.aspx). – bash.d Apr 24 '13 at 12:39

2 Answers2

1

The runtime exception you are facing might be the result that you are compiling for Any CPU and are now using an x64 operating system. You can overcome this by recompiling for x86 only.

Please note: on Windows 8 there are some other restrictions in regard to have an application running that targets Microsoft Pixelsense / Samsung SUR40 (touch events not being reported). The Pixelsense SDK was created when Microsoft Windows 8 wasn't released yet, so don'T expect this being supported.

If you want to have support for both platforms see https://blogs.sevensteps.com/Lists/Posts/Post.aspx?ID=10 for an idea on how to achieve this.

Sascha
  • 10,231
  • 4
  • 41
  • 65
0

I encountered the same problem and finally found a solution:

The exception is thrown by a function in GetItemOrientation in Microsoft.Surface.Presentation.Controls.ScatterCanvas.

You can omit the failing function call in GetItemOrientation by setting the Orientation property on the ScatterViewItem yourself or by setting ScatterViewItem.CanRotate = false.

Community
  • 1
  • 1
Koen_R
  • 98
  • 9