[USRP-users] Access violation in Debug UHD version in Windows

Vladimir www2008_2 at mail.ru
Thu Mar 31 08:55:28 EDT 2016


I'm trying to get Debug version of uhd to work, using MSVS 2012. Generally, everything works, but I keep getting very stable exception at the exit of example programs (I started with uhd_usrp_probe, and tried rx_samples_to_file with the same result). I mean that programs themself work just fine, but access violation appears every time at the exit.

Particularly, it says:

Unhandled exception at 0x0F83DECC (uhd.dll) in uhd_usrp_probe.exe: 0xC0000005: access violation trying to read memory at 0xFEEEFEFB. (Original text is in Russian, it's my translation.)

Initially, I started to build under VS 2010, then switched to 2012 to meet requirements listed on the web site. The error is very stable (the same in 2012 and 2010), exception arises only in Debug version at program exit (I build the whole BUILD_ALL and INSTALL projects as instructed on your site, Release version works fine).

My config is the following:

Windows 7 x64
USRP X300 with UBX-160
Intel X520-2 card

MSVS 2010/2012
UHD maint branch - 3.9.3

From what I tried to trace and saw in the call stack, it crashes somewhere deep in one of the calls to ~max287x<max2871_regs_t> destructor. I'm not sure if the maillist allows to do attachements? - will try to attach the call stack log and uhd_probe log with this letter.

I tried to isolate the simplest case - allow uhd_usrp_probe only to do dboard init and do series of returns up to the app level, starting right after this block:

        //create the xcvr object for each subdevice
        BOOST_FOREACH(const std::string &subdev, subdevs){
            db_ctor_args.sd_name = subdev;
            db_ctor_args.rx_id = rx_dboard_id;
            db_ctor_args.tx_id = tx_dboard_id;
            db_ctor_args.rx_subtree = subtree->subtree("rx_frontends/" + subdev);
            db_ctor_args.tx_subtree = subtree->subtree("tx_frontends/" + subdev);
            dboard_base::sptr xcvr_dboard = dboard_ctor(&db_ctor_args);
            _rx_dboards[subdev] = xcvr_dboard;
            _tx_dboards[subdev] = xcvr_dboard;
in dboard_manager.cpp. I've had to make some patches to avoid exceptions from some uninitialized vars, but the code seems to act very predictable. It looks like the problem reproduces if we make a dboard_ctor() call and then try to exit the application using successive returns from all the funcs - then it crashes in the destructor of the dboard at the exit. If I try to "unwind" returns just before the above block - it exts form the app just fine, w/o access violation.

Can you doublecheck that Debug version of uhd works without a glitch at your setup with this hardware (I beleive the main factor is UBX board)? What kind of workaround can I try to do here?

Thank you in advance!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20160331/132b7500/attachment-0002.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: probe_log.txt
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20160331/132b7500/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: callstack.txt
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20160331/132b7500/attachment-0005.txt>

More information about the USRP-users mailing list