User Tag List

Page 1 of 6 1 2 3 ... LastLast
Results 1 to 10 of 58

Thread: Allegro pull requests

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.17%

    Allegro pull requests

    FYI, ZoriaRPG got in touch with the Allegro folks and it sounds like they're willing to process pull requests for bugfixes to the 4.4 branch that we send them. I've already filed one containing our modifications (https://github.com/liballeg/allegro5/pull/789) but if you fix the keyboard bug, etc, consider also sending it upstream; it'd be nice not to have to maintain our own patched version of Allegro. Feel free to use the allegro5 fork in the AGN github account as a staging area.

  2. #2
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.72%
    Aye. Edgar Reynaldo over on allegro.cc is being just brilliant on this subject.

    I went in expecting to get the old story of 'Just upgrade to Allegro 5', but instead I find that there is better support for ag4 now, than there was in 2011; so it would be prudent for each of us to participate on the forums there, and try to fix as much as possible in ag 4.4.3, and aim for a proper release of that.

    Here is a changelog for allegro 4.4.3 over 4.4.2.

    Insofar as they KB issue, I am having problems making the bug occur in any ZC build at present, including in 2.50.2. If it is a race condition as @Saffith suspects, then I am unsure how to trigger it. If it is a library issue as @Gleeok and I believe, then it may have been fixed--hard to tell just yet.

    It would be great if all of our special needs, and out fixes, are simply in the core library though.

    I have a few live topics over on allegro.cc if anyone wishes to participate in them.

  3. #3
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.17%
    Quote Originally Posted by ZoriaRPG View Post
    Aye. Edgar Reynaldo over on allegro.cc is being just brilliant on this subject.

    I went in expecting to get the old story of 'Just upgrade to Allegro 5', but instead I find that there is better support for ag4 now, than there was in 2011; so it would be prudent for each of us to participate on the forums there, and try to fix as much as possible in ag 4.4.3, and aim for a proper release of that.

    Here is a [url=https://pastebin.com/JinsWu26]changelog for allegro 4.4.3 ]/url]over 4.4.2.

    Insofar as they KB issue, I am having problems making the bug occur in any ZC build at present, including in 2.50.2. If it is a race condition as @Saffith suspects, then I am unsure how to trigger it. If it is a library issue as @Gleeok and I believe, then it may have been fixed--hard to tell just yet.

    It would be great if all of our special needs, and out fixes, are simply in the core library though.

    I have a few live topics over on allegro.cc if anyone wishes to participate in them.
    The code snippet that Saffith posted on Pure is definitely buggy:
    Code:
    buffer->lock++;
    
       if (buffer->lock != 1) {
          buffer->lock--;
          return;
       }
    
       // Do stuff
    
       buffer->lock--;
    C++ is not required to compile lock++ into an atomic operation, in which case the following sequence is possible:

    Thread 1 reads the value of lock (0)
    Thread 2 reads the value of locK (0)
    Thread 1 post-increments lock (now 1) and enters the critical section
    Thread 2 post-increments lock (writing 1 again) and enters the critical section
    Both threads decrement lock (now -1).

    As with all concurrency bugs, however, even though the code is objectively incorrect, it might happen to work on some compilers on some machines, where the increment happens to be atomic; or the bug might be present but never exercised due to precise timings of context switches on some particular machine.

  4. #4
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.72%
    Quote Originally Posted by DarkDragon View Post
    The code snippet that Saffith posted on Pure is definitely buggy:
    Code:
    buffer->lock++;
    
       if (buffer->lock != 1) {
          buffer->lock--;
          return;
       }
    
       // Do stuff
    
       buffer->lock--;
    C++ is not required to compile lock++ into an atomic operation, in which case the following sequence is possible:

    Thread 1 reads the value of lock (0)
    Thread 2 reads the value of locK (0)
    Thread 1 post-increments lock (now 1) and enters the if block
    Thread 2 post-increments lock (writing 1 again) and enters the if block
    Both threads decrement lock (now -1).

    As with all concurrency bugs, however, even though the code is objectively incorrect, it might happen to work on some compilers on some machines, where the increment happens to be atomic; or the bug might be present but never exercised due to precise timings of context switches on some particular machine.
    Wouldn't a basic statement of :

    Code:
     if ( buffer->lock > 0 ) buffer->lock--;
    help there?

    That way, the second thread would not touch it.

  5. #5
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.72%
    Aye. Edgar Reynaldo over on allegro.cc is being just brilliant on this subject.

    I went in expecting to get the old story of 'Just upgrade to Allegro 5', but instead I find that there is better support for ag4 now, than there was in 2011; so it would be prudent for each of us to participate on the forums there, and try to fix as much as possible in ag 4.4.3, and aim for a proper release of that.

    Here is a [url=https://pastebin.com/JinsWu26]changelog for allegro 4.4.3 ]/url]over 4.4.2.

    Insofar as they KB issue, I am having problems making the bug occur in any ZC build at present, including in 2.50.2. If it is a race condition as @Saffith suspects, then I am unsure how to trigger it. If it is a library issue as @Gleeok and I believe, then it may have been fixed--hard to tell just yet.

    It would be great if all of our special needs, and out fixes, are simply in the core library though.

    I have a few live topics over on allegro.cc if anyone wishes to participate in them.

  6. #6
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,817
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,940
    Level
    33
    vBActivity - Bars
    Lv. Percent
    24.2%
    Quote Originally Posted by ZoriaRPG View Post
    Insofar as they KB issue, I am having problems making the bug occur in any ZC build at present, including in 2.50.2. If it is a race condition as @Saffith suspects, then I am unsure how to trigger it.

    I have a few live topics over on allegro.cc if anyone wishes to participate in them.
    I know your super-enthused and everything, but trying to repro extremely rare cases is not a good use of time. Trust me. Especially so when Saffith was already able to repro it and trace it to a location, and there is already a proposed fix on top, with cherries even. I find a better use of time is to smoke crack and try to cut flying stink bugs in half with scissors. Those are my pomegranates you sons of bitches!!! Let's see you all try and procreate when you don't have any heads! D:


    I would head over to allegro.cc, but I forgot both my password and my username...also can't remember what email I used. lol >_<
    If need be I'll make a new account though.
    Last edited by Gleeok; 07-25-2017 at 09:06 AM.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  7. #7
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.72%
    Quote Originally Posted by Gleeok View Post
    I know your super-enthused and everything, but trying to repro extremely rare cases is not a good use of time. Trust me. Especially so when Saffith was already able to repro it and trace it to a location, and there is already a proposed fix on top, with cherries even. I find a better use of time is to smoke crack and try to cut flying stink bugs in half with scissors. Those are my pomegranates you sons of bitches!!! Let's see you all try and procreate when you don't have any heads! D:
    (Emphasis, mine.)

    You don't honestly think this; right?

    The only reason that I am doing this, is to try to deduce what specific events trigger the clash, and it is only using CPU cycles, not much of my actual time. If I had to invest a huge amount of time into it, then I would likely not want to do it at all.

    I would head over to allegro.cc, but I forgot both my password and my username...also can't remember what email I used. lol >_<
    If need be I'll make a new account though.
    A new account would be wise, as they seem to invalidate accounts after a while. @jman2050 has an account there, but when i tried to add him to the project that I listed, it said that his account was invalid.

  8. #8
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,817
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,940
    Level
    33
    vBActivity - Bars
    Lv. Percent
    24.2%
    Quote Originally Posted by ZoriaRPG View Post
    (Emphasis, mine.)

    You don't honestly think this; right?

    The only reason that I am doing this, is to try to deduce what specific events trigger the clash, and it is only using CPU cycles, not much of my actual time. If I had to invest a huge amount of time into it, then I would likely not want to do it at all.
    Of course I do. I mean what I say and I say what I mean. You know what I mean? I mean, sure, I could just spray them, but then I wouldn't have acquired these deadly precision striking skills with ordinary household items. You knows what I sayin' yo?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  9. #9
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.72%
    [DP; remove]

  10. #10
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.17%
    Nope. This has the exact same problem as the original code.

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