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

Martin Braun martin.braun at ettus.com
Thu Mar 31 16:03:21 EDT 2016


Apologies,

I meant Vladimir, not Derek.

Cheers,
M

On 03/31/2016 11:38 AM, Martin Braun wrote:
> Derek,
> 
> we recently pushed a fix to maint that might fix this issue (I guess
> you're using a UBX?). Can you confirm/deny?
> 
> Thanks!
> 
> Martin
> 
> On 03/31/2016 10:53 AM, Vladimir via USRP-users wrote:
>> Seems that I found at least workaround for this case. The problem place
>> is around the line 903 in max287x.hpp:
>>
>>     _write(regs);
>>     _regs.save_state();
>>     _write_all_regs = false;
>>
>> That _write seems not to be able to handle empty "regs" (size() == 0 in
>> destructor), so it was enough to put
>>
>>     if (regs.size() > 0)
>>         _write(regs);
>>
>> Don't know if this is proper way to fix it, but at least it stopped
>> those nasty exceptions for me. I checked in VS2010/2012 for Win32/64
>> with both uhd_usrp_probe and rx_samples_to_file - now debug version exit
>> normally.
>>
>> Vladimir
>>
>>     Четверг, 31 марта 2016, 15:55 +03:00 от Vladimir via USRP-users
>>     <usrp-users at lists.ettus.com>:
>>
>>     Hello,
>>
>>     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
>>     Boost_1_60_0
>>     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!
>>     Vladimir
>>
>>     _______________________________________________
>>     USRP-users mailing list
>>     USRP-users at lists.ettus.com </compose?To=USRP%2dusers at lists.ettus.com>
>>     http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>
>>
>>
>> 
>>
>>
>> _______________________________________________
>> USRP-users mailing list
>> USRP-users at lists.ettus.com
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>
> 





More information about the USRP-users mailing list