Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running app on Win2003 #849

Closed
ray007 opened this issue Feb 26, 2015 · 32 comments
Closed

Error running app on Win2003 #849

ray007 opened this issue Feb 26, 2015 · 32 comments

Comments

@ray007
Copy link

ray007 commented Feb 26, 2015

Trying to run our app on a Windows 2003 system, it doesn't start anymore and generates errors in the windows event log. The last release using CefSharp1 didn't have this problem.

The first one says

Faulting application lweb803.exe, version 2.1.0.6, faulting module kernel32.dll, version 5.2.3790.5295, fault address 0x0000bf93.

and the second one immediately after:

Application: lweb803.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException
Stack:
   at Loytec.LWeb.LWeb802.LWebView..ctor(Loytec.LWeb.LWeb802.LWebProjectSettings)
   at Loytec.LWeb.LWeb803.LWebWindow..ctor(Loytec.LWeb.LWeb802.LWebProjectSettings, System.String)
   at Loytec.LWeb.LWeb803.App..ctor()
   at Loytec.LWeb.LWeb803.App.Main()

Anyone an idea what could have gone wrong here?

@ray007
Copy link
Author

ray007 commented Feb 26, 2015

Info update:
Starting the executable under WinDbg, the console output ends with the following lines:

...
ModLoad: 75e60000 75e87000   C:\WINDOWS\system32\apphelp.dll
ModLoad: 4dc30000 4dc5e000   C:\WINDOWS\system32\msctfime.ime
ModLoad: 71b70000 71ba6000   C:\WINDOWS\system32\uxtheme.dll
ModLoad: 58050000 5809e000   C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\PresentationFramewo#\d53f32463627c26069cf63970b5da3f8\PresentationFramework.Classic.ni.dll
ModLoad: 10000000 100b9000   CefSharp.Core.dll
ModLoad: 10000000 100b9000   C:\Program Files\LOYTEC\LWEB-803\CefSharp.Core.dll
(b78.b14): Unknown exception - code c0000139 (first chance)
(b78.b14): C++ EH exception - code e06d7363 (first chance)
(b78.b14): C++ EH exception - code e06d7363 (first chance)
(b78.b14): C++ EH exception - code e06d7363 (first chance)
(b78.b14): CLR exception - code e0434352 (first chance)
(b78.b14): C++ EH exception - code e06d7363 (first chance)
ModLoad: 77b90000 77b98000   C:\WINDOWS\system32\VERSION.dll
ModLoad: 5e0d0000 5e17a000   c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll
(b78.b14): CLR exception - code e0434352 (!!! second chance !!!)
eax=0012e978 ebx=00000005 ecx=00000000 edx=0000004b esi=0012ea38 edi=00195b90
eip=77e4bf93 esp=0012e974 ebp=0012e9c8 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\KERNEL32.dll - 
KERNEL32!RaiseException+0x3c:
77e4bf93 5e              pop     esi

@pipiscrew
Copy link

I had the same issue installing VC++ 2012 runtimes, solved my problem...

http://www.microsoft.com/en-us/download/details.aspx?id=30679

@ray007
Copy link
Author

ray007 commented Mar 2, 2015

Unfortunately it's not about a missing VC++ runtime, the 2012 redist is even part of our installer.
Checking installed software in the VM, I see VC++ runtimes 2008, 2010 and 2012.

And from the docs for FileLoadException on microsoft.com:

The exception that is thrown when a managed assembly is found but cannot be loaded.

@pipiscrew
Copy link

warning, should be installed the VCx86 or VCx64 depends on which platform you have built the application..

@ray007
Copy link
Author

ray007 commented Mar 2, 2015

@pipiscrew all here is just win32 only.

More info:
Started the app with dependency walker, but still not sure what the cause for the error is. Output as follows:

Starting profile on 02.03.2015 at 12:29:56

Operating System: Microsoft Windows 2003 Server R2, Enterprise (32-bit), version 5.02.3790 Service Pack 2
Program Executable: c:\program files\loytec\lweb-803\LWEB803.EXE
Program Arguments: 
Starting Directory: C:\Program Files\LOYTEC\LWEB-803\
Search Path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

