SDK Sample exception

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
sn1k
Posts: 6
Joined: Fri Aug 14, 2020 3:53 am

SDK Sample exception

Post by sn1k » Fri Aug 14, 2020 4:01 am

I'm getting the following exception when running the 3DxTraceNL sample:

boost::wrapexcept<boost::property_tree::ptree_bad_path>

KernelBase.dll!00007ffda852a839()
TDxNavLib.dll!00007ffd426358d0()
..
TDxNavLib.dll!00007ffd42646176()
3DxTraceNL.exe!NlCreate()
3DxTraceNL.exe!TDx::SpaceMouse::Navigation3D::CNavlibInterface::Open(std::string profileText)
3DxTraceNL.exe!TDx::SpaceMouse::Navigation3D::CNavlibImpl::Open(std::string profileName)
3DxTraceNL.exe!TDx::SpaceMouse::Navigation3D::CNavigation3D::EnableNavigation(bool value)
3DxTraceNL.exe!TDx::SpaceMouse::Navigation3D::CNavigation3D::EnableNavigation(bool value, std::error_code & ec)
3DxTraceNL.exe!TDx::TraceNL::CApplication3D::Enable3DNavigation()

m_hdl is 0 and profileText is "TraceNL Sample".
There is a "Trace NLSample.navlib.log" at localappdata/3Dconnexion/3DxWare.

I've changed the value of m_navigationModel.Profile and a new navlib.log is created for that name, but the exception still occurs.

Anyone come across this before?

Win 10
VS 2019 (16.6.5)
3DxWare_SDK_v4-0-0_r17130

mbonk
Moderator
Moderator
Posts: 170
Joined: Mon Dec 04, 2006 4:06 am

Re: SDK Sample exception

Post by mbonk » Wed Aug 19, 2020 2:24 am

I'm getting the following exception when running the 3DxTraceNL sample:
boost::wrapexcept<boost::property_tree::ptree_bad_path>
Happens all the time and is handled in TDxNavlib.dll. If you are interested the code that throws is in

Code: Select all

template<class K, class D, class C>
basic_ptree<K, D, C> &basic_ptree<K, D, C>::get_child(const path_type &path)
{
    ...
    
    if (!n) {
        BOOST_PROPERTY_TREE_THROW(ptree_bad_path("No such node", path));
    }
    return *n;
}
Possibly, though, you may be wondering why the sample doesn't react to 3DMouse input: The VsDebugConsole.exe not 3DxTraceNL.exe has keyboard and 3DMouse focus. Instead of starting 3DxTraceNL.exe in the debugger, attach the debugger after 3DxTraceNL.exe has been started from the file system.

Hope this helps

sn1k
Posts: 6
Joined: Fri Aug 14, 2020 3:53 am

Re: SDK Sample exception

Post by sn1k » Wed Aug 19, 2020 4:40 am

Thanks for your reply, that was indeed my problem.

Launching without debugger does give me mouse output, and attaching the debugger is then successful.
However, after receiving any mouse input in this state, I then get a further exception:

nav::future_error at memory location 0x0000007019FFF370.

With the following trace:


> KernelBase.dll!00007ffda852a839()
TDxNavLib.dll!00007ffd62167cc0()
..
TDxNavLib.dll!00007ffd6212ebd4()
ntdll.dll!00007ffdab43089d()
ntdll.dll!00007ffdab434634()
kernel32.dll!00007ffda94c7bd4()
ntdll.dll!00007ffdab46ced1()

Any ideas what might be causing this?

mbonk
Moderator
Moderator
Posts: 170
Joined: Mon Dec 04, 2006 4:06 am

Re: SDK Sample exception

Post by mbonk » Wed Aug 19, 2020 7:59 am

I would suggest restoring the C++ Exceptions in Visual Studio back to the defaults.

Select 'DEBUG->Windows->Exception Settings'.
Right-click 'C++ Exceptions' and select 'Restore Defaults'.

Exceptions that are thrown but handled will still be logged to the Debug Output window.

Note: 'Checked' exceptions in the 'Exception Settings' cause the debugger to break when the exception is thrown irrespective of whether the program handles the error condition. This is the reason why a dialogue is being popped up in the debugger.


Hope this helps.

sn1k
Posts: 6
Joined: Fri Aug 14, 2020 3:53 am

Re: SDK Sample exception

Post by sn1k » Wed Aug 19, 2020 9:31 am

Hah, indeed, that was the problem. I now get good output from the sample program.

FYI, I also had crashes from exceptions sourced from our security platform Sentinel One, and had to have an exception added for the sample exe.


I've been busy implementing from the older v3.4 SDK, would you recommend upgrading to the 4.0 version? I'm also intending on implementing a linux version.

mbonk
Moderator
Moderator
Posts: 170
Joined: Mon Dec 04, 2006 4:06 am

Re: SDK Sample exception

Post by mbonk » Wed Aug 19, 2020 10:46 pm

... would you recommend upgrading to the 4.0 version?
In the 3.4 SDK the developer hooks up to the driver and then receives the raw 3DMouse data. His next step is to design some algorithms that convert the raw data into motion, get the required view properties from the application apply the motion model to them and set those properties back.

The 4.0 SDK does all of the above. However, the 4.0 SDK has no knowledge of how get or set the applications view or related properties and requires the developer to implement a set of property accessors and mutators as the interface to the application. Once that is done you get all the various motion models implemented in the navigation library for free.

Application command export (so that the commands are assignable to 3DMouse buttons) can be implemented with both SDKs.

About Linux: I'm strictly a windows guy, and looking at the Linux developers forum doesn't inspire much hope. I would ask over there if there are plans for a cross-platform 4.0 SDK and how far they are.

sn1k
Posts: 6
Joined: Fri Aug 14, 2020 3:53 am

Re: SDK Sample exception

Post by sn1k » Thu Aug 20, 2020 2:57 am

Thanks for your assistance. I implemented the 3.4 sdk and have success with camera transformation.

I'll have a poke about the linux dev forum and see what's in store for me haha.

mbonk
Moderator
Moderator
Posts: 170
Joined: Mon Dec 04, 2006 4:06 am

Re: SDK Sample exception

Post by mbonk » Fri Aug 21, 2020 12:24 am

sn1k wrote:
Wed Aug 19, 2020 9:31 am
FYI, I also had crashes from exceptions sourced from our security platform Sentinel One, and had to have an exception added for the sample exe.
Sorry, I missed this the first time.
What exactly was happening? What was Sentinel One objecting to?

sn1k
Posts: 6
Joined: Fri Aug 14, 2020 3:53 am

Re: SDK Sample exception

Post by sn1k » Tue Aug 25, 2020 9:00 am

There was an exception raised from <install_dir>\SentinelOne\Sentinel Agent <ver>\InProcessClient64.dll when debugging from visual studio. I requested a whitelist for 3DxTraceNL.exe from our IT and that seemed to resolve the issue.

I read about similar issues with antivirus causing the same problems, perhaps on the forum I don't recall.

I didn't have to whitelist anything for the 3.4 sample. It's not to easy for me to get things un/whitelisted so I'm afraid I can't offer much testing in this regard.

ngomes
Moderator
Moderator
Posts: 2125
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: SDK Sample exception

Post by ngomes » Tue Aug 25, 2020 9:49 am

Hi sn1k,
sn1k wrote:
Tue Aug 25, 2020 9:00 am
There was an exception raised from <install_dir>\SentinelOne\Sentinel Agent <ver>\InProcessClient64.dll when debugging from visual studio.
Do you recall what exception was being thrown? Perhaps there's an entry for that event in your security tool logs.
Nuno Gomes

Post Reply