Page 1 of 1

64 PR Launcher Exception

Posted: 2014-01-27 05:53
by timtherifleman
Just tried starting PR recently and now I have an error saying PR launcher had an exception. Never seemed to happen before.

Code: Select all

Project Reality Log File
PRLauncher.exe started at: 2014-01-26T21:51:19

Critical Error: An unhandled exception has occured. Details are as follows:

The type initializer for 'System.Windows.Automation.Peers.AutomationPeer' threw an exception.

Further details can be found in the following file:

[url]E:\Steam\steamapps\common\Battlefield 2\mods\pr\bin\PRLauncher.log[/url]

Please report this error to the Project Reality Team, and include the log file in your report.

[url=https://www.realitymod.com/forum/f27-pr-bf2-support]Visit Support Forum[/url]

 > System.TypeInitializationException: The type initializer for 'System.Windows.Automation.Peers.AutomationPeer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Automation.InvokePatternIdentifiers' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'UIAutomationCore.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at MS.Internal.Automation.UiaCoreTypesApi.RawUiaLookupId(AutomationIdType type, Guid& guid)
   at System.Windows.Automation.AutomationIdentifier.Register(AutomationIdType type, Guid guid, String programmaticName)
   at System.Windows.Automation.InvokePatternIdentifiers..cctor()
   --- End of inner exception stack trace ---
   at System.Windows.Automation.Peers.AutomationPeer.Initialize()
   at System.Windows.Automation.Peers.AutomationPeer..cctor()
   --- End of inner exception stack trace ---
   at System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus)
   at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
   at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
   at System.Windows.Interop.HwndKeyboardInputProvider.OnSetFocus(IntPtr hwnd)
   at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Critical Error: An unhandled exception has occured. Details are as follows:

The type initializer for 'System.Windows.Automation.Peers.AutomationPeer' threw an exception.

Re: 64 PR Launcher Exception

Posted: 2014-01-27 09:23
by LITOralis.nMd
This is the first I've seen this error for PRLauncher.
Apparently You are missing a core Windows file, UIAutomationCore.dll , the x64 version.
TO make it even stranger, this is a known windows 7 x65 bug , that MIcrosoft has never attempted to fix since so many 3rd party programs make use of the broken file.

1.
I suggest you download and install the .NET Framework 4.5.1

Download Microsoft .NET Framework 4.5.1 (Offline Installer) for Windows Vista SP2, Windows 7 SP1, Windows 8, Windows Server 2008 SP2 Windows Server 2008 R2 SP1 and Windows Server 2012 from Official Microsoft Download Center

2.
here is a copy of my file,
https://www.dropbox.com/s/euuzfgfh04we8 ... onCore.dll

please download and
should be placed in C:\Windows\System32

You then might need to register the .dll , idk. ??

reboot after installing the .net framework, then test. Let me know if it's solved.
----------------------------------

Here is the reference thread, you probably don't need to read this.
http://forum.avsim.net/topic/273341-her ... win-7-x64/

UI Automation Overview

You don't happen to play Microsoft Flight Simulator X do you?

Re: 64 PR Launcher Exception

Posted: 2014-01-27 20:58
by timtherifleman
Hello LITOralis and thanks for the advice.

First, before I read your reply, I originally went "downgraded" to framework 4.0 and the launcher would funtion normally again. I took your advice however, installed 4.5.1 and then moves the file so the Sys32 folder and PR launcher seems to work again! So thanks for the help on that. I also had another mod which I could never install before but now that is functioning again so I just got double the help.

In regards to FSX, yes I do play it and now I remember having to move the file outside the sys32 folder and the game would function normally. Ill probably test that later this week and see how that works out. If FSX has problems again, I will probably just move that file in and out of folders between games.

But thanks for the help again! Really appreciate it.

Re: 64 PR Launcher Exception

Posted: 2015-03-27 18:03
by samthegreat4
Sorry for bumping this thread, but I'm having the exact same problem. I've tried all the advice: reinstalling .NET Framework and replacing the uiautomationcore file. Alas, nothing works.

I could use some help as I want to play Project Reality again and have never had these kind of problems.

Code: Select all

Project Reality Log File
PRLauncher.exe started at: 2015-03-27T19:04:49

Critical Error: An unhandled exception has occured. Details are as follows:

The type initializer for 'System.Windows.Automation.Peers.AutomationPeer' threw an exception.

Further details can be found in the following file:

[url]E:\Games\Battlefield 2\mods\pr\bin\PRLauncher.log[/url]

Please report this error to the Project Reality Team, and include the log file in your report.

[url=https://www.realitymod.com/forum/f27-pr-bf2-support]Visit Support Forum[/url]

 > System.TypeInitializationException: The type initializer for 'System.Windows.Automation.Peers.AutomationPeer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Automation.InvokePatternIdentifiers' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at MS.Internal.Automation.UiaCoreTypesApi.RawUiaLookupId(AutomationIdType type, Guid& guid)
   at System.Windows.Automation.AutomationIdentifier.Register(AutomationIdType type, Guid guid, String programmaticName)
   at System.Windows.Automation.InvokePatternIdentifiers..cctor()
   --- End of inner exception stack trace ---
   at System.Windows.Automation.Peers.AutomationPeer.Initialize()
   at System.Windows.Automation.Peers.AutomationPeer..cctor()
   --- End of inner exception stack trace ---
   at System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus)
   at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
   at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
   at System.Windows.Interop.HwndKeyboardInputProvider.OnSetFocus(IntPtr hwnd)
   at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Critical Error: An unhandled exception has occured. Details are as follows:

The type initializer for 'System.Windows.Automation.Peers.AutomationPeer' threw an exception.[/quote]

Re: 64 PR Launcher Exception

Posted: 2015-03-27 21:54
by LITOralis.nMd
link to my WINDOWS 7 X64 file:
https://www.dropbox.com/s/wtsxz60zsrz2s ... e.dll?dl=0

Copy the DLL to C:\Windows\System32\
In an elevated command prompt: %windir%\System32\regsvr32.exe %windir%\System32\UIAutomationCore.dll

I know it seems the wrong way round by pacing a 64 bit dll into the System32 directory,, but that's the way it works.

Re: 64 PR Launcher Exception

Posted: 2015-03-27 22:57
by samthegreat4
'[R-COM wrote:LITOralis.nMd;2062947']link to my WINDOWS 7 X64 file:
https://www.dropbox.com/s/wtsxz60zsrz2s ... e.dll?dl=0

Copy the DLL to C:\Windows\System32\
In an elevated command prompt: %windir%\System32\regsvr32.exe %windir%\System32\UIAutomationCore.dll

I know it seems the wrong way round by pacing a 64 bit dll into the System32 directory,, but that's the way it works.
Thanks for the reply, but I already did a fresh install of Windows. This was not the only thing that was giving me an error: my snipping tool wouldn't start, my device manager wouldn't load, windows photo viewer didn't work, etc.

So I just went on a rage and reinstalled.