Options Selected:
     Simulate ShellExecute by inserting any App Paths directories into the PATH environment variable.
     Log DllMain calls for process attach and process detach messages.
     Log DllMain calls for all other messages, including thread attach and thread detach.
     Hook the process to gather more detailed dependency information.
     Log LoadLibrary function calls.
     Log GetProcAddress function calls.
     Log thread information.
     Use simple thread numbers instead of actual thread IDs.
     Log first chance exceptions.
     Log debug output messages.
     Use full paths when logging file names.
     Log a time stamp with each line of log.
     Automatically open and profile child processes.
--------------------------------------------------------------------------------

00:00:00.000: Started "c:\program files\loytec\lweb-803\LWEB803.EXE" (process 0xA00) at address 0x00400000 by thread 1.  Successfully hooked module.
00:00:00.000: Loaded "c:\windows\system32\NTDLL.DLL" at address 0x7C800000 by thread 1.  Successfully hooked module.
00:00:00.000: Loaded "c:\windows\system32\MSCOREE.DLL" at address 0x79000000 by thread 1.  Successfully hooked module.
00:00:00.015: Loaded "c:\windows\system32\KERNEL32.DLL" at address 0x77E40000 by thread 1.  Successfully hooked module.
00:00:00.015: DllMain(0x77E40000, DLL_PROCESS_ATTACH, 0x00000000) in "c:\windows\system32\KERNEL32.DLL" called by thread 1.
00:00:00.015: DllMain(0x77E40000, DLL_PROCESS_ATTACH, 0x00000000) in "c:\windows\system32\KERNEL32.DLL" returned 1 (0x1) by thread 1.
00:00:00.015: Injected "c:\prg\dependencywalker\DEPENDS.DLL" at address 0x08370000 by thread 1.
00:00:00.015: DllMain(0x79000000, DLL_PROCESS_ATTACH, 0x00000000) in "c:\windows\system32\MSCOREE.DLL" called by thread 1.
00:00:00.015: DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "c:\prg\dependencywalker\DEPENDS.DLL" called by thread 1.
00:00:00.015: DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "c:\prg\dependencywalker\DEPENDS.DLL" returned 1 (0x1) by thread 1.
00:00:00.015: GetProcAddress(0x77E40000 [c:\windows\system32\KERNEL32.DLL], "FlsAlloc") called from "c:\windows\system32\MSCOREE.DLL" at address 0x79006F3C and returned 0x77E6B4E4 by thread 1.
00:00:00.015: Exited "c:\program files\loytec\lweb-803\LWEB803.EXE" (process 0xA00) with code -1073740791 (0xC0000409) by thread 1.

@pipiscrew
Copy link

various :
0xC0000409 is STATUS_STACK_BUFFER_OVERRUN - explanation http://stackoverflow.com/a/23309398

could be caused by Microsoft EMET, check the Application Event Log - http://stackoverflow.com/a/17564514

more at http://stackoverflow.com/search?q=0xc0000409

btw on which OS have you built the executable, with what 'platform target', with what configuration (debug/release) ?

@rassilon
Copy link
Contributor

rassilon commented Mar 2, 2015

File load exceptions usually have InnerExceptions and sometimes those have InnerExceptions.

Additionally, check out: https://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx
This helps you view the fusion log details for more information on where/what is trying to be loaded.

Does the example project work on Win2k3 R2?

Bill

@ray007
Copy link
Author

ray007 commented Mar 2, 2015

@rassilon it's win2k3 r2 we're having problems with, haven't tried any other versions of win2k3 yet.
I need to check on the other things before I can respond to them.

@ray007
Copy link
Author

ray007 commented Mar 2, 2015

Strangely enough, after letting the system install the latest security updates, the Error events visible in the event viewer have changed a bit.
Error 1:

Event Type: Error
Event Source:   .NET Runtime
Event Category: None
Event ID:   1023
Date:       02.03.2015
Time:       16:15:11
User:       N/A
Computer:   ADMIN-B1CC8831F
Description:
Application: lweb803.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 791AC6CC (79140000) with exit code 80131506.

