dpy = XOpenDisplay (NULL) meeting exception

Bug #234886 reported by apex
2
Affects Status Importance Assigned to Milestone
Moblin UI Framework
Fix Released
Undecided
Unassigned

Bug Description

I want to use X11 API to get some display information.
in the entry funtion, I call XOpenDisplay() to get a display structure, the API meeting the segment fault exception.

Revision history for this message
apex (feng-f-li) wrote :

OS: using image-create to build a one, FULL Stack + Development tools
hardware: Intel SDP for Menlow

Revision history for this message
Loïc Minier (lool) wrote :

Could you please attach a sample program reproducing the error?

Loïc Minier (lool)
Changed in moblin-ui-framework:
status: New → Incomplete
Revision history for this message
apex (feng-f-li) wrote :

the sample code,
./DisplayTest main entry

// rebuild steps
make clean
make

Revision history for this message
apex (feng-f-li) wrote :

Error Information:

ume@ume:~/TestSuites/Display$ ./DisplayTest
testing sample is running
X connection to localhost:10.0 broken (explicit kill or server shutdown).

Revision history for this message
Loïc Minier (lool) wrote :

The sample doesn't build for me:
g++ -g -Wall -fPIC -DPIC -fpermissive -Dlinux -D__int32=int -D__int64="long long" -c x11_util.cpp -o x11_util.o
In file included from x11_util.cpp:53:
/usr/include/X11/extensions/randrproto.h:379: error: expected unqualified-id before ‘delete’
x11_util.cpp: In function ‘int X11GetScreenSizeCount(unsigned int)’:
x11_util.cpp:106: warning: comparison between signed and unsigned integer expressions
x11_util.cpp:112: warning: invalid conversion from ‘unsigned int*’ to ‘int*’

Does your code work under regular Ubuntu (not UME)?

Revision history for this message
apex (feng-f-li) wrote :

please change the "delete" to "deleteAA",
delete is c++ keyword, so we need change it to anyother words. ( I don't know how to let g++ compiler to omit this keyword)

Revision history for this message
Loïc Minier (lool) wrote :

It doesn't crash here, neither on my desktop nor on my Q1 running UME.

Revision history for this message
apex (feng-f-li) wrote :

your Q1 is Sumsung Q1 Ultra?,

I have a Sugsung Q1 ultra device, it installed the Macslin image and my sample code is run OK.
but now, I need to test my sample code on menlow platform.
my image is create by Image-creator tool ,
I select menlow-lpia, there are some other choice like ((menlow-lpia-hardy? ), I don't know what is the difference, and did not find any document to explain it. if you know , please tell me .
then i select the full-stack-with-properity + development tools
at last, create a install image to my USB disk and use the USB disk on SDP.
my hardware is Intel SDP for menlow platform.

so any mistakes in my process ?

Revision history for this message
apex (feng-f-li) wrote :

test my code on menlow-lpia-hardy-ppa , it can run sucessfully , my fail target is menlow-lpia.
menlow -lpia is ubuntu7.10 , while menlow-lpia-hardy-ppa is ubuntu8.04, mighbe it is the reason.

compare with normal ubuntu, my code
dpy = XOpenDisplay (NULL) can not work when use ssh terminal
it should change to dpy = XOpenDisplay("localhost:0.0")

thanks all. ( Loïc Minier,wang,<email address hidden>, tang, <email address hidden> )

the bug can be closed,

Revision history for this message
yanglei (lei-a-yang) wrote :

Moblin QA team close the bug according apex's latest comments.
If anyone found the same issue, please help to reopen the bug.

Changed in moblin-ui-framework:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.