The calculateRoute function often returns an error with the message 'heresdk.RoutingError.internalError' when used with the Here iOS SDK - heremaps

When I call the calculateRoute method of the RoutingEngine, the callback often has an error that is ‘heresdk.RoutingError.internalError‘. I don't understand the meaning of the error on the document.
The reference information is as follows:
Here SDK platform: iOS
Here SDK version: Explore Edition 4.12.11.0
iOS version: iOS 16.1
iPhone Device Model: XR
It is very strange that the error does not always occur. When the car's location changes, the app is supposed to recalculate the route from the current location to the destination. However, I am unable to real-time update the polyline on the map because the RouteEngine often returns an error.

Related

C++/WinRT UWP app using asynchronous .dlls and Windows Runtime Component

I'm currently trying to extend the functionality of the NVIDIA CloudXR client app for HoloLens2 to perform ArUco marker tracking. The C++/WinRT app of the client app is initialized using MTA. The CloudXR functionality is provided using two .dlls.
I've included the ArUco tracking capability in a separate Windows Runtime Component which the client app is referencing to. My app starts up connecting to the server and starts receiving frames, however as soon as I start up the HL2 camera using:
concurrency::create_task(_holoLensMediaFrameSourceGroup->StartAsync()).then(
[&]()
{
_holoLensMediaFrameSourceGroupStarted = true;
});
my client stops receiving frames. Instead of Success my LatchFrame function returns Frame_Not_Ready. Because of that I'm assuming that the connection to the server still is open.
I've defined all ref classes in my Windows Runtime Component as agile by default. So ThreadingModel should be set to Both and MarshallingType to Agile.
I'm assuming that some background thread of the CloudXR .dlls somehow gets blocked.
Does anyone have an idea of what's going on or how I could resolve my issue? I've been stuck here for weeks and i can't seem to figure out where things go wrong.
I've also tried using Vuforia tracking using .lib instead of a Windows Runtime Component which led to the same issue.

Bluetooth API for windows not working

I have used Bluetooth API and I have written some codes. I have used functions and structures from this link- https://msdn.microsoft.com/en-us/library/windows/desktop/aa362930(v=vs.85).aspx
The code I used were simple ones, where I check whether the device is connected/remembered/authenticated.
Initially, I wrote the code in Visual Studio 2013, in Windows 7 with internal Bluetooth v2.1. The code was working fine and I was getting the output properly. (i.e, whether the device is connected,remembered,authenticated). I used this structure https://msdn.microsoft.com/en-us/library/windows/desktop/aa362924(v=vs.85).aspx
Now, I tried that same code in Windows 7 and in Windows 10 with both using an external Bluetooth dongle with version v2.0. And then, I was not getting results. For example- for a particular device, I am getting the status for remembered,authenticated- properly, but the connected status is always the wrong result.
So, I want to know whether those Bluetooth APIs( the link which I have attached) are limited to only some of the bluetooth versions / operating systems ? If so, what are they limited to ?
NOTE- I didn't post the code because, I feel this question is about compatibility issue and not some problem in the code.

Why OnCriticalError is called in DirectX version of XAudio2?

