blink的一处断言错误

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weolar/article/details/78524647

--url=http://music.yule.sohu.com/20170926/n514522612.shtml 里有断言错误

  node.dll!blink::ComposedTreeTraversal::assertPrecondition(const blink::Node & node) 行 123 C++

  node.dll!blink::ComposedTreeTraversal::parent(const blink::Node & node, blink::LayoutTreeBuilderTraversal::ParentDetails * details) 行 168 C++
  node.dll!blink::LayoutTreeBuilderTraversal::parent(const blink::Node & node, blink::LayoutTreeBuilderTraversal::ParentDetails * details) 行 59 C++
> node.dll!blink::ElementResolveContext::ElementResolveContext(blink::Element & element) 行 48 C++
  node.dll!blink::StyleResolverState::StyleResolverState(blink::Document & document, blink::Element * element, const blink::ComputedStyle * parentStyle) 行 54 C++
  node.dll!blink::StyleResolver::computeFont(blink::ComputedStyle * style, const blink::StylePropertySet & propertySet) 行 1400 C++
  node.dll!blink::CanvasFontCache::getFontUsingDefaultStyle(const WTF::String & fontString, blink::Font & resolvedFont) 行 79 C++
  node.dll!blink::CanvasRenderingContext2D::setFont(const WTF::String & newFont) 行 1761 C++
  node.dll!blink::CanvasRenderingContext2DV8Internal::fontAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value> & info) 行 661 C++
  node.dll!blink::CanvasRenderingContext2DV8Internal::fontAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 行 668 C++
  node.dll!v8::internal::FunctionCallbackArguments::Call(void (const v8::FunctionCallbackInfo<v8::Value> &) * f) 行 33 C++
  node.dll!v8::internal::HandleApiCallHelper<0>(v8::internal::Isolate * isolate, v8::internal::`anonymous-namespace'::BuiltinArguments<1> & args) 行 1843 C++
  node.dll!v8::internal::Builtins::InvokeApiFunction(v8::internal::Handle<v8::internal::JSFunction> function, v8::internal::Handle<v8::internal::Object> receiver, int argc, v8::internal::Handle<v8::internal::Object> * args) 行 1952 C++
  node.dll!v8::internal::Execution::Call(v8::internal::Isolate * isolate, v8::internal::Handle<v8::internal::Object> callable, v8::internal::Handle<v8::internal::Object> receiver, int argc, v8::internal::Handle<v8::internal::Object> * argv) 行 156 C++
  node.dll!v8::internal::Object::SetPropertyWithDefinedSetter(v8::internal::Handle<v8::internal::Object> receiver, v8::internal::Handle<v8::internal::JSReceiver> setter, v8::internal::Handle<v8::internal::Object> value, v8::internal::Object::ShouldThrow should_throw) 行 1016 C++
  node.dll!v8::internal::Object::SetPropertyWithAccessor(v8::internal::LookupIterator * it, v8::internal::Handle<v8::internal::Object> value, v8::internal::Object::ShouldThrow should_throw) 行 966 C++
  node.dll!v8::internal::Object::SetPropertyInternal(v8::internal::LookupIterator * it, v8::internal::Handle<v8::internal::Object> value, v8::internal::LanguageMode language_mode, v8::internal::Object::StoreFromKeyed store_mode, bool * found) 行 3729 C++
  node.dll!v8::internal::Object::SetProperty(v8::internal::LookupIterator * it, v8::internal::Handle<v8::internal::Object> value, v8::internal::LanguageMode language_mode, v8::internal::Object::StoreFromKeyed store_mode) 行 3772 C++
  node.dll!v8::internal::StoreIC::Store(v8::internal::Handle<v8::internal::Object> object, v8::internal::Handle<v8::internal::Name> name, v8::internal::Handle<v8::internal::Object> value, v8::internal::Object::StoreFromKeyed store_mode) 行 1610 C++
  node.dll!v8::internal::__RT_impl_Runtime_StoreIC_Miss(v8::internal::Arguments args, v8::internal::Isolate * isolate) 行 2466 C++
  node.dll!v8::internal::Runtime_StoreIC_Miss(int args_length, v8::internal::Object * * args_object, v8::internal::Isolate * isolate) 行 2449 C++
  3ba0a07c() 未知
  [下面的框架可能不正确和/或缺失]
  4613295b() 未知
  4612510d() 未知
  46124f6c() 未知
  3ba1d427() 未知
  46124db0() 未知
  46123d95() 未知
  46123bbf() 未知
  3ba1e061() 未知
  3ba1c41f() 未知
  node.dll!v8::internal::`anonymous namespace'::Invoke(v8::internal::Isolate * isolate, bool is_construct, v8::internal::Handle<v8::internal::Object> target, v8::internal::Handle<v8::internal::Object> receiver, int argc, v8::internal::Handle<v8::internal::Object> * args, v8::internal::Handle<v8::internal::Object> new_target) 行 98 C++
  node.dll!v8::internal::Execution::Call(v8::internal::Isolate * isolate, v8::internal::Handle<v8::internal::Object> callable, v8::internal::Handle<v8::internal::Object> receiver, int argc, v8::internal::Handle<v8::internal::Object> * argv) 行 167 C++
  node.dll!v8::Function::Call(v8::Local<v8::Context> context, v8::Local<v8::Value> recv, int argc, v8::Local<v8::Value> * argv) 行 4401 C++
  node.dll!blink::V8ScriptRunner::callFunction(v8::Local<v8::Function> function, blink::ExecutionContext * context, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> * args, v8::Isolate * isolate) 行 444 C++
  node.dll!blink::ScriptController::callFunction(blink::ExecutionContext * context, v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> * info, v8::Isolate * isolate) 行 155 C++
  node.dll!blink::ScriptController::callFunction(v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> * info) 行 149 C++
  node.dll!blink::ScheduledAction::execute(blink::LocalFrame * frame) 行 121 C++
  node.dll!blink::ScheduledAction::execute(blink::ExecutionContext * context) 行 82 C++
  node.dll!blink::DOMTimer::fired() 行 150 C++
  node.dll!blink::TimerBase::runInternal() 行 133 C++
  node.dll!blink::TimerBase::CancellableTimerTask::run() 行 107 C++
  node.dll!content::WebTimerBase::fired() 行 419 C++
  node.dll!content::WebThreadImpl::schedulerTasks() 行 433 C++
  node.dll!content::WebThreadImpl::fire() 行 364 C++
  node.dll!CefContext::FireHeartBeat() 行 193 C++
  node.dll!CefContext::RunMessageLoop() 行 261 C++
  node.dll!CefRunMessageLoop() 行 104 C++
  node.dll!cef_run_message_loop() 行 327 C++
  cefclient.exe!CefRunMessageLoop() 行 296 C++
  cefclient.exe!client::MainMessageLoopStd::Run() 行 16 C++
  cefclient.exe!client::`anonymous namespace'::RunMain(HINSTANCE__ * hInstance, int nCmdShow) 行 106 C++
  cefclient.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) 行 129 C++
  cefclient.exe!invoke_main() 行 128 C++
  cefclient.exe!__scrt_common_main_seh() 行 264 C++
  cefclient.exe!__scrt_common_main() 行 309 C++
  cefclient.exe!wWinMainCRTStartup() 行 17 C++
  kernel32.dll!@BaseThreadInitThunk@12() 未知
  ntdll.dll!___RtlUserThreadStart@8() 未知
  ntdll.dll!__RtlUserThreadStart@8() 未知
展开阅读全文

贪吃蛇代码 有一处错误

01-01

各位不好意思啊,那天发帖比较急,没把问题描述清楚。是我的疏忽!向各位道歉!rn我在TC里编译,提醒有一个问题,就在key=bioskey(0);说是该函数没有原型,我加了头文件,结果问题更多了,这是编译器的问题吗??谢谢各位的回答!!!rn源代码如下:rn#define N 200rn#include rn#include rn#include rn#define LEFT 0x4b00rn#define RIGHT 0x4d00rn#define DOWN 0x5000rn#define UP 0x4800rn#define ESC 0x011brnint i,key;rnint score=0;/*得分*/rnint gamespeed=50000;/*游戏速度自己调整*/rnstruct Foodrnrn int x;/*食物的横坐标*/rn int y;/*食物的纵坐标*/rn int yes;/*判断是否要出现食物的变量*/rnfood;/*食物的结构体*/rnstruct Snakernrn int x[N];rn int y[N];rn int node;/*蛇的节数*/rn int direction;/*蛇移动方向*/rn int life;/* 蛇的生命,0活着,1死亡*/rnsnake;rnvoid Init(void);/*图形驱动*/rnvoid Close(void);/*图形结束*/rnvoid DrawK(void);/*开始画面*/rnvoid GameOver(void);/*结束游戏*/rnvoid GamePlay(void);/*玩游戏具体过程*/rnvoid PrScore(void);/*输出成绩*/rn/*主函数*/rnvoid main(void)rnrn Init();/*图形驱动*/rn DrawK();/*开始画面*/rn GamePlay();/*玩游戏具体过程*/rn Close();/*图形结束*/rnrn/*图形驱动*/rnvoid Init(void)rnrn int gd=DETECT,gm;rn initgraph(&gd,&gm,"c:\\tc");rn cleardevice();rnrn/*开始画面,左上角坐标为(50,40),右下角坐标为(610,460)的围墙*/rnvoid DrawK(void)rnrn/*setbkcolor(LIGHTGREEN);*/rn setcolor(11);rn setlinestyle(SOLID_LINE,0,THICK_WIDTH);/*设置线型*/rn for(i=50;i<=600;i+=10)/*画围墙*/rn rn rectangle(i,40,i+10,49); /*上边*/rn rectangle(i,451,i+10,460);/*下边*/rn rn for(i=40;i<=450;i+=10)rn rn rectangle(50,i,59,i+10); /*左边*/rn rectangle(601,i,610,i+10);/*右边*/rn rnrn/*玩游戏具体过程*/rnvoid GamePlay(void)rnrn randomize();/*随机数发生器*/rn food.yes=1;/*1表示需要出现新食物,0表示已经存在食物*/rn snake.life=0;/*活着*/rn snake.direction=1;/*方向往右*/rn snake.x[0]=100;snake.y[0]=100;/*蛇头*/rn snake.x[1]=110;snake.y[1]=100;rn snake.node=2;/*节数*/rn PrScore();/*输出得分*/rn while(1)/*可以重复玩游戏,压ESC键结束*/rn rn while(!kbhit())/*在没有按键的情况下,蛇自己移动身体*/rn rnif(food.yes==1)/*需要出现新食物*/rnrnfood.x=rand()%400+60;rnfood.y=rand()%350+60;rnwhile(food.x%10!=0)/*食物随机出现后必须让食物能够在整格内,这样才可以让蛇吃到*/rnfood.x++;rnwhile(food.y%10!=0)rnfood.y++;rnfood.yes=0;/*画面上有食物了*/rnrnif(food.yes==0)/*画面上有食物了就要显示*/rnrn setcolor(GREEN);rn rectangle(food.x,food.y,food.x+10,food.y-10);rnrn for(i=snake.node-1;i>0;i--)/*蛇的每个环节往前移动,也就是贪吃蛇的关键算法*/rn rn snake.x[i]=snake.x[i-1];rnsnake.y[i]=snake.y[i-1];rnrn /*1,2,3,4表示右,左,上,下四个方向,通过这个判断来移动蛇头*/rnswitch(snake.direction)rnrncase 1:snake.x[0]+=10;break;rncase 2: snake.x[0]-=10;break;rncase 3: snake.y[0]-=10;break;rncase 4: snake.y[0]+=10;break;rnrnfor(i=3;i595||snake.y[0]<55||rnsnake.y[0]>455)/*蛇是否撞到墙壁*/rnrnGameOver();/*本次游戏结束*/rnsnake.life=1; /*蛇死*/rnrnif(snake.life==1)/*以上两种判断以后,如果蛇死就跳出内循环,重新开始*/rn break;rnif(snake.x[0]==food.x&&snake.y[0]==food.y)/*吃到食物以后*/rnrn setcolor(0);/*把画面上的食物东西去掉*/rn rectangle(food.x,food.y,food.x+10,food.y-10);rnsnake.x[snake.node]=-20;snake.y[snake.node]=-20;rn /*新的一节先放在看不见的位置,下次循环就取前一节的位置*/rnsnake.node++;/*蛇的身体长一节*/rnfood.yes=1;/*画面上需要出现新的食物*/rnscore+=10;rnPrScore();/*输出新得分*/rnrnsetcolor(4);/*画出蛇*/rnfor(i=0;i 论坛

断言错误,有部分代码

04-12

CDJKServerDlg是一个基于对话框的类,该对话框作为主窗口,在主窗口中放置树控件,rn要求双击树中的某个叶节点,弹出子对话框,该子对话框也是基于对话框的类名rn为:DJKCLIENT;rnrnvoid CDJKServerDlg::OnDblclkTree1(NMHDR* pNMHDR, LRESULT* pResult) rnrn......rn m_DJKClent1.ShowWindow(SW_SHOW);//DJKCLIENT m_DJKClent1;rn......rnrnDJKCLIENT类中添加按钮控件,在该控件中建立网络连接rnvoid DJKCLIENT::OnButtonLink() rnrn......rn m_pMySocket=new CMySocket;//CMySocket* m_pMySocket;rn m_pMySocket->Create();rn m_bLinked=m_pMySocket->Connect(m_strDyId, m_intPort);rn......rnrnCMySocket类中的接收数据函数中将接收的数据传给DJKCLIENT类对象,接收到的数据由rnDJKCLIENT类中的UpdateRXData()函数处理rnvoid CMySocket::OnReceive(int nErrorCode) rnrn......rn DJKCLIENT dlg;rn dlg.m_strRXDataTemp.Format("%s",chMsg);rn dlg.UpdateRXData();rn......rnrn程序能运行,通过调试发现,数据的传输都是成功的,rn但是在我设了try语句的地方出错。不知是什么原因。rnvoid DJKCLIENT::UpdateRXData()rnrn m_strEditRecvData=m_strRXDataTemp;rn m_strRXDataTemp="";rn int i,j,k,m;rn int length;rn bool dianyuan=false;rn static CString m_WorkstrV,m_WorkstrA,m_WorkstrHZ,m_WorkstrD;rnrn length=m_strEditRecvData.GetLength();rn// tempchar=m_strEditRecvData.GetAt(i);rn i=0;rn switch (m_strEditRecvData.GetAt(i))rn rn case 'V':rn rn m_strV ="";rn for(j=1;j 论坛

MFC下出现的断言错误请教

08-21

最近利用MFC做一个数据库的管理程序,现在碰到问题如下:rn 我先初始化了一个对话框,然后这个对话框中有个编辑框和一个按钮,我现在希望点击按钮后能够读取到这个编辑框中的内容,并通过这些内容来处理数据库中的一些东西,所以我在这个按钮处理程序中加了updatedata()这个函数用来读取数据,现在的问题就是每次一关闭对话框的时候都会出现(有时候在一点击按钮时也会出现) :rn Debug Assertion Failed! rn rn Program: G:\C++\Lib\Debug\lib.exe rn File: afx.inl rn line: 122 rn rn For information on how your program cna cause an assertion rn failure, see the Viaual C++ documentation on asserts. rn rn (Press Retry to debug the application) rnrn 这样的错误,我在csdn上看过回答一个碰过类似问题的人是这样:“rn 你肯定重载了编辑框的WM_CHANGE消息 rn 解决的方法只能是设置一个BOOL变量,在对话框的构造函数之将其设置为TRUE。 rn 然后在编辑框的CHANGE处理函数中如下做: rn void CPage2::OnChangeEdit1() rn rn // TODO: If this is a RICHEDIT control, the control will not rn // send this notification unless you override the CDialog::OnInitDialog() rn // function and call CRichEditCtrl().SetEventMask() rn // with the ENM_CHANGE flag ORed into the mask. rn rn // TODO: Add your control notification handler code here rn if(m_bEdit1First) rn rn m_bEdit1First = FALSE; rn rn else rn rn //做你想做的 rn rn rn你不是有一个编辑控件Edit控件吗?你一旦重载了其EN_CHANGE消息处理函数以后,如果你在其处理函数,假设为OnChangeEdit1()使用了UpdateData函数就会在对话框还没有显示的时候就会出错。这是因为Edit控件在对话框的初始化的时候发生了数据改变,但是此时的Edit控件还没有建立,UpdateData就会出错,这也许就是MFC的Bug。呵呵,修改方法如上!!”rnrn但是我看不懂这个意思是什么,所以想请教各位帮忙解答,衷心感谢大家! 论坛

C++断言错误,求高手~~~

03-08

我在写一个max的插件小程序来导出场景中的信息,由于要将场景信息导出到一个txt文件。所以用了BeginWriting()、Write()和EndWriting()函数,编译通过,但是在启动max之后导出信息时出现断言错误。给出的错误信息显示在BeginWriting()函数里的断言错误。下边是部分代码:求高手帮助!!!!rnint maxProject5::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts, DWORD options)rnrnrn if (BeginWriting(name))rn rnrn INode* pRootNode = i->GetRootNode();rnrn //Export tree.rn Export(pRootNode,0);rnrn EndWriting();rnrn return TRUE; // We have successfully exported to our file!rn rnrn // If we are here, something in the export failed.rn return FALSE;rnrnBOOL maxProject5::BeginWriting(const char *pPath)rnrn // Check we are not currently writingrn DbgAssert(m_pFile == NULL);//断言rnrn errno_t lErr = fopen_s(&m_pFile, pPath, "w");rn return lErr == 0;rnrnrnvoid maxProject5::EndWriting()rnrn DbgAssert(m_pFile != NULL);rnrn fclose(m_pFile);rn m_pFile = NULL;rnrnrnvoid maxProject5::Write(int indent, const char* pMsg, ...)rnrn DbgAssert(m_pFile != NULL);rnrn // first, write in the indentrn for (int i = 0; i < indent; i++)rn fprintf_s(m_pFile, "\t");//C++库函数rnrn // Write the message, passing in our variablern // parameters to a function that wraps printfrn va_list vargs;rn va_start(vargs, pMsg);//fprintf()的封装rn vfprintf_s(m_pFile, pMsg, vargs);rn va_end(vargs);//http://www.cnblogs.com/leaven/archive/2010/06/29/1767374.htmlrnrn // Finish the linern fprintf_s(m_pFile, "\n");rnrnm_pFile是在类中定义的私有变量。其他代码没有涉及,只有贴出部分用到,各位多帮忙啊~ 论坛

单文档分割视图断言错误

04-19

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)rnrn BOOL rtn=SplitterV1.CreateStatic(this,1,3); //首先将窗口客户区分割为一行三列;[color=#FF0000]//原来是两列[/color]rn //将左客户区再分割为两行一列,并以上面分割的左视窗作为父窗口;rn SplitterH1.CreateStatic(&SplitterV1, 2, 1, WS_CHILD | WS_VISIBLE | WS_BORDER,SplitterV1.IdFromRowCol(0,0));rn //将右客户区再分割为两行一列,并以上面分割的右视窗作为父窗口;rn SplitterH2.CreateStatic(&SplitterV1, 2, 1, WS_CHILD | WS_VISIBLE | WS_BORDER,SplitterV1.IdFromRowCol(0,1));rn //创建各自视图,并调用RUNTIME_CLASS运行库指定各视图的管理类rnrn SplitterH1.CreateView(0, 0, RUNTIME_CLASS(CMyZoomView), CSize(0, 0), pContext);rn SplitterH1.CreateView(1, 0, RUNTIME_CLASS(CInfoView), CSize(0,0), pContext);rn SplitterH2.CreateView(1, 0, RUNTIME_CLASS(CResultView), CSize(0, 0), pContext);rn SplitterH2.CreateView(0, 0, RUNTIME_CLASS(CControlView), CSize(0, 0), pContext);rn SplitterV1.CreateView(0, 2, RUNTIME_CLASS(CScrollView), CSize(0, 0), pContext);[color=#FF0000]//添加的滚动条视图[/color]rnrn //在ZOOMView.h中要加上#include "ZOOMDoc.h",否则会出现一个找不到CZOOMDoc*的错误rnrnrnrn //设置水平和垂直分割条的初始位置rn SplitterV1.SetColumnInfo(0,800,0); rn SplitterV1.SetColumnInfo(1,300,0); rn SplitterH1.SetRowInfo(0,500,0); rn SplitterH2.SetRowInfo(0,350,0);rn return rtn; rnrnrnrn分成两列时候没有问题,现在加一列,在加载第三列的视图类时就出错。rnint CFrameWnd::OnCreateHelper(LPCREATESTRUCT lpcs, CCreateContext* pContext)rnrn if (CWnd::OnCreate(lpcs) == -1)rn return -1;rnrn // create special children firstrn if (!OnCreateClient(lpcs, pContext))rn rn TRACE(traceAppMsg, 0, "Failed to create client pane/view for frame.\n");rn return -1;rn rnrn // post message for initial message stringrn PostMessage(WM_SETMESSAGESTRING, AFX_IDS_IDLEMESSAGE);rnrn // make sure the child windows have been properly sizedrn RecalcLayout(); [color=#FF0000]//这里报错[/color]rnrn return 0; // create okrn 论坛

没有更多推荐了,返回首页