I've been getting repeated failures on one of my apps that uses accelerometers, and I've been guessing where the failure was. As the cert team wouldn't send me crash reports, I ended up building a version that I had no intention of releasing, but puts up in your face stack traces.
This time, I got a result, but the findings are extremely worrying.
I have code in my app that goes like this:
void NewReading(object sender, AccelerometerReadingChangedArgs e)
... nothing of interest here...
private void Initialize()
_accelerometer = Accelerometer.GetDefault();
if (_accelerometer != null)
// the next line throws an exception!
_accelerometer.ReadingChanged += NewReading;
This throws an exception as follows:
The object identifier does not represent a valid object: (Exception from HRESULT 0x800710D8)
at Windows.Devices.Sensors.Accelerometer.add_ReadingChanged(TypedEventHandler`2 handler)
System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.NativeOrStaticEventRegistr...(Func`2 addMethod, Action`1 removeMethod, T handler)
at System.Runtime.InteropServices.WindowsRuntime.WindowRuntimeMarshal.AddEventHandler[T](Func`2 addMethod, Action`1 removeMethod, T handler)
This looks like a hardware driver problem to me, and anyone who is tested on this particular computer will fail.
The event log said it was:
Any other developers out there seeing cert failures on Windows 8.1 like this?