My game app uses XAudio2.lib and was targeted for Windows 8 and Windows 10. The code was as follows:
#include <Xaudio2.h>
HRESULT hr = XAudio2Create(&s_audioEngine, 0);
hr = s_audioEngine->CreateMasteringVoice(&s_masteringVoice);
s_audioEngine->RegisterForCallbacks(&s_callbacks);
and everything was fine. I could unplug headsets, and then plug it back, and there were no problems. IXAudio2EngineCallback::OnCriticalError(HRESULT error) had never been called.
It was fine until we decided to support Windows 7. I learnt that I have to use DirectX version of XAudio2 in this case. So I set _WIN32_WINNT=0x0601 in preprocessor definitions, removed XAudio2.lib from dependencies and changed code to
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
#include <Xaudio2.h>
#else
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xaudio2.h>
#endif
It now launches, plays sound, but when I unplug headsets, it calls IXAudio2EngineCallback::OnCriticalError that means that I have to restart audio engine and recreate all the audio stuff.
I do not want to have such a pain, so I am reading MSDN, and I see:
If you specified NULL or szDeviceId parameter to
IXAudio2::CreateMasteringVoice, then the system uses a Virtual Audio
Client to represent the audio endpoint. In this case, if the
underlying WASAPI rendering device becomes unavailable, the system
automatically selects a new audio rendering device for rendering,
audio processing continues, and OnCriticalError is not raised.
What does it mean? What is
If you specified NULL or szDeviceId parameter?
Can anyone explain how do I call CreateMasteringVoice to avoid OnCriticalError?
Basically with XAudio 2.7 or XAudio 2.8, if a speaker or headphones are unplugged, WASAPI tells XAudio the endpoint is gone. The only way to recover is to destroy the entire XAudio graph and re-create it. On Windows 10, XAudio 2.9, using the 'default' device rather than a specific one, WASAPI will take care of auto migrating the endpoint so XAudio doesn't get told the endpoint has gone missing.
You can reproduce the same behavior on Windows 10 if you use XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT.
See DirectX Tool Kit for Audio for examples of handling this 'lost device' scenario.

Using native C++ android camera (custom wrapper built on android sources 4.0.4) for Google Glass

We've implemented a custom camera wrapper (built on the android::camera from the android sources) in the fashion of OpenCV camera_wrapper for android. We now want to use this wrapper for Google Glass but unfortunately do not get any message for an available preview frame. We were able to track down the problem to the SurfaceTexture creation. When we setup the preview we do
android::sp<android::SurfaceTexture> surfaceTexture(new android::SurfaceTexture(0x10));
if(pimpl->camera->setPreviewTexture(surfaceTexture) != 0)
{
LOGE("setPreviewTexture call failed");
return false;
}
It seems that everything is fine but when using the camera later (e.g. call camera->dumpParameter) the application crashes. I checked to not setPreviewTexture but only create the SurfaceTexture with the magic ID 0x10 (no clue if this is correct for Glass??) we get a crash directly at the end of the function when the shared pointer is released.
We also tried the OpenCV approach (their wrapper) and it has the same behavior.
We use the android 4.0.4_r2.1 branch from the android sources.
Anyone using the android::camera directly to work on Glass? I would appreciate any hint where to search for the bug or change it to get it work.
Best,
Manuel

How to fallback to software rendering in Java3D?

We are having some weird problems using Java3D over a Windows' remote desktop. The remote machine is a virtualized server, which can't use the (physical) server's graphic card. When I run the app, the following error pops:
Unable to create DirectX D3D context.
Neither Hardware and Software Renderer are available.
Please update your video card drivers
and get the latest DirectX available at http://microsoft.com/directx
After switching to OpenGL (starting the JVM with -Dj3d.rend=ogl) the same error appears! What is possibly happening? How can I fallback to software rendering, either with OpenGL or DirectX, when the error appears?
EDIT: I've already tried using another OpenGL vendor, using Mesa3D's DLLs instead of the native ones, but it did nothing different. I also installed DirectX SDK and tried to start Java3D with the reference driver (-Dj3d.d3ddevice=reference), but it didn't work either.
The same error appears because if OpenGL fails, Java3D tries to use DirectX. If that fails, too, then the pop is shown.
I didn't manage to solve it because, instead of trying to change things at the remote server, I tried to emulate the problem at my own machine by disabling the video driver. I still don't know why both problems aren't equivalent, but after I returned to work on the server and put DirectX's d3dref9.dll at Java's \bin, it worked.
Now I have an entire new problem, as the JVM can't find the DLL if I place it at java.library.path or Tomcat's \bin :) Problems just can't not exist.
Try the following:
Under Windows:
First, open the Display Properties pane by right clicking on desktop screen and choosing Properties item in menu. In that pane, display the Settings tab, and click on the Advanced button. Then in the Troubleshoot tab of the pane that opened, check the Hardware acceleration cursor is at its maximum on Full, confirm your choice and try to run your program again.
If the previous operation didn't resolve your problem, update the OpenGL and DirectX drivers of your graphic card with the latest available ones, and try to run Sweet Home 3D again.