Error 2:

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:       02.03.2015
Time:       16:15:13
User:       N/A
Computer:   ADMIN-B1CC8831F
Description:
Faulting application lweb803.exe, version 2.1.0.6, faulting module clr.dll, version 4.0.30319.1026, fault address 0x0006c6cc.

Continuing to research...

@amaitland
Copy link
Member

Have you solved this?

This maybe helpful https://groups.google.com/d/msg/cefsharp/J5gX7OKf7Rc/30YWt6nUF7oJ

@ray007
Copy link
Author

ray007 commented Mar 31, 2015

@amaitland
Not yet solved and I'm currently still stuck with VS 2010.
I'll try to find time to test this out next week.

@rover886
Copy link

@amaitland and @jornh I am also facing the same issue in running application on windows 2003. I am using CefSharp 37 version. In my case event log having error :

First Error :

Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileLoadException Stack: at MyApp.Program.Main()

Second Error :

Faulting application MyApp.exe, version 1.0.0.0, stamp 5507c7af, faulting module kernel32.dll, version 5.2.3790.3959, stamp 45d70ad8, debug? 0, fault address 0x0000bee7.

Using Dependency Walker I come to know that msjava.dll is not able to load(Not found). How can I solve this.

@amaitland
Copy link
Member

Using Dependency Walker I come to know that msjava.dll is not able to load(Not found). How can I solve this.

I've never seen that error before, far as I'm aware msjava.dll is not required by CEF. Are you using mshtml.dll in your app at all? http://www.dependencywalker.com/faq.html

@amaitland
Copy link
Member

To isolate the issue it would be helpful to confirm you get the same error when running one of MinimalExample projects.

https://github.com/cefsharp/CefSharp.MinimalExample

@rover886
Copy link

Yes,running MinimalExample also genrates same error in event viewer.

@amaitland
Copy link
Member

You'll likely have to rebuild from source then

https://groups.google.com/forum/#!msg/cefsharp/J5gX7OKf7Rc/30YWt6nUF7oJ

@rover886
Copy link

