Access Violation Exception in UISpy / Inspect when checking application controls in Win11 OS - windows-11

When inspecting controls of a desktop application using UISpy with a Windows 11 OS it is throwing an exception in the Output pane for each control
Time Stamp : 28/01/2022 9:38 AM
Element : "combo box" "Payment To"
Name : AccessViolationException
Message : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack Trace : at MS.Internal.Automation.UiaCoreApi.RawUiaHPatternObjectFromVariant(Object& var, SafePatternHandle& hnode)
at MS.Internal.Automation.UiaCoreApi.UiaCacheResponse.ConvertFromComTypesToClrTypes(Object[,] data, UiaCacheRequest request)
at MS.Internal.Automation.UiaCoreApi.UiaGetUpdatedCache(SafeNodeHandle hnode, UiaCacheRequest request, NormalizeState normalize, Condition customCondition)
at System.Windows.Automation.AutomationElement.GetUpdatedCache(CacheRequest request)
at UISpy.Base.Node.GetUpdatedCache(CacheRequest cacheRequest)
Its happening on nearly all controls in the application so the Control Properties show as "{null}"
When I use Windows 10 OS I do not get this issue.
Any ideas why this may occur in Win11?

Related

Post mortem debugging with the MSVC .map file

I have deployed a Windows application, which crashes sporadically. I built the application in release mode without debug symbols, but with the /MAP option in order to track down bugs after the fact.
The error message is:
"Unhandled exception at 0x00007FF63113DA4D in App.exe: 0xC0000005:
Access violation reading location 0x0000000000000000."
So I need to find out where 0x00007FF63113DA4D is.
The App.map files begins with
Preferred load address is 0000000140000000
And a typical entry:
Address Publics by Value Rva+Base Lib:Object
0001:000ecff0 ?FUNCTION#CLASS##QEBAHXZ 00000001400edff0 f STATICLIB:FILE.obj
So, how do I relate an adress beginning with "000000014" to the one in the error message beginning with "0x00007FF"?

Coded UI Test change user causes FatalExecutionEngineError returning a AgentRestart.dat

Issue:
I'm running a Coded UI Test with CUITe in VS 2012 Update in C#.
QA agent is falling over and producing a dat file
running in Debug mode
It successfully opens the IE browser window , logs in, attempts to change user in a combo box. the format for these names are 'Mr First Last (username)'
CUITe_HtmlComboBox cboUsers = bw.Get<HtmlComboBox>("Id~user");
string terminatingString = ")";
int i = -1;
foreach(string userPart in cboUsers.Items) //'Mr'
{
if(userPart.EndsWith(terminatingString))
{
if(userPart.Contains("username"))
cboUsers.SelectItem(i);
i++;
}
}
Logs
During debugging VS will throw this
FatalExecutionEngineError was detected
Message: The runtime has encountered a fatal error.
The address of the error was at 0x69c08d3b, on thread 0x1410.
The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code.
Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Running through MSTest.exe there is a AgentRestart.dat as follows ( apologies for the
ÿÿÿÿ sMicrosoft.VisualStudio.QualityTools.AgentObject, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 7Microsoft.VisualStudio.TestTools.Agent.AgentRestartInfo m_runIdm_testsCompleted System.Guid ýÿÿÿSystem.Guid _a_b_c_d_e_f_g_h_i_j_k ÂTíÚi©D¹È›ë¤÷
I'm working through the Managed Debugging Assistants. As the debugging is done in the Test Explorer it may not get called. I've kept the code to a minimum, and will include more if needed
Found the answer, couldn't connect to the
telnet ip port for the data source

Android Bluetooth sample, device list activity causes app crash when no device is picked

If I select a device to connect from the device list activity, the code runs fine.
However, if I choose not to connect and press back button or click any other screen but not the device list activity to dismiss the pop up list activity, my app would crash.
the following is the error that I got
10-29 17:02:02.235: E/AndroidRuntime(12852): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=0, data=null} to activity {com.ensil.vastusyscontrolunit/com.ensil.vastusyscontrolunit.Main}: java.lang.NullPointerException
You can try bluetoothAdapter.stopDiscovery() method inside your onPause() method of the listActivity...It will help you.
When you click the button then response is send from DevicelistActivity class to BluetoothChat class through intent.If no any device is selected then it sends null through intent.That cause null pointer exception at run time.

How does NSURLCache work in iOS 4?

When I learn NSURLCache documentation I can't find many important notes.
I found that many topics in web complain that NSURLConnection that use NSURLCache had memory leaks. When I tried to write some application for iOS 4.3 I found that MSURLCache have some strange behavior.
In application:didFinishLaunchingWithOptions: I set instance of NSURLCache with memory capacity 10MB, init NSURLRequest with NSURLRequestUseProtocolCachePolicy but I can't recieve connection:willCacheResponse: message in my NSURLConnection delegate. When I checked memory capacity in different points of my application, it was 0MB. Why? May be Apple fix some memory leaks by setting NSURLCache memory capacity to 0? I created custom NSURLCache and overrided setMemoryCapacity: method by this:
-(void)setMemoryCapacity:(NSUInteger)memoryCapacity {
if (memoryCapacity > 0) {
[super setMemoryCapacity:memoryCapacity];
}
else {
NSLog(#"zero here");
}
}
Then I started to debug. There is some input text in my app, where user put some url. New setMemoryCapacity: method has been called twice: in my app delegate, when I set capacity to 10MB and (it is very interesting) when user set focus to text input (parameter of memoryCapacity was 0 and I recieve "zero here" string in log). After that I recieved connection:willCacheResponse: messages to NSURLConnection delegate.
It was very strange. I can't understand why. I can't find things in manual about this. Do you have some thoughts?

I call sapi in a thread, get an error code : OLE error 80045006

---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EOleException with message 'OLE error 80045006'.
---------------------------
Break Continue Help
---------------------------
i have called CoInitialize. My code is :
hr := CoInitialize(nil);
SpVoice := TSpVoice.Create(Application);
SpVoice.Connect;
SpVoice.Speak('Test text');
CoUninitialize;
and the error only happened when i select the neospeech voice.
Error 0x80045006 is SPERR_DEVICE_BUSY: Hardware device is in use by another thread or process. MSDN Says: in many older systems, audio output devices can be opened only by a single process. In versions of Windows previous to Windows XP, only a single process can open an audio input device. Therefore, SPERR_DEVICE_BUSY will return if an attempt is made to open a device that is being used by a different process or thread. In Windows XP (and higher), multiple processes can open the same audio device

Resources