I am developing a software for windows embedded standard x64 (win 7) and keep getting a ucrtbase.dll crash. I would like to know how to solve this.
The application is going to receive data via TCP from a client and foreward it to a different application. The application works fine on the development maschine (Win 10 with Visual Studio 2017 ...).
When the application is copied to the windows embedded system environment it is not working. When the Server-Client connection is established, some data is received and printed to the console, but finally my application will crash within a few seconds (5s or less).
I am using the Visual Studio 2015 - Windows XP (v140_xp) toolset
Platform version 10.0.17763.0
I have tested it with a multi threaded runtime library (Multi-threaded DLL) and also with staticly linked multi-threaded runtime library, because i thought it is a environment error.
The application uses a socket-library from here https://github.com/DFHack/clsocket
I have also observed that when i connect to my target and send data at slower datarates i do not get this error. But running the software on my development maschine will run in all configurations. The cpu of my target should be fast enough Core i7-3xxxQE, 4GB RAM and i have installed many redistributables installed 2010, 2012, 2013, 2015-2019, non of which match the platform version number. The closest is 10.0.30319. Is there a way to determine the correct redistributable for my application?
Here is the fault that i am getting.
Problem signature:
Problem Event Name: APPCRASH
Application Name: t50adapter.exe
Application Version: 0.0.0.0
Application Timestamp: 5d52aabc
Fault Module Name: ucrtbase.DLL
Fault Module Version: 10.0.10586.788
Fault Module Timestamp: 5879aa7b
Exception Code: 40000015
Exception Offset: 0008469a
OS Version: 6.1.7601.2.1.0.320.65
Locale ID: 1033
Additional Information 1: 1c3c
Additional Information 2: 1c3cee0f1ec6458708cdeeeb1a339ee4
Additional Information 3: 204a
Additional Information 4: 204a8c5270b5b704eeac649e2bb5f58c
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
I was expecting, that my application will work when the correct redistributable packages are installed. What am i missing?
Please tell me, in case you need more information.
In case someone stumbles upon this question, i have found my problem.
My software uses 4 circular buffers for incoming data (RX,TX) and outgoing data (RX, TX) when monitoring the buffer loads, i was seeing that one buffer fills up and reaches its maximum. It seems like that communication line can not handle the amount of data. When i reduce the traffic for that buffer everything works fine.
So in conclusion the error was in my circular buffer that somehow did not send me a "buffer full" and let my application crash. This crash only occurred when a specific client is connected that could not handle the traffic.
Hope this will help someone else seeing ucrtbase.dll errors.
Related
I see the following error whenever I try to debug "Cross Platform" under "C++" category: "Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039". Remote connection closed"
I've installed all of the contents when I downloaded Visual Studio 2015 community and I ran it on Windows 10 Pro which supports Hyper-V.
I've been searching a solution for this and I've found an assumption:
"What is your debug target, the VS Android Emulator? When we saw this before it turned out to be a bad emulator image. Do you have this problem with all targets (e.g. if you try a physical device) or just one?"
In my case, I just tried this via Emulator(VS Emulator 5" Lolipop (5.0) XXHDP Phone (0x86 -...)
So I've sent an Email to VS 2015.
And the answer was like this:
"Sorry for the delay in responding we were looking at an emulator image of another user that ran into this problem so I was waiting until we had the results of that investigation to report back. We actually were not able to find anything wrong the emulator itself, our current hypothesis is that it is a network or adb problem interfering with GDB’s ability to connect to GDB server on the remote machine. Do you see this error every time you try to debug, or if you reboot the emulator will it work sometimes right after the reboot? Next time you see the error, can you open the emulator’s console mode by going go the Hyper-V manager and double clicking the emulator. Then find the location your app installed to and run “gdbserver --version" from the app path and let me know what it says? This will validate if the correct version of gdbserver is on the device."
So we are trying to solve this problem but I'm also asking here just in case.
Is there anyone who has magical solution for this problem?
I'll put a comment on this if I figure out how to solve this.
Thanks in advance.
** Following answer is from the manager of Visual Studio 2015:
You are only the second person who has run into this issue, and the first person that ran into it provided their everything works correctly when we run their .vhd on our machines so it appears to be some strange problem where gdbserver (which comes from the Android NDK provided by Google) crashes only when running on certain machines. Unfortunately the .vhd you provided does not appear to be the correct one it won’t boot for me. You can see the .vhd file being used by the emulator if you look under the settings of the emulator in your Hyper-V manager. .However given we got the other person’s .vhd you can hold off providing any additional information at this point. I’m waiting to hear back from the emulator team on if they have any ideas since this appears to be an issue only on specific machines since.
If you don’t mind my asking, if you don’t have a background in computers what inspired you to try C++ on Android? That scenario will be significantly more complicated than doing Java on Android.
It's been almost two months since I got this answer but I haven't got any additional response from them yet. So, I ended up quitting developing an application by using VS2015.
If you run into this problem, there are only two ways to go. Change your computer or stop developing application via VS2015.
If the project name contains spaces, the whole remote debugging fails. Visual Studio also creates weird paths. When checking out the "Blink1 for Raspberry Pi" template, I named the Project "Blink1 for Pi", which resulted in a path like this:
~/projects/Blink1?/for/pi/PI/for/pi....
And all the debugging failed. When I recreated this keeping the project name "Blink1", everything worked fine. It's a pity, that spaces aren't handled here...
I'm working on an AIR app that uses a Native Extension for windows that I developed for the same project. The app calls an ANE method called pingFunction and passes it a String containing the IP address where the pingFunction will perform, believe it or not, a ping test.
The application and it's ANE work great on Flash Builder and even after making it a release, they keep working like a charm on the development PC. The problem is that I've tried on two other computers and the application is throwing the following error:
ArgumentError: Error #3500: The extension context does not have a method with the name pingFunction.
at flash.external::ExtensionContext/_call()
at flash.external::ExtensionContext/call()
at com.mycompanyname.myappname::MyAppName/sendPing()[...
At the beggining I thought I had to do with the fact that I was using a DLL I compiled using the Debug configuration on Visual Studio instead of the Release configuration, because I read that sometimes the a debug-version of a DLL can use external DLLs. So, I changed it and rebuilt the whole library as a release build. Sadly for me, I'm still experiencing the same result.
Also, I tried changing the swf-version of both the AIR app and the ANE to the AIR SDK version I'm using (14.0), and got again the same error.
The development computer is running Windows 8.1 and the others, where the app is not working, Windows 7 and Windows 7 Service Pack 1.
Any ideas about why this is happening? Any questions or comments that might lead me to the right track will be deeply appreciated.
Error#3500 is coming because you don't have the required runtime installed on those machines, which is necessary to execute any c++ code .
On your development machine you have visual studio installed and hence you also have msvcr.
Solution of the problem is:
Install msvcr i.e. Microsoft Visual c++ redistribution - 2012 from here.
you need msvcr anywhere you want to run any VS compiled c++ code.
I have mfc application that working fine on the machine with VS 2013 pro. But when I try to run it on the other pc which has VS redistribute package 2013, VS remote tools. Nothing happening. I can see in the task manager that it is started but then it goes away...
What I have tried so far:
1) I used Dependency Walker to find dll that my application depend on. And for my setup project I add MSVCR120.dll, the rest of the dll's were mfc120.dll the ones that part of the OS i didn't add it them, because I got warnings if I'll add dll which is part of the OS and another PC has exactly the same Windows 7 so they are on the PC.
2) I used VS remote debugger, and at this time I got this First-chance exception .. _com_error at memory location. But I can't catch it. I don't know where to look. My call stack look's that this.
3) Last out put before error, says that sqloledb.rll was not loaded, I check it systems folder does have it, I even copied to the folder where application executable located, still does not loaded, still have exception.
Can any one point me to what can cause this error or why application does not run? What else to install so my application can run the same way it is run on the machine with VS. It is seems that this error rise often but none of the solution helped me.
I used procmon.exe and it is shows buffer overflow.
It is turn out to be database connection. Application quite on this line, so I add try/catch block. But shows "unexpected error"...
m_pAppConn->Open("File Name=MyData.udl", "", "", adConnectUnspecified);
m_pAppConn is a _ConnectionPtr. On my pc I have MS SQl Server Enterprise, but on target pc MS SQL Express, could it be the issue?
I've written a quick C++ console app using VS2010. I'd like to run it via the remote debugger on the Windows Server 2008 platform, in order to determine why I can't enumerate the CLSID_AudioInputDeviceCategory on that OS.
The console app works on the XP and W7 platforms.
The remote debugger gives the following error when I first tried to run the console app:
The program can't start because MSVCP100D.dll is missing from your computer. Try reinstalling the program to fix the problem.
I did try just copying this DLL from my development machine to the target folder on the remote machine, but it returned an even more obscure message:
The application was unable to start correctly (0xc0000007b). Click OK to close the application.
I've tried installing the VS2010 C++ re-distributable on the target host. This has no effect. I'm out of ideas, does anyone have any suggestions?
Having spent some time on this problem, I've noticed that the Windows Audio service on server 2008 was disabled, but my query is more to do with getting remote debugging working on the server 2008 platform than solving my audio hardware enumeration problem.
Thanks to Errata, I had a look at
Project Properties -> Configuration Properties -> C++ -> Code Generation
I changed Runtime Library from Multi-threaded Debug DLL to Multi-threaded Debug (/MTd).
This allows remote debugging without having to rely on the correct debug DLLs residing on the remote machine.
I hope this helps someone out there!
I had this exact situation. I grabbed copies of MSVCP100D.dll and MSVCR100D.dll. However I grabbed them from system32 (the 32-bit version), which resulted in the 0xc0000007b error.
0xc0000007b apparently means invalid DLL, often architecture mismatch between program and DLL (i.e. x86 and x64). In my case I grabbed the wrong (32-bit) version of the DLL from my developement computer resulting in 0xc0000007b. After grabbing the file from SysWOW64, it worked.
I am running Windows 7 64 pro. When I start VMware player, with Windows XP service pack 3 installed, I get the error message "this application has requested runtime to terminate it in an unusual way" Microsoft visual C++.
I have dug into the event log and it is telling me that splwow64.exe is the faulting application. I was concerned at first but now that I know that it is a 32 bit print spooler it does not seem like such a big deal but it is annoying. Any thoughts on how to correct the problem?
splwow64 has issues with vmware (leaks memory). Remove printers from the guest machine on vmware, should work normally.