<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3660" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial><FONT size=2>Hello<SPAN
class=278074001-28042010>,</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=278074001-28042010></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=278074001-28042010>During my
developing work, I meet a problem about XOpenDisplay. Could you please give me
some consult?</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=278074001-28042010></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=278074001-28042010><SPAN
class=278074001-28042010>I'm developing a system, which uses fvwm as WM. Two
fvwm are executed to implement two separated screens. My process is
displayed on one screen(DISPLAY). It calls XOpenDisplay(NULL) to get one Display
connection to be used as display image, and another Display to be used as toggle
keyboard led (whenever keyboard led state is changed, a new Display is opened
and closed). The function is OK. But when I was doing monkey and cycle test,
there is a very very little possibility that my process may crash. I looked
through my code, and found a bug which was that I didn't check the return value
of XOpenDisplay, and use it directly . I have checked that a NULL Display will
cause process crash in following code. It's just my analysis and guess, I'm not
sure whether it does be the root cause. And, by
now</SPAN></SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN
class=278074001-28042010><SPAN class=278074001-28042010>, the cycle and monkey
cannot re-occur the issue. </SPAN></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=278074001-28042010><SPAN
class=278074001-28042010></SPAN></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=278074001-28042010><SPAN
class=278074001-28042010>So, I want to get some information from you to help to
reach the root cause. What will cause XOpenDisplay return NULL? How can I
simulate the case?(</SPAN></SPAN></FONT></FONT><FONT face=Arial><FONT
size=2>When<SPAN class=278074001-28042010> my process is executed, I'm sure the
XWindow and fvwm have been booted up.)</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2>Thanks<SPAN class=278074001-28042010> in
advance!</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2>Best Regards,</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Ma Qingyu</FONT></DIV>
<DIV> </DIV></BODY></HTML>