Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Pipe is being closed" when using the WinRT Geolocator

When I use the WinRT Geolocator, I sporadically get the error:

{"The pipe is being closed. (Exception from HRESULT: 0x800700E8)"}

Again, this is sporadic. Any suggestions?

Windows.Devices.Geolocation.Geoposition _Postion = null;
try
{
    var _Locator = new Windows.Devices.Geolocation.Geolocator();
    _Postion = await _Locator.GetGeopositionAsync();
}
catch { /* continue, null okay */ }

if (_Postion == null)
{ 
    /* use alternate */ 
}
else
{
    /* use location */ 
}

This is in the simulator, but also when run on local machine. Usually this error will NOT result in a break. It just ends the app suddenly. When it does result in a break. That is the resulting error.

like image 696
Jerry Nixon Avatar asked Jun 27 '12 18:06

Jerry Nixon


1 Answers

I figured out that this happened when your localization is set as "simulated", if you are running your app using device simulator you may disable this by click in world icon (between display and camera settings), then uncheck "Use simulated location" option

like image 57
Jonathan Escobedo Avatar answered Nov 15 '22 16:11

Jonathan Escobedo