“ GLib-ERROR **:无法创建管道主循环唤醒:打开的文件太多”在Qt上 [英] "GLib-ERROR **: Cannot create pipe main loop wake-up: Too many open files" on Qt

查看:240
本文介绍了“ GLib-ERROR **:无法创建管道主循环唤醒:打开的文件太多”在Qt上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu。当我大约1小时后运行程序时,我收到此错误:

I am working on Ubuntu. When I run my program about after 1 hour I received this error :

GLib-ERROR **:无法创建管道主循环唤醒:打开太多文件该程序意外完成。

当我使用gdb运行时,它不会崩溃。

When I run with gdb it does not crash.

我不明白为什么?以及此错误的原因是什么?

I Don't understand why? and What is the reason for this error ?

非常感谢您。.

推荐答案


打开的文件太多

Too many open files

非常明显。 Probalby您的文件描述符泄漏,因此您应该检查代码是否打开了很多文件/文件描述符,但没有正确关闭它们。如果您派生一个进程,则还应该考虑在启动实际进程之前将其关闭,因为这也可能是常见的错误。

Is pretty obvious. Probalby you have a leak with file descriptors, so you should check if your code opens lots of files/filedescriptors but doesn't close them properly. If you fork a process, you should also consider to close them, before you start the actual process, as this might also be a common mistake.

操作系统可以保留的文件描述符数量有限的表,显然您已经超过了此限制。

The operating system has a limited table of how many filedescreptors it can maintain, and apparently you exceeded this limit.

这篇关于“ GLib-ERROR **:无法创建管道主循环唤醒:打开的文件太多”在Qt上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