WindowsError: exception: access violation reading 0x00007FFC00000000 - ctypes

I am running a program that uses Trace32 and when I run the program I error at the tapAccessShiftRaw method in trace32.py (this comes in the trace32 install) and get the error above. I have been looking around at some different posts related to this issues and tried things that are mentioned in posts such as this: Python: WindowsError: exception: access violation reading 0x00000000
or
"WindowsError: exception: access violation..." - ctypes question
But unfortunately none of these solutions seem to help. I'm running this on Windows 10. Any advice on how I can debug this issue would be really appreciated.

Related

Access violation, NotEnemy is 0xBF800000

I use cocos2d-x to do the game. After running my program for a while, the variable "NotEnemy" will always report the "access violation" error. NotEnemy is the variable I set in EventListenerPhysicsContact, always using cocos2d-x There will be errors like the title, all I want to know when there is such a mistake, is there any solution, I hope someone can tell me, right, NotEnemy I am assigned this way, auto NotEnemy=contact.getShapeB( )->getBody()->getNode();
I tried setting it to nullptr after using NotEnemy, but it didn't work. Now it generates a new error "Exception at 0x76EE35D2 (located in TankBattle.exe): Microsoft C++ Exception: std::exception, in memory Location 0x00C5F548.
There is an unhandled exception at 0x7640E6EB (ucrtbase.dll) (in TankBattle.exe): A critical program exit has been requested. ", used to be an error about access permissions conflicts, but they are all problems with NotEnemy, and they all appear in the "NotEnemy->SetPosition(Vec2(166,14))" statement.

What is the cause of FluentValidation Method Not Found exception?

I've got a Domain Driven Design solution and for some reason, I'm getting this exception at RunTime when the API call is made through GateWay:
One or more errors occurred. (Method not found: 'Void FluentValidation.AbstractValidator`1.When(System.Func`2<!0,Boolean>, System.Action)'.)
The error occurs as below:
I have solution like this:
The main 4 project I'm focusing on right now are:
Core.Model
Account.Api
Service.Api.Gateway
Web.ClientSite
Web.ClientSite makes request to Service.Api.Gateway which then calls Account.Api.
Note that Core.Model is referenced everywhere
VERY IMPORTANT: If I remove the reference of FluentValidation from Core.Model, the exception disappears.
I'm hoping these information is enough. Why do you think I'm getting this exception and how can I eliminate.
Looks like some of libs (ocelot) are incompatible with new changes in FluentValidation 8.1.2. Try to downgrade to FluentValidation before 8.1.2. Hope it helps
I got similar exception:
System.MissingMethodException : Method not found:
'FluentValidation.AssemblyScanner
FluentValidation.AssemblyScanner.FindValidatorsInAssembly(System.Reflection.Assembly)'
In my case I needed to upgrade the ediatR.Extensions.Microsoft.DependencyInjection and MediatR.Extensions.FluentValidation.AspNetCore packages as well to fix the issue.

Error: VB runtime is not loaded

Edited version, after suggestion from community:
In a Windows 8.1 Phone project (Part of a VB.Net Solution with also a Store app and a Portable Class Library) I get this error message:
Call not possible because VB Runtime is not loaded.
but as far as I can trace the code keeps running in spite of this. Until... eventually an error pops up, telling me that
Could not find Windows Runtime type 'Windows.foundation'
What I have found so far on this subject seems to have a relation with Silverlight and very old versions of VB Runtime. Nothing recent.
Further on during execution in the error trap the following explanation is given:
at System.StubHelpers.WinRTTypeNameConverter.GetTypeFromWinRTTypeName(String typeName, Boolean& isPrimitive)
at System.StubHelpers.SystemTypeMarshaler.ConvertToManaged(TypeNameNative* pNativeType, Type& managedType)
at Windows.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType)
at Dossier365.Mobile.Behaviors.MenuTegelClickAction.ReageerOpMenuKeuze(Object sender, Object parameter).
I have attached a screenshot with the different messages. The Store App runs fine, based on the same PCL.
EDIT: after suggestions below: added DirectCast:
Now a new error message appears: I have no clue what goes on here or moreover: how to overcome this situation. My attempts so far have not lead to a workable solution.
Anyone with a good suggestion or solution?

ASP.NET MVC: “An internal error occurred.” when loading certificate bytes with X509Certificate2

I have already spent a few hours to resolve this error. The weird thing is when I use this libraries independently, it works absolutely fine but when I integrate them with my ASP .NET MVC website, it start throwing the following exception. I have also used MachineKeySet flag based on suggestion here but still no luck. Could anyone please help me to get rid of this exception. Thanks.
An internal error occurred.
Description: An unhandled exception
occurred during the execution of the
current web request. Please review the
stack trace for more information about
the error and where it originated in
the code.
Exception Details:
System.Security.Cryptography.CryptographicException:
An internal error occurred.
Source Error:
Line 194: if
(string.IsNullOrEmpty(p12FilePassword))
Line 196: certificate = new X509Certificate2(p12FileBytes, "", X509KeyStorageFlags.MachineKeySet);
Line 197: else
I found the solution here. Looks like a known issue. I used X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable flags together and problem disappeared. Other solution is to change the identity of applicationpool to LOCALSERVICE.

How to trace COM objects exceptions?

I have a DLL with some COM objects. Sometimes, this objects crashes and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens.
So, How can I trace those COM objects exceptions?
The first step is to lookup the Fail code's hex value (E.G. E_FAIL 0x80004005). I've had really good luck with posting that value in Google to get a sense of what the error code means.
Then, I just use trial and error to try to isolate the location in code that's failing, and the root cause of the failure.
If you just want a really quick way to find out what the error code means, you could use the "Error Lookup" tool packaged with Visual Studio (details here). Enter the hex value, and it will give you the string describing that error code.
Of course, once you know that, you've still got to figure out why it's happening.
A good way to look up error (hresult) codes is HResult Plus or welt.exe (Windows Error Lookup Tool).
I use logging internally in the COM-classes to see what is going on. Also, once the COM-class is loaded by the executable, you can attach the VS debugger to it and debug the COM code with breakpoints, watches, and all that fun stuff.
COM objects don't throw exceptions. They return HRESULTs, most of which indicate a failure. So if you're looking for the equivalent of an exception stack trace, you're out of luck. You're going to have to walk through the code by hand and figure out what's going on.