Hase Development "blog"

Discussion in 'General Discussions' started by Ziz, Jul 31, 2015.

  1. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    11,227
    Location:
    Somewhere off the coast of the EU
    As I recall, the AI's move had just started. There were only three hase characters left on the map, so I don't think anyone was standing on anyone's head. I've not had reason to use the kill above weapon yet myself, so I don't think anyone had used that.

    Useful advice for hunting zombies too. I've personally dropped a crash dump on occasion though usually after a heavy night out, and I don't remember killing any undead, though given my memory usually drops out just as we switch to spirits, anything could have happened ;)

    Will try to test this evening. Anyone up for an online game once we've got this bug nixed too?
     
  2. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    11,227
    Location:
    Somewhere off the coast of the EU
    My first test game was successful. I'd expect to do more testing before proposing this bug has been nixed mind you. Or other people could download it and try it out too, I suppose.
     
  3. Klumpen

    Klumpen Run away! Run away!

    Joined:
    Jan 5, 2012
    Messages:
    6,725
    Location:
    Uncanny Valley
    v1.6.4.1 for Linux 64bit worked perfectly,
    downloaded the current version and get this when trying to run it:
    What has changed and what am I supposed to do?
     
  4. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    Uh, well, I didn't change anything tbh. Did you run it in a file browser or a terminal?
    If the first is the case, can you run it in a terminal and tell me the output there? The error message you got there, doesn't help much. :\
     
  5. Klumpen

    Klumpen Run away! Run away!

    Joined:
    Jan 5, 2012
    Messages:
    6,725
    Location:
    Uncanny Valley
    Ok, ./hase worked.
    I usually don't start programs from terminal and actually had to look up the command...
    Strange, it normally works without in Mint.

    Code:
    ./hase
    Found 1 Joysticks
      Opened Joystick 0 (Saitek PLC Saitek P2600 Rumble Force Pad)
    Support for ogg: Yes
    Support for mp3: No (Mixer not built with MP3 support)
    Support for flac: Yes
    Support for mod: Yes
    Try to open Sound: Success
      8 channels are avaible as default
    Load mapping...
    Save mapping...
    Load mapping...
    Save mapping...
    
    Is there a way to map buttons for DirectInput gamepads?
    It only seems to recognize the analog stick.
     
  6. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    Hm... I have the same problem with Dolphin - but it just seems not to be possible to start an application with dolhin. Did you maybe change your desktop recently?
    Open with "xterm -e" worked for me. ;)
    But it is working somehow for you anyway :D
     
  7. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    885
    Location:
    Spain
    I did download the Linux 64bit version just to test it.
    I can start other games, like old DRM free Humble Indie bundles (Shank 2, Legend of Grimrock etc), detected as executable by Dolphin, but Hase is detected as shared library, strange.

    Or you can press F4 on Dolphin and a terminal show up at the bottom of the window.

    Anyway, reinstalled hase-git from Arch AUR, and waiting for someone to test online, XD
     
  8. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    I will try to be online for a hase multiplayer game the next days. :)
    However most apps in /usr/bin, like geany, don't work, too, so... ^^'
     
  9. pocak

    pocak Member

    Joined:
    Oct 11, 2009
    Messages:
    73
    Hope this helps debugging. It was printed during a replay of that "debug game" match, right after turn 4 (iirc).
    Code:
    ==18901== Invalid read of size 4
    ==18901==    at 0x805D952: real_next_player (player.c:604)
    ==18901==    by 0x805DBE6: check_next_player (player.c:654)
    ==18901==    by 0x8069D07: calc (hase.c:1332)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x806D296: hase (hase.c:2089)
    ==18901==    by 0x8053DDE: lg_calc (lobbyGame.c:862)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x805544E: start_lobby_game (lobbyGame.c:1368)
    ==18901==    by 0x80503EF: ll_calc (lobbyList.c:318)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x8050CAA: start_lobby (lobbyList.c:541)
    ==18901==    by 0x804B259: main (lobby.c:285)
    ==18901==  Address 0x6b13e70 is 64 bytes inside a block of size 340 free'd
    ==18901==    at 0x402E7A8: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
    ==18901==    by 0x805DF26: del_hare (player.c:731)
    ==18901==    by 0x806C2F0: calc (hase.c:1807)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x806D296: hase (hase.c:2089)
    ==18901==    by 0x8053DDE: lg_calc (lobbyGame.c:862)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x805544E: start_lobby_game (lobbyGame.c:1368)
    ==18901==    by 0x80503EF: ll_calc (lobbyList.c:318)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x8050CAA: start_lobby (lobbyList.c:541)
    ==18901==    by 0x804B259: main (lobby.c:285)
    ==18901==  Block was alloc'd at
    ==18901==    at 0x402D5EC: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
    ==18901==    by 0x805DC15: add_hare (player.c:664)
    ==18901==    by 0x805E1AC: init_player (player.c:779)
    ==18901==    by 0x806CF69: hase (hase.c:2043)
    ==18901==    by 0x8053DDE: lg_calc (lobbyGame.c:862)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x805544E: start_lobby_game (lobbyGame.c:1368)
    ==18901==    by 0x80503EF: ll_calc (lobbyList.c:318)
    ==18901==    by 0x807886A: spLoop (sparrowCore.c:1206)
    ==18901==    by 0x8050CAA: start_lobby (lobbyList.c:541)
    ==18901==    by 0x804B259: main (lobby.c:285)
    
     
  10. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    Thanks, @pocak.
    I myself found that bug, too, but it is good, that you can reproduce it! :D
    I am a bit surprised, how often it occurs now, because at least in the last commits I did not change anything, which could result in such a failure.
    It occurs online and offline, with AI and without. Especially is important, that it means, that my concurrent network thread does not write random data.
    Right now I assume, that the pointer activeHare of a player is somewhen freed. Most of the time it seems, that I am lucky the memory stays valid until the line mentioned in your valgrind dump:
    player.c:604: player[active_player]->activeHare = player[active_player]->activeHare->next;
    But it doesn't has to be correct at this point. If the memory is reused ->next; can be another valid region - but targeting to some random memory region (most probably not valid. ;) )

    So, tl;dr: I assume if a hare dies, the activeHare variable is not updated in any case.

    Bug fixing time! :happy:
    --- Double Post Merged, May 1, 2017, Original Post Date: May 1, 2017 ---
    Okay, I may have found and fixed the bug.
    @pocak: I was able to reproduce your valgrind output with the old version, but not the new one. So hopefully the bug is fixed. I updated the online version without version increment. As I still want to add another feature, I will wait until this is done.
    But feel free to update anyway (however the pandora repo version is not updated).

    You all feel free to test!
     
  11. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    New version, I changed the camera movement while pressing the [Y]. You can now free move the camera until you release [Y]. This is especially nice for devices with very small screen like the GCW, but probably also handy on the pandora ;)
     
  12. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    Good morning folks!

    I just logged into hase and... it did not work! :mad: Well, this was not really surprising, I ignored the project for a year or so. :oops: So, the reason is, that ED's server, where hase online gaming is located on, now forces you to used HTTPS, which is good for browsing, but bad for Hase, because I neither implemented the "302 document moved" HTTP code you will get nor SSL encryption itself. :D

    So, for a quick fix I asked ED to disable this forced redirect for my subdomain for now, but of course it would make more sense to directly implement SSL, which I will try next. Tbh I hope I can just add a openSSL-layer in the middle (ignoring the credability of all certificates :-#) and everything is working. :cool:
     
  13. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,786
    Location:
    Ingolstadt
    Oh, okay. I didn't put an SSL certificate on hase.gp2x.de, but it seems you used ziz.gp2x.de
    Removed it :)
     
  14. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    This is complicated... I am using ziz.gp2x.de as game server, but hase.gp2x.de as domain for the game itself (information, downloads, etc.).
    However hase.gp2x.de and ziz.gp2x.de are still forced to use https (https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) and furthermore the certificate is not valid for ziz.gp2x.de. :\
    This is what wget prints:

    Code:
    alexander@Aerodactyl:/tmp$ wget http://hase.gp2x.de
    --2019-09-04 15:34:01--  http://hase.gp2x.de/
    Auflösen des Hostnamens hase.gp2x.de (hase.gp2x.de)… 95.216.39.121
    Verbindungsaufbau zu hase.gp2x.de (hase.gp2x.de)|95.216.39.121|:80 … verbunden.
    HTTP-Anforderung gesendet, auf Antwort wird gewartet … 301 Moved Permanently
    Platz: http://ziz.gp2x.de/hase/ [folgend]
    URL transformed to HTTPS due to an HSTS policy
    --2019-09-04 15:34:01--  https://ziz.gp2x.de/hase/
    Auflösen des Hostnamens ziz.gp2x.de (ziz.gp2x.de)… 95.216.39.121, 2a01:4f9:2a:2786::1a
    Verbindungsaufbau zu ziz.gp2x.de (ziz.gp2x.de)|95.216.39.121|:443 … verbunden.
    Der Zertifikat-Eigentümer passt nicht zum Hostname »ziz.gp2x.de«.
    Code:
    wget http://ziz.gp2x.de
    URL transformed to HTTPS due to an HSTS policy
    --2019-09-04 15:34:41--  https://ziz.gp2x.de/
    Auflösen des Hostnamens ziz.gp2x.de (ziz.gp2x.de)… 95.216.39.121, 2a01:4f9:2a:2786::1a
    Verbindungsaufbau zu ziz.gp2x.de (ziz.gp2x.de)|95.216.39.121|:443 … verbunden.
    Der Zertifikat-Eigentümer passt nicht zum Hostname »ziz.gp2x.de«.
    Thanks for your help, ED!
     
  15. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,786
    Location:
    Ingolstadt
    Errmm... this is weird, I'll look into it later tonight.
     
  16. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    11,227
    Location:
    Somewhere off the coast of the EU
    If you use curl instead of wget, you can use the -k option to skip checking the certificate against the cacerts. There's probably an equivalent for wget, but I don't have that installed locally so can't easily check it's manpage (other than googling for it I guess, but meh).
     
  17. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,786
    Location:
    Ingolstadt
    Simple typo, fixed.
     
  18. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,587
    You can do the same with wget, my GCW packet manager is using this as the GCW has no real root certificate to check connections. :oops: But anyway, wget was just for testing and copy and pasting something to the board, my browser also had problems with the security of the url. ;)

    Works like a charme! <3 Thanks a lot! :D

    Although my pressure to play with OpenSSL is much smaller now... :-#
     
  19. KidPaddle

    KidPaddle Member

    Joined:
    May 3, 2009
    Messages:
    112
    Location:
    Germany
    Rejoice, your life is much easier because of it
     
    rSl likes this.

Share This Page

Loading...