Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I'm dealing with a problem on Linux (Red Hat 4.4.7-4) which is related to X window system. In my program, I use: "main_w = XmCreateMainWindow (toplevel, "main_w", NULL, 0);" ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2014
    Posts
    2

    Question about X window system "XmCreateMainWindow"


    Hi, I'm dealing with a problem on Linux (Red Hat 4.4.7-4) which is related to X window system. In my program, I use:

    "main_w = XmCreateMainWindow (toplevel, "main_w", NULL, 0);"

    to create a main window and I find that the window id value of the first child of main_w is a very large integer "267110801680". I use the command below to find this number

    when I debug it in DDD:

    print *(((CompositeWidget) main_w)->composite)->children[0]

    This large integer results in a memory problem when I use Valgrind to check the memory leakage which is "Invalid read".

    The abnormal large integer should be a return value from "XmCreateMainWindow" and is it related to my operating system?

    BR
    Dong

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    1,661
    If the only problem is that Valgrind is issuing a warning then you don't really have a problem. Valgrind will sometimes issue a warning if it doesn't correctly interpret something. It probably doesn't confirm it as memory leak?

    The actual value returned is simply a widget id used internally by the library.

  3. #3
    Just Joined!
    Join Date
    Jun 2014
    Posts
    2

    Thumbs up

    Yes you may right. There is a warning in Valgrind but no visible problems. I just wondering whether the ID value is abnormal since the other 300 ID values all looks reasonable and meaningful. Thanks for your suggestion.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •