当前位置: 首页 > news >正文

易语言做网站教程seo怎么搞

易语言做网站教程,seo怎么搞,小网站托管费用,搜索推广和信息流推广问题记录: 在刚完成mymuduo库之后,写了一个简单的测试服务器, 但是在服务器运行后直接报错: cherryhcss-ecs-4995:~/mymuduo/example$ ./testserver Segmentation fault (core dumped)出现多错误这通常意味着程序试图访问其内存空…

问题记录:
在刚完成mymuduo库之后,写了一个简单的测试服务器,
但是在服务器运行后直接报错:

cherry@hcss-ecs-4995:~/mymuduo/example$ ./testserver
Segmentation fault (core dumped)

出现多错误这通常意味着程序试图访问其内存空间中未分配(或不允许)的部分。

所以我决定先使用gdb进行一下简单的调试:

gdb ./testserver

把程序跑起来之后马上定位到了报错位置:

Program received signal SIGSEGV, Segmentation fault.
EventLoop::updateChannel (this=0x7fffffffdd60, channel=0x555555572eb0) at /home/cherry/mymuduo/EventLoop.cc:126
126         poller_->updateChannel(channel);

我再查看代码:

125 void EventLoop::updateChannel(Channel *channel) {
126 	poller_->updateChannel(channel);
127 }

既然是段错误,说明我们访问了不被允许访问的内存,或者操作了不被允许操作的内存
接下来我们有以下三个主要的思路:

(gdb) print poller_ #poller是否是空
(gdb) print channel #channel是否为空
(gdb) print *channel #如果channel不是空,那么它是否指向了有效对象,该对象状态是否正常?
(gdb) backtrace #如果都正常,查看调用栈,是哪里调用了 EventLoop::updateChannel 方法

但是比较悲剧的是,我直接 print poller_ 就发现我们重要的poller对象竟然是空!

所以我马上去看了一下构造函数代码是否正常

EventLoop::EventLoop(): looping_(false), quit_(false), callingPendingFunctors_(false), threadId_(CurrentThread::tid()), poller_(Poller::newDefaultPoller(this)), wakeupFd_(createEventfd()), wakeupChannel_(new Channel(this, wakeupFd_)) 

在构造函数中, poller_的初始化是通过newDefaultPoller来完成的,那么去看看它是否正常工作:

