Josko / aura-bot

Warcraft III high-performance hosting bot written in C++14.
72 stars 41 forks source link

Bot on ubuntu vps say "Segmentation fault (core dumped)" after description #47

Closed tripleindigo closed 6 years ago

tripleindigo commented 6 years ago

[AURA] started loading [ip-to-country.csv] [AURA] iptocountry data: 10% loaded [AURA] iptocountry data: 20% loaded [AURA] iptocountry data: 30% loaded [AURA] iptocountry data: 40% loaded [AURA] iptocountry data: 50% loaded [AURA] iptocountry data: 60% loaded [AURA] iptocountry data: 70% loaded [AURA] iptocountry data: 80% loaded [AURA] iptocountry data: 90% loaded [AURA] iptocountry data: 100% loaded [AURA] finished loading [ip-to-country.csv] [BNET: Euro] connecting to server [europe.battle.net] on port 6112 [BNET: Euro] resolved and cached server IP address 5.42.181.16 [BNET: Euro] connected Segmentation fault (core dumped)

tripleindigo commented 6 years ago

if you need more information you can mail me klinchery@gmail.com

Josko commented 6 years ago

Well a few questions arise here, as the current master works and does not crash.

  1. Which version are you using? Version or commit or approx. age?
  2. Did you recompile and install the aura-bot version of BNCSUtil? There were at least some compiler/linker switch changes that could account for the crash.
  3. Which version of Ubuntu?
  4. Which compiler and which version is it?

Crashes just when it should send the AUTH to BNet:

[AURA] finished loading [ip-to-country.csv] [BNET: Northrend] connecting to server [europe.battle.net] on port 6112 [BNET: Northrend] resolved and cached server IP address 5.42.181.15 [IRC: irc.quakenet.org] connecting to server [irc.quakenet.org] on port 6667 [BNET: Northrend] connected [IRC: irc.quakenet.org] connected [IRC: irc.quakenet.org] NOTICE AUTH : Looking up your hostname [IRC: irc.quakenet.org] NOTICE AUTH : Checking Ident [BNET: Northrend] attempting to auth as Warcraft III: The Frozen Throne [IRC: irc.quakenet.org] NOTICE AUTH :*** Found your hostname [BNET: Northrend] cd keys accepted

tripleindigo commented 6 years ago

using the newest version on a fresh ubuntu 16.04 vps i followed the readme and only had some problems with some packages but i could read from the errors which packages i missed after that it compiled with no problem. After i uploaded the storm.dll game.dll and the w3.exe it threw that error.

2017-08-04 16:20 GMT+02:00 Joško Nikolić notifications@github.com:

Well a few questions arise here, as the current master works and does not crash.

  1. Which version are you using? Version or commit or approx. age?
  2. Did you recompile and install the aura-bot version of BNCSUtil? There were at least some compiler/linker switch changes that could account for the crash.
  3. Which version of Ubuntu?
  4. Which compiler and which version is it?

Crashes just when it should send the AUTH to BNet:

[AURA] finished loading [ip-to-country.csv] [BNET: Northrend] connecting to server [europe.battle.net] on port 6112 [BNET: Northrend] resolved and cached server IP address 5.42.181.15 [IRC: irc.quakenet.org] connecting to server [irc.quakenet.org] on port 6667 [BNET: Northrend] connected [IRC: irc.quakenet.org] connected [IRC: irc.quakenet.org] NOTICE AUTH : Looking up your hostname [IRC: irc.quakenet.org] NOTICE AUTH : Checking Ident [BNET: Northrend] attempting to auth as Warcraft III: The Frozen Throne [IRC: irc.quakenet.org] NOTICE AUTH :*** Found your hostname [BNET: Northrend] cd keys accepted

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Josko/aura-bot/issues/47#issuecomment-320261378, or mute the thread https://github.com/notifications/unsubscribe-auth/AJkjwy8Rylw7lWvgNECKOwIvJhksgArSks5sUyiegaJpZM4OtIWa .

tripleindigo commented 6 years ago

so i just rebuild from master after deleting everything besided cfg and folder with wc3 files. this is what happened on first boot try the error came up just after [BNET: Euro] connecting to server [europe.battle.net] on port 6112 [BNET: Euro] resolved and cached server IP address 5.42.181.14 [BNET: Euro] connected this part. heres the error

Josko commented 6 years ago

I'll try it out on a fresh Ubuntu 16.04 VM and see how it goes. From the stacktrace it seems some std::string::append() failed from concating to a std::string...

Josko commented 6 years ago

Just tested it on an empty Ubuntu 16.04 (VirtualBox) VM. While it does work for me, I noticed that, the moment the files are malformed (ie. just touch War3Patch.mpq etc.), the bot crashes exactly like in the reported case. Some kind of sanity-checks at this point would be required.

But then again that is weird because it's connecting to an official BNet server which kinda guarantees the files are O.K... It could be the changes/packages you installed are a tad different so I've updated the README and Makefile to match the exact instructions this time. Could you perhaps retry?

Josko commented 6 years ago

Btw. One cause could be a StormLib bug so when compiling it try instead of:

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DYNAMIC_MODULE=1 ..

this invocation:

cmake -DBUILD_DYNAMIC_MODULE=1 ..

tripleindigo commented 6 years ago

gonna start all over 👍 lets see if it helps

ghost commented 6 years ago

Getting the same error on latest commit on OS X:

[AURA] finished loading [ip-to-country.csv] [BNET: USWest] connecting to server [uswest.battle.net] on port 6112 [BNET: USWest] resolved and cached server IP address 12.129.236.17 [BNET: Europe] connecting to server [europe.battle.net] on port 6112 [BNET: Europe] resolved and cached server IP address 5.42.181.17 [BNET: USEast] connecting to server [useast.battle.net] on port 6112 [BNET: USEast] resolved and cached server IP address 199.108.55.54 [BNET: Asia] connecting to server [asia.battle.net] on port 6112 [BNET: Asia] resolved and cached server IP address 121.254.164.34 [BNET: Europe] connected [BNET: USEast] connected [BNET: USWest] connected Segmentation fault: 11

Worked fine with a version from approx. 3 weeks ago. I'm using latest stormlib from brew.

Josko commented 6 years ago

This should be fixed now - at least it is working reliably on my Windows box at the moment. Reopen if still persistent.