0.4 on OpenBSD

For all the help you need with Armagetron!
Post Reply
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

0.4 on OpenBSD

Post by Monkey »

So, I thought I'd start a new, more general thread, for support issues for 0.4 on OpenBSD.

The client crashes sometimes when trying to access the in-game server browser. The more people online, the more this happens. I've built it using Clang. If you need any more information just say so. Here is a backtrace:

Code: Select all

Reading symbols from armagetronad...(no debugging symbols found)...done.
[New process 536130]
[New process 259022]
[New process 285218]
Core was generated by `armagetronad'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00000b24c45f93ca in _libc_rcmd_af (ahost=0x0, porta=-2094570848, locuser=0xb242601ad90 "", remuser=0x0, cmd=0xb2483276240 "", fd2p=0xb24b804ab80, af=-437512976) at /usr/src/lib/libc/net/rcmd.c:78
78      /usr/src/lib/libc/net/rcmd.c: No such file or directory.
[Current thread is 1 (process 536130)]
(gdb) bt full
#0  0x00000b24c45f93ca in _libc_rcmd_af (ahost=0x0, porta=-2094570848, locuser=0xb242601ad90 "", remuser=0x0, cmd=0xb2483276240 "", fd2p=0xb24b804ab80, af=-437512976) at /usr/src/lib/libc/net/rcmd.c:78
        hbuf = '\000' <repeats 255 times>
        pbuf = "@b'\203$\v\000\000\000\000\000\000\000\000\000\000\220\254\001&$\v\000\000\037c`\304$\v\000"
        rport = <optimized out>
        pid = <optimized out>
        hints = {ai_flags = -2094570944, ai_family = 2852, ai_socktype = -1000752430, ai_protocol = 2852, ai_addrlen = 3483261696, ai_addr = 0x0, ai_canonname = 0xb2483276240 "", ai_next = 0xb24c459bad2}
        res = 0xb24a1421b20
        error = <optimized out>
        p = <optimized out>
        r = <optimized out>
        refused = <optimized out>
        mask = <optimized out>
        oldmask = <optimized out>
        lport = <optimized out>
        s = <optimized out>
        timo = <optimized out>
        c = <optimized out>
        numread = <optimized out>
#1  0x00000b24c45f6c9c in p_b_term (p=<optimized out>, cs=<optimized out>) at /usr/src/lib/libc/regex/regcomp.c:723
        start = <optimized out>
        c = <optimized out>
        finish = <optimized out>
        i = <optimized out>
#2  p_bracket (p=0xb2483276240) at /usr/src/lib/libc/regex/regcomp.c:649
        invert = 2039198577
        cs = 0xb24c45e579e <__put_page+638>
#3  0x00000b21e5f18e1f in tBackgroundSync::~tBackgroundSync() ()
No symbol table info available.
#4  0x00000b21e5ec1334 in nDNSResolver::~nDNSResolver() ()
No symbol table info available.
#5  0x00000b21e5ebe4c7 in tJUST_CONTROLLED_PTR<nDNSResolver>::~tJUST_CONTROLLED_PTR() ()
No symbol table info available.
#6  0x00000b21e5ec1530 in void* boost::thread::run<tMemberFunctionRunnerTemplate<nDNSResolver> >(void*) ()
No symbol table info available.
#7  0x00000b23f96653d1 in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:96
        thread = <optimized out>
        retval = <optimized out>
#8  0x00000b24c45ed178 in _find_string (bp=<optimized out>, n2=0x0, c=4, tgt=<optimized out>, n1=<optimized out>) at /usr/src/lib/libc/time/strptime.c:646
        i = <error reading variable i (Cannot access memory at address 0x0)>
#9  _strptime (buf=<optimized out>, fmt=<optimized out>, tm=0x7f7ffffd12f0, initialize=<optimized out>) at /usr/src/lib/libc/time/strptime.c:488
        century = 0
        relyear = 0
        fields = 0
        neg = <optimized out>
        len = <optimized out>
        c = <optimized out>
        alt_format = <optimized out>
        bp = <optimized out>
        i = <optimized out>
        offs = <optimized out>
        ep = <optimized out>
#10 0x00000b21e5ec14ad in boost::thread::thread<tMemberFunctionRunnerTemplate<nDNSResolver> >(tMemberFunctionRunnerTemplate<nDNSResolver> const&) ()
No symbol table info available.
#11 0x00000b21e5ec13f8 in tMemberFunctionRunnerTemplate<nDNSResolver>::ScheduleBackground(nDNSResolver&, void (nDNSResolver::*)()) ()
No symbol table info available.
#12 0x00000b21e5eb9f84 in nAddress::SetHostname(char const*) ()
No symbol table info available.
#13 0x00000b21e5eb3f9d in nServerInfoBase::AccessAddress() const ()
No symbol table info available.
#14 0x00000b21e5eb291d in nServerInfo::StartQueryAll(nServerInfo::QueryType) ()
No symbol table info available.
#15 0x00000b21e5d92286 in gServerBrowser::BrowseServers() ()
No symbol table info available.
#16 0x00000b21e5d921a2 in gServerBrowser::BrowseSpecialMaster(nServerInfoBase*, char const*) ()
No symbol table info available.
#17 0x00000b21e5ecf2b6 in uMenu::HandleEvent(SDL_Event) ()
No symbol table info available.
#18 0x00000b21e5ecdc58 in uMenu::OnEnter() ()
No symbol table info available.
#19 0x00000b21e5d3f0d7 in net_game() ()
No symbol table info available.
#20 0x00000b21e5ecf2b6 in uMenu::HandleEvent(SDL_Event) ()
No symbol table info available.
#21 0x00000b21e5ecdc58 in uMenu::OnEnter() ()
No symbol table info available.
#22 0x00000b21e5ecf2b6 in uMenu::HandleEvent(SDL_Event) ()
No symbol table info available.
#23 0x00000b21e5ecdc58 in uMenu::OnEnter() ()
No symbol table info available.
#24 0x00000b21e5d41a30 in MainMenu(bool) ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#25 0x00000b21e5d00b30 in main ()
No symbol table info available.
As usual, any help is appreciated.
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.4 on OpenBSD

Post by Z-Man »

Ah! Multithreading! My favorite kind of crashes. Got it reproduced in my VM. I'm thinking about redoing the whole stuff. We now have C++11 available, which allows for much kinder ways to handle background tasks. The existing code has to work with handcrafted objects and member functions; now we have lambdas and std::function to wrap them in.
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

That's great news, yeah, hopefully over time crashing will happen less and less. :)
Playing since December 2006
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

OpenBSD now does not build due to there being date -I and date -R in Configure and Configure.ac.
OpenBSD does not have -R or -I options for date.
Commenting out the lines containing those enables the build to proceed.
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.4 on OpenBSD

Post by Z-Man »

Ah. It should be easy enough to replace them with explicit format strings.
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

Thanks.
Playing since December 2006
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

Bug #1

So, there is now a bug related to switching between full screen and windowed mode. To change mode, I now have to press the appropriate key several times, or hold it down for a while. It seems quite random as to whether the mode toggles properly or not and it does it for both ways. There is some flickering when pressing the key. This has been the case for approximately several weeks (I have been meaning to report this earlier).

Bug #2

Sometimes, when trying to enter a password in the "Authenticate" menu (or after typing "/login Monkey@forums"), the password asterisks don't show and the password can't be entered. Moving the cursor up/down one item and back makes it suddenly work as it should again. This also is random as to when it happens. This bug has been around for a very long time (possibly even years I think).

As usual, any help is appreciated.
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.4 on OpenBSD

Post by Z-Man »

Regarding #1, what window manager are you using? Might be relevant. I'm testing on fvwm as that gives me the least transiton pain... I even installed OpenBSD on my real PC instead of a virtual machine, I noticed I had a 2TB hard drive connected and completely unused (I thought it would break down soon, installed a replacement, copied the data over, then forgot)... anyway, I can't reproduce the behavior, but what I do get is that if I start off in fullscreen, switching to windowed mode does not respect the configured window size and the window is always maximized.
Last edited by Z-Man on Tue Dec 28, 2021 10:44 am, edited 1 time in total.
Reason: TB! Not GB. Duh.
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

@Z-Man

I use CWM (Calm Window Manager, the other WM in the base system). It's so clean, minimal and simple...much nicer than FVWM in my opinion.


There is now another bug that I have found. I briefly explained it in our Discord server but I have now got more information about it:

Bug #3

When in game (local or online) I get approximately 100 FPS or less and gameplay is jerky, not very smooth. However, when i press escape to open the menu, my FPS shoots up to approximately 700+ FPS and gameplay seems to be smoother (although I can't actually play as the menu is open). When I press escape to close the menu, my FPS shoots back down again. It doesn't matter how many times I do this, the same is always true. A few months ago, I was getting over 700 FPS all the time, even when the menu was closed. At first I thought maybe it was my operating system's fault, now I'm not so sure.

As per usual, any help is appreciated.
Playing since December 2006
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

I've done some more experimenting and bug #3 is indeed a Tron bug. It is a very strange bug. Basically, both on current versions of 0.2 and 0.4, having either the grid floor off or selecting "Optimize swap for -> Low latency" (or both) means having a max of around 100 FPS and jerky gameplay. When I choose "Dual textured plane" for grid floor and "Optimize swap for -> Throughput" I get far more FPS and less jerky gameplay. Go figure.
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.4 on OpenBSD

Post by Z-Man »

That is somewhat expected behavior as you are running with vsync disengaged; low latency mode works by adding delays before polling input so that later in the pipeline, after simulation and rendering, less time is spent waiting for vsync. Now, obviously, that does not make sense at all if there is no vsync to wait for :) And the delay is determined dynamically based on some timings taken, so that's probably fluctuating for you. Also, it sometimes automatically disengages if it notices problems.

I'll add a note to the help text and have it use the next-lowest-latency mode. Adding delays when we should know vsync is off is obvious nonsense.


I'll give that other window manager a try, see what it does for me.
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

OK so that makes sense for the Low Latency stuff but what about the grid floor? Just turning off the grid floor alone causes the FPS drop. Surely going from Dual Textured Plane to No Floor should increase FPS or at least do nothing, there shouldn't be a huge FPS drop should there?

While we're talking about FPS, I think I should mention that at the end of every round, my FPS drops to almost nothing at all. This happens *after* play has finished though so it's not necessarily a critical thing, however, is that signs of a bug?
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.4 on OpenBSD

Post by Z-Man »

The floor off behavior is indeed odd and I can't explain it. It's not like if the floor is off, something else gets turned on.

The FPS drop between rounds is normal. There is a lot of work to do, stuff to tear down, new stuff to build up, all happening without rendering in the background. Also note that the FPS display isn't really a very good frame rate counter. Instead of really showing the number of frames rendered in the last second, its the inverse of some average of the frame times. That's why it sometimes goes to 59 with vsync even if no frame was dropped.
Post Reply