QNativeImage:无法连接到共享内存段。

时间:2022-03-31 08:18:23

I saw there is one same thread: OpenCv Error in C Wrapper for imread: QNativeImage: Unable to attach to shared memory segment That thread was posted about 4 months ago. No any answer. So I re-post one.

我看到有一个相同的线程:在C包装中为imread的OpenCv错误:QNativeImage:无法连接到4个月前发布的共享内存段。没有任何答案。所以我重新邮寄一个。

I ran this code on eclipse luna on ubuntu14.04.

我在ubuntu14.04上运行了eclipse luna代码。

#include <iostream>

#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

int main(int argc, char* argv[])
{
    Mat img = imread("/home/tqjustc/Pictures/2.jpg", CV_LOAD_IMAGE_COLOR);
    imshow("opencvtest", img);
    waitKey(0);
    return 0;
}

But there is an error.

但是有一个错误。

init done 
opengl support available 
QNativeImage: Unable to attach to shared memory segment. 
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
QNativeImage: Unable to attach to shared memory segment. 
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0

Can any one help solve this problem ?

有没有人能帮忙解决这个问题?

2 个解决方案

#1


3  

You should update Java to openjdk-8-jdk. I had the samo issue here. Python error message in PyCharm: Unable to attach to shared memory segment

您应该将Java更新为openjdk-8-jdk。我有samo的问题。PyCharm中的Python错误消息:无法连接到共享内存段。

#2


0  

I searched for QNativeImage: Unable to attach to shared memory segment and found this bug report with a solution.

我搜索了QNativeImage:无法连接到共享内存段,并通过一个解决方案找到了这个bug报告。

#1


3  

You should update Java to openjdk-8-jdk. I had the samo issue here. Python error message in PyCharm: Unable to attach to shared memory segment

您应该将Java更新为openjdk-8-jdk。我有samo的问题。PyCharm中的Python错误消息:无法连接到共享内存段。

#2


0  

I searched for QNativeImage: Unable to attach to shared memory segment and found this bug report with a solution.

我搜索了QNativeImage:无法连接到共享内存段,并通过一个解决方案找到了这个bug报告。