草庐IT

assertion_failed

全部标签

NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver解决办法

NVIDIA-SMIhasfailedbecauseitcouldn‘tcommunicatewiththeNVIDIAdriver解决办法参考链接1参考链接2参考链接32023.3.17更新今天突然又出现这个问题,一开始我就以为内核自动更新,便想去降低内核版本,一看旧版本的内核,发现都被自动删除了,然后我之前也将内核自动更新取消了啊,输入命令dpkg--get-selections|greplinux-image打印内核版本显示也是hold,按道理内核并没有更新。一开始没发现问题,便一直尝试下载旧版本内核来解决,一直没成功。最后无意间在ubuntu的应用中点开nvidiaxserverset

c++ - 错误 : 'Failed to specialize function template' C2893 'std::invoke'

我正在VisualStudio2013中编写MFC程序,但我不断收到以下两个错误错误C2893无法特化函数模板'unknown-typestd::invoke(_Callable&&,_Types&&...)'和错误C2672“std::invoke”:找不到匹配的重载函数错误与文件xthread第238行有关我是c++/MFC的新手,我正在尝试编写一个将在后台运行到系统时间的函数。这是我使用的代码:voidtask1(ExperimentTab&dlg){while(true){CStringshowtime=CTime::GetCurrentTime().Format("%H:%M

c++ - 为什么我不能将 assert 与 std::is_same 一起使用?

有人可以向我解释为什么这个代码片段无法正常工作吗?#include#includeusingnamespacestd;intmain(){assert(is_same::value);}编译失败,因为根据编译器:prog.cpp:7:33:error:macro"assert"passed2arguments,buttakesjust1assert(is_same::value);^prog.cpp:Infunction'intmain()':prog.cpp:7:2:error:'assert'wasnotdeclaredinthisscopeassert(is_same::valu

c++ - 如何在Visual Studio中跳过Debug Assertion Failed直接break

我正在使用一些C++,我的代码中有一个拼写错误导致了这个问题。将来,我宁愿VisualStudio在直接从VisualStudio2017(社区版)以DEBUGMODE运行时直接中断错误代码,使用实际表达式,而不是向我显示这个烦人的提示。某处有这个设置吗? 最佳答案 Isthereasettingforthissomewhere?您可以通过settingreportmode以编程方式完成它:_CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_DEBUG);所需的header是.

c++ - libgcc_s.so : undefined reference to `__stack_chk_fail@GLIBC_2.4'

起初我警告说我/不是程序员,而只是管理员我试图理解一些操作当我安装Oracle制作的程序时,我收到日志消息:/usr/bin/make-fins_precomp.mkrelinkORACLE_HOME=/u01/oracle/OraHome_1EXENAME=proc/Linking/u01/oracle/OraHome_1/precomp/lib/proclibgcc_s.so:undefinedreferenceto__stack_chk_fail@GLIBC_2.4'`ls-l../libgcc_s.so->/lib/libgcc_s.so.1所以接下来我尝试通过以下方式进行诊断

c++ - 如何预期 static_assert 失败并使用 Boost.Test 框架处理它?

如果我有一个接受模板参数的方法,该模板参数应该可转换为base_of或与返回类型相同的类型,我应该怎么做?例如,考虑这个方法:templateclassIFoo{public:templateT*as(){static_assert(std::is_same::value||std::is_convertible::value||std::is_base_of::value,"IFoo::as()requiresServiceTtobeabaseofT");...}};现在,我想对其进行BOOST_CHECK!classA{};classB{};BOOST_AUTO_TEST_CASE

c++ - 当我的项目在 Visual Studio 和 Qt Creator 中构建时,Q_ASSERT 具有不同的行为

这似乎是一个错误,因为在QtCreator上,Q_ASSERT(false)导致我的应用程序退出,即使文档说它应该允许您中断断言:OnWindows,fordebugbuilds,thisfunctionwillreporta_CRT_ERRORenablingyoutoconnectadebuggertotheapplication.在QtCreator上:当在QtCreator+MinGW中编译我的项目时,代码Q_ASSERT(false);导致程序显示此消息(下面的屏幕截图),之后应用程序退出:ThisapplicationhasrequestedtheRuntimetoterm

c++ - 将 Boost 序列化与 xml_oarchive 一起使用时 assertion_failed

在编译BoostSerialization的简单测试时:classTest{protected:intNum;friendclassboost::serialization::access;templatevoidserialize(Archive&ar,constunsignedintversion){ar&BOOST_SERIALIZATION_NVP(Num);}public:Test():Num(0){}~Test(){}};使用xml_oarchive进行输出,我遇到以下GCC错误:C:\Development\Libraries\boost_1_55_0\boost\mpl

Android中下载 HAXM 报错 Intel® HAXM installation failed,如何解决?

最近在搭建Flutter环境,但是在AndroidStudio中安装VirtualDevice时,出现了一个问题Intel®HAXMinstallationfailed.ToinstallIntel®HAXMfollowtheinstructionsfoundat:https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows一直提示HAXM下载失败。网上查了各种办法,我来说一下我的解决步骤,适合新手小白去解决。此次显示设备:Window10操作系统+AndroidStudio1.验证虚拟化支持我这里失败的主要原因