Results 1 to 4 of 4

Thread: Multi-threading crunch-bang

  1. #1
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45

    Multi-threading crunch-bang

    Just started updating my platformer/2d engine to use some extra threads, Ie, one screen updates screen and keeps cleaning my video memory and other variables of the Engine and underlying data along with my cache system for searching through arrays faster (Commonly used ones anyway) and I cam across an issue:

    Code:
    SmashMan: ../../src/xcb_io.c:249: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed.
    Aborted
    Along with exit code 134, which to me, makes no sense at all. I'm considering using some proof of concept code I used when I first explored multi-threading that tracks EVERY resource and manages what accesses what and when but it can't do speed for sqwat... That is, if it evern runs; since it was only proof of concepts its rather sloppy and, erm, a pain to debug/use for anything where reliability matters... Any thoughts?
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  2. #2
    Almost all graphics framework are single thread only, unless you signal the mainthread to do operations on the resources. As something rather new in DirectX 11, there are the multicore extensions where you can do everything from seperate threads.

    Either way, more info is needed
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  3. #3
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Sure, I was just wondering if anyone could make anything of the error I posted, since it speaks none to me or google. I haven't had much luck with gdb (new to this debugging business, started earlier today) yet either. My suspicion is that two threads are accessing the same variable which may be a problem...

    Edit: I lie, gdb has spoken! Yah:

    Code:
    [Thread debugging using libthread_db enabled]
    [New Thread 0x7fffed4ea700 (LWP 3240)]
    [Thread 0x7fffed4ea700 (LWP 3240) exited]
    [New Thread 0x7fffed4ea700 (LWP 3241)]
    [New Thread 0x7ffff04c9700 (LWP 3242)]
    XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
          after 141 requests (140 known processed) with 2 events remaining.
    [Thread 0x7ffff04c9700 (LWP 3242) exited]
    [Thread 0x7fffed4ea700 (LWP 3241) exited]
    
    Program exited with code 01.
    When I run backtrace I get the 'No Stack' line...

    Edit: more headway has been made: It would seem a thread cannot launch the procedure to update window information, and at a guess I believe it has something to do with window contexts?? Don't understand it but its now a low-priority issue more with functionality which I can probably fixe some other way. So if anyone can make sense of the above thank you very much, if not its just implementation: 1 result, 1,000,000 ways

    sorry for the wasted thread.
    Last edited by code_glitch; 08-04-2011 at 09:18 PM.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  4. #4
    Are the threads freeing themselves properly? Never seen log like that but doesn't it look like it runs out of stack space for new threads.

Bookmarks

Posting Permissions

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