User Tag List

Results 1 to 4 of 4

Thread: Yet Another Allegro Race Condition

  1. #1
    The Timelord
    QDB Manager
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,338
    Mentioned
    109 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,452
    Level
    21
    vBActivity - Bars
    Lv. Percent
    7.12%

    Yet Another Allegro Race Condition

    This one is with scrollbars and scroll arrows in ZQ and ZC listers.

    When there are multiple allegro threads, whatever variable that allegro uses to track scroll speed is losing its mind. This is the cause of support ticket 113:
    https://github.com/ArmageddonGames/Z...sic/issues/113

    While I had both Grabber, and FontEd open, the listers in ZQuest instantly jumped from the top of the list, to the bottom, or the reverse, when using the arrow buttons.

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    36
    Posts
    3,377
    Mentioned
    175 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,191
    Level
    24
    vBActivity - Bars
    Lv. Percent
    29.68%
    That seems exceedingly unlikely... Is this consistently reproducible? The list scroll variable isn't used by multiple threads, and there's no reason it should be visible to other processes. If it were being corrupted by another process somehow, I'd expect it to affect a lot of other things, and the program would probably crash before you observed any other effects.
    Have you tried watching the variable in a debugger? Or just adding some traces to _handle_jwin_scrollable_scroll_click? The click handling uses a while(gui_mouse_b()) loop (jwin.cpp line 1852). Maybe that's not timed properly for some reason. If it's running as fast as it can, it'll register a lot of clicks at once, which would make it jump like that.


    Hard to say if it's related, but I see this line in _handle_jwin_listbox_click:
    Code:
    rest_callback(MID(10, text_height(font)*16-d->h, 100), idle_cb);
    That first argument to rest_callback is the wait time in milliseconds. Why would the list height and some font size have anything to do with that? That's not even the list font; it's a global one used for other things. That has to be a mistake, but I don't know what the intention might have been.
    [tèknoláiz]

    ffcscript.zh 1.1.1 - Updated 2014-08-19
    ghost.zh 2.8.4 - Updated 2019-07-15
    tango.zh 1.3.2 - Updated 2019-08-01

  3. #3
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    68 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    10,857
    Level
    30
    vBActivity - Bars
    Lv. Percent
    87.97%
    I cannot reproduce the issue using multiple ZQuest windows or ZQuest+Zelda. Echoing Saffith's question: does this always happen for you when you have two Allegro applications running simultaneously?

  4. #4
    The Timelord
    QDB Manager
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,338
    Mentioned
    109 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,452
    Level
    21
    vBActivity - Bars
    Lv. Percent
    7.12%
    Quote Originally Posted by DarkDragon View Post
    I cannot reproduce the issue using multiple ZQuest windows or ZQuest+Zelda. Echoing Saffith's question: does this always happen for you when you have two Allegro applications running simultaneously?


    I will run some tests, but this did not have the highest priority. It may only surface when running older allegro programmes (e.g. under ag 4.2, 4.1, 4.0).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social