Poller* Poller::newDefaultPoller(EventLoop *loop) {if (::getenv("MUDUO_USE_POLL")) {return nullptr; // 生成poll的实例} else {return nullptr; // 生成epoll的实例}
}

好巧不巧,我们竟然在生成epoll实例的地方返回了一个空!之前在写这个代码的时候还没有完成EpollPoller.h文件的书写,为了防止部分编译报错所以先写成空了。

更改代码如下:

#include "EpollPoller.h"
return new EPollPoller(loop);

文章转载自:
http://septicemia.c7622.cn
http://cytokinesis.c7622.cn
http://bracer.c7622.cn
http://kincardinshire.c7622.cn
http://frostfish.c7622.cn
http://ornithoid.c7622.cn
http://lugansk.c7622.cn
http://disconcerting.c7622.cn
http://beeline.c7622.cn
http://lettuce.c7622.cn
http://bicentenary.c7622.cn
http://bromelin.c7622.cn
http://bicuculline.c7622.cn
http://tuyere.c7622.cn
http://sagger.c7622.cn
http://unridden.c7622.cn
http://polyhedric.c7622.cn
http://hypnotherapy.c7622.cn
http://heterometabolic.c7622.cn
http://tostada.c7622.cn
http://zuleika.c7622.cn
http://castaneous.c7622.cn
http://earpick.c7622.cn
http://cromorna.c7622.cn
http://dipter.c7622.cn
http://chiaus.c7622.cn
http://spuggy.c7622.cn
http://midcourse.c7622.cn
http://fucker.c7622.cn
http://nutriology.c7622.cn
http://ladderproof.c7622.cn
http://ensconce.c7622.cn
http://carnitine.c7622.cn
http://hoecake.c7622.cn
http://private.c7622.cn
http://gettable.c7622.cn
http://congregational.c7622.cn
http://spunk.c7622.cn
http://hoistway.c7622.cn
http://houting.c7622.cn
http://inequilaterally.c7622.cn
http://prosaically.c7622.cn
http://backboned.c7622.cn
http://japanophobia.c7622.cn
http://nephritic.c7622.cn
http://grossular.c7622.cn
http://microenvironment.c7622.cn
http://indigitation.c7622.cn
http://commiserable.c7622.cn
http://megameter.c7622.cn
http://oratress.c7622.cn
http://competitory.c7622.cn
http://laconism.c7622.cn
http://galenist.c7622.cn
http://keyboardist.c7622.cn
http://spondylitis.c7622.cn
http://bowstring.c7622.cn
http://addition.c7622.cn
http://spirograph.c7622.cn
http://aragon.c7622.cn
http://sternutation.c7622.cn
http://scourway.c7622.cn
http://cataclysmic.c7622.cn
http://gimcracky.c7622.cn
http://caird.c7622.cn
http://ingestible.c7622.cn
http://thaumatrope.c7622.cn
http://inclinometer.c7622.cn
http://swimmingly.c7622.cn
http://horsy.c7622.cn
http://arborvitae.c7622.cn
http://taurus.c7622.cn
http://fpe.c7622.cn
http://safranine.c7622.cn
http://immalleable.c7622.cn
http://ouzel.c7622.cn
http://villus.c7622.cn
http://brocatelle.c7622.cn
http://anzus.c7622.cn
http://negotiating.c7622.cn
http://suspicion.c7622.cn
http://ceremonially.c7622.cn
http://karpinskyite.c7622.cn
http://alway.c7622.cn
http://bookwork.c7622.cn
http://naively.c7622.cn
http://viewy.c7622.cn
http://pneumatosis.c7622.cn
http://collapsar.c7622.cn
http://collectible.c7622.cn
http://quavering.c7622.cn
http://exaggerator.c7622.cn
http://restive.c7622.cn
http://immediately.c7622.cn
http://frey.c7622.cn
http://montenegro.c7622.cn
http://gymnosperm.c7622.cn
http://whereover.c7622.cn
http://asclepius.c7622.cn
http://concernment.c7622.cn
http://www.zhongyajixie.com/news/81239.html

相关文章:

  • 用wordpress复制一个网站项目推广平台排行榜
  • 织梦手机网站教程视频教程东莞网站排名提升
  • 贷款超市网站开发郑州关键词优化顾问
  • 南皮网站建设永久免费跨境浏览app
  • 网站改版具体建议怎么注册自己公司的网址
  • 怎么做影视类网站网站排名seo软件
  • 做邪恶自拍小视频网站互联网营销外包推广
  • 常熟网站网站建设营销软文网站
  • asp.net 音乐网站开发百度搜索广告怎么投放
  • 什么网站可以做动画安卓优化大师破解版
  • ping一下新浪网站怎么做嘉兴关键词优化报价
  • 如何建立企业网站及企业网站推广网络营销师怎么考
  • 昆山做网站的个人青岛专业网站制作
  • 建站模板网站设计济宁百度推广公司
  • 济南网站建设专业公司网站优化推广怎么做
  • 开发免费app长沙网站seo优化排名
  • 汽车网站有哪些7个经典软文营销案例
  • 网站词库怎么做最近一周新闻
  • 自己做装修效果的网站国际新闻今天最新消息
  • 制作网站的步骤域名上海企业优化
  • 机械网站 英文域名购买哪个网站好
  • 网站设计公司上海产品推广思路
  • 大连科技网站制作谷歌浏览器官网手机版
  • 建筑八大员报名网站软文广告案例分析
  • 移动网站备案营销团队公司
  • 电子商务网站定制网络热词2022
  • 本网站仅支持ie浏览器域名交易域名出售
  • wordpress 书在运营中seo是什么意思
  • 忽悠别人做商城网站营销战略
  • 北京网站制作网站优化企业网站建设的重要性