Ohh :( I don't have VS2013 as of now. I will try it later :(

@amaitland
Copy link
Member

VS2012 should be fine as well.

@rover886
Copy link

I have a concern, after changing Platform Toolset to Visual Studio 2013 - Windows XP (v120_xp) then user must need to install VC ++ 2013 redistributable?

@amaitland
Copy link
Member

I have a concern, after changing Platform Toolset to Visual Studio 2013 - Windows XP (v120_xp) then user must need to install VC ++ 2013 redistributable?

Correct. There is a V110_xp version if you have VS2012 installed.

https://groups.google.com/forum/#!msg/cefsharp/J5gX7OKf7Rc/30YWt6nUF7oJ

@amaitland
Copy link
Member

Anything more before we close this?

@perlun perlun reopened this Dec 14, 2015
@perlun
Copy link
Member

perlun commented Dec 14, 2015

I just happened to run into the same issue today - reopening.

The OS in this case is Windows 2003 Server R2 (an older set of servers at one of our clients where we aim to deploy a CefSharp-based app shortly). The error I get is the following:

Application: CefSharp.Wpf.Example.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
   at CefSharp.Example.CefExample.Init()
   at CefSharp.Wpf.Example.App..ctor()
   at CefSharp.Wpf.Example.App.Main()


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I have tested to apply the hint in #627 (disabling GPU support) both as command line parameter to the WPF example, and by recompiling the CefSharp example to include it - neither option helped.

The error I am seeing in Dependency Walker is the following files missing:

  • DWMAPI.DLL
  • MF.DLL
  • MFPLAT.DLL
  • MFREADWRITE.DLL

The first one is from the Desktop Windows Manager, introduced in the Windows Vista-series of operating systems (i.e. Windows Server 2008 and newer, I assume). The latter ones are from the so-called Media Foundation, likely also missing on Windows XP and Server 2003.

Unfortunately, the dependencies seems to be coming from libcef.dll in this case. Meaning: I suspect I will have to recompile all of CEF... 😢 If that even helps. Will have to google this a bit more.

Anyone see any other suggested solutions? The easy fix would of course be to upgrade these servers, but for obvious reasons I cannot enforce that upon the customer in this case. So we really have to fix it, one way or the other.

@rover886
Copy link

@perlun, which CefSharp version you are using?

Kindly refer https://github.com/cefsharp/CefSharp#release-branches for for respected VC++ Version and .Net Version and make sure respected redistributable is installed on system.

@perlun
Copy link
Member

perlun commented Dec 14, 2015

Thanks for an extremely fast reply! Using v37. Good points about the C++ redist, actually forgot about that now when testing the WPF example (it's bundled with our package in the "real" use case). Will ensure that these files are present now, and then go for rebuilding CefSharp using the XP settings as described here: https://groups.google.com/forum/#!searchin/cefsharp/xp/cefsharp/J5gX7OKf7Rc/EoB3h0UmfYYJ

@rover886
Copy link

@amaitland
Copy link
Member

Will ensure that these files are present now, and then go for rebuilding CefSharp using the XP settings as described here: https://groups.google.com/forum/#!searchin/cefsharp/xp/cefsharp/J5gX7OKf7Rc/EoB3h0UmfYYJ

May not be strictly required. See #1007 (comment)

@perlun
Copy link
Member

perlun commented Dec 14, 2015

Which part are you referring to, the VS2012 SP4 suggestion?

@perlun
Copy link
Member

perlun commented Dec 14, 2015

Interesting @amaitland, you seem to be right:

  • The previous version of CefSharp.Core and friends depends on MSVCR110.DLL and MSVCP110.DLL - i.e. Visual C++ 2012 redistributable.
  • Compiling a CefSharp version with VS2013 with XP settings worked.
  • Compiling a CefSharp version with VS2013 without XP settings also worked. Which is very interesting... (note: haven't tested on an actual XP box, only on Win2003 Server R2, which is my target)

The previous version I used is CefSharp v37.0.1. It was built a while ago using VS2012, probably by me (or maybe on AppVeyor).

How do I proceed on building a v37.0.2 with VS2013? Should I publish it on the official channel or do you prefer a MyGet build for these kind of more "unofficial" builds?

(Thanks a lot for your support btw.)

@amaitland
Copy link
Member

Compiling a CefSharp version with VS2013 without XP settings also worked. Which is very interesting... (note: haven't tested on an actual XP box, only on Win2003 Server R2, which is my target)

Reports suggest that it works on Windows XP.

The previous version I used is CefSharp v37.0.1. It was built a while ago using VS2012, probably by me (or maybe on AppVeyor).

There's a tag for the release, so it will be an AppVeyor build.

How do I proceed on building a v37.0.2 with VS2013?

As the VC++ version is specified in the CefSharp.props version, hopefully it's just a matter of upgrading the build script to use VS2013 as the default.

https://github.com/cefsharp/CefSharp/blob/cefsharp/37/CefSharp.props
https://github.com/cefsharp/CefSharp/blob/cefsharp/37/build.ps1#L290

I think f2da822#diff-f0e02e42e53ec40f5d3b8bed031ad09e will also be required.

Should I publish it on the official channel or do you prefer a MyGet build for these kind of more "unofficial" builds?

Long as users are aware of the change in requirements I'm happy for a Nuget release. The 37 branch doesn't have a Readme.txt as part of the Nuget package, so maybe it's worth adding one? Also update the table in the Readme.md

@perlun
Copy link
Member

perlun commented Dec 15, 2015

Thanks - I've done most of this now, will make a (self-merged) PR with it shortly. Also released v37.0.3, but unfortunately not including the Readme.txt though (hadn't seen your comments before doing the release).

perlun added a commit that referenced this issue Dec 15, 2015
This fixes #849, by providing a "reasonably official" CefSharp build that works correctly on Windows Server 2003 R2. Windows XP is untested, please report if it works or not.

Note: This changes the prerequisite from Visual C++ 2012 Redistributable to Visual C++ **2013** redistributable.
@perlun
Copy link
Member

perlun commented Dec 15, 2015

Closing this now since #1491 is merged and a new version is published. @ray007 - please report if this doesn't solve your problem.

(Newer versions of CefSharp are likely to work also, since they are built using a better version of Visual Studio.)

@perlun perlun closed this as completed Dec 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants