有一个多线程程序,通过基于COM端口的通信和远程(IP)视频流与设备同时运行。 该程序还使用OpenCV库来处理数据。
问题是它在没有任何信号的情况下关闭(既没有运行时,也没有捕获任何其他错误;日志文件也没有任何用处)。 设置了最顶级的应用程序错误事件处理程序,但仍然没有任何程序崩溃的迹象。 它会在一段时间后关闭。
最大的困难是它可以在我们所有的PC上连续工作好几天。 但是在客户PC上失败,因此测试过程非常缓慢。 客户位于不同的国家(亚洲本地化,而我们的是欧洲),但该程序是使用Unicode支持构建的。
到目前为止,我们对本地化问题和防病毒活动有一些假设......但它没有给出任何结果。
该程序使用MinGW 4.4.x C ++和wxWidgets 2.9.3编写
任何有关可能起源的建议都会受到赞赏。
There is a multithreaded program that operates simultaneously with a device via COM port based communication and remote (IP) video stream. The program also uses OpenCV library to process the data.
The trouble is that it shuts down without any signals (neither run-time, nor any other errors are caught; log file has no anything useful as well). The most top level application error event handler is set and still there are no any signs of the program crash. It just closes after awhile.
The biggest difficulty is that it works fine on all our PCs for days non-stop. But fails on customers PCs so that testing process is very slow. Customer is in a different country (Asian localization, whilst ours is European), but the program is built with Unicode support.
So far we have got some assumptions about localization issues and antivirus activity... but it gives nothing in result.
The program is written with MinGW 4.4.x C++ and wxWidgets 2.9.3
Any suggestions of the probable origin would be appreciate.
最满意答案
解决了。
问题出在我们使用的OpenCV build 2.3.1中。 函数cv :: imdecode(...)使用stdio.h的tempnam()函数在解码期间生成临时文件。 在x86 Windows系统下,此功能在32767个临时文件的新名称后失败。 在x64 Windows系统下,它返回一些无意义的字符串,但它仍然有效。
因此我提出的解决方案是改变从我们的设备接收解码图像的方式。
谢谢大家的评论。
Solved.
The problem was inside OpenCV build 2.3.1, that we use. The function cv::imdecode(...) uses stdio.h`s tempnam() function to generate temporary file during decoding. Under x86 Windows systems this function fails after 32767 new names for temporary file. Under x64 Windows systems it returns some nonsense string, but it still works.
So the solution I came with was to change the way of receiving-decoding images from our device.
Thanks everybody for comments.
更多推荐
发布评论