diff --git a/GuildWarsPartySearch.Bot/Dependencies/Headquarter b/GuildWarsPartySearch.Bot/Dependencies/Headquarter index 53810ae..cb2d300 160000 --- a/GuildWarsPartySearch.Bot/Dependencies/Headquarter +++ b/GuildWarsPartySearch.Bot/Dependencies/Headquarter @@ -1 +1 @@ -Subproject commit 53810aecadbf9b6b916499474c20162bab22ad39 +Subproject commit cb2d300d0bd7c65829087d36d48b8050aeb2ff8c diff --git a/GuildWarsPartySearch.Bot/Dockerfile b/GuildWarsPartySearch.Bot/Dockerfile index 15c6690..98031b4 100644 --- a/GuildWarsPartySearch.Bot/Dockerfile +++ b/GuildWarsPartySearch.Bot/Dockerfile @@ -6,6 +6,7 @@ RUN apk update && apk add \ ninja \ ninja-build \ alpine-sdk \ + gdb \ python3 py3-pip py3-tqdm py3-pefile WORKDIR /app diff --git a/GuildWarsPartySearch.Bot/Dockerfile.ubuntu b/GuildWarsPartySearch.Bot/Dockerfile.ubuntu new file mode 100644 index 0000000..b599611 --- /dev/null +++ b/GuildWarsPartySearch.Bot/Dockerfile.ubuntu @@ -0,0 +1,12 @@ +FROM ubuntu:latest + +RUN apt-get update && \ + apt-get install -y \ + cmake \ + ninja-build \ + build-essential \ + && apt-get clean + +WORKDIR /app + +CMD ["sh", "-c", "while :; do sleep 2073600; done"] \ No newline at end of file diff --git a/GuildWarsPartySearch.Bot/Gw.build b/GuildWarsPartySearch.Bot/Gw.build new file mode 100644 index 0000000..92659ee --- /dev/null +++ b/GuildWarsPartySearch.Bot/Gw.build @@ -0,0 +1 @@ +37444 \ No newline at end of file diff --git a/GuildWarsPartySearch.Bot/README.md b/GuildWarsPartySearch.Bot/README.md index 23a8353..1a9daa4 100644 --- a/GuildWarsPartySearch.Bot/README.md +++ b/GuildWarsPartySearch.Bot/README.md @@ -16,7 +16,10 @@ ## Debugging Segmentation fault in docker usually means the bot failed; running manually by sshing into the server could help give more info in the console. - -1. `docker run -d --restart always --name partysearchbot -v "%cd%":/app partysearchbot_alpine` -2. `docker exec -ti partysearchbot bash` -3. `./run.sh` +1. `docker rm -f partysearchbot` +2. `docker run -d --restart always --name partysearchbot -v "%cd%":/app partysearchbot_alpine` +3. `docker exec -ti partysearchbot bash` +4. `./run.sh` - this should fail with a useless segmentation fault message. Copy the command shown in the output. +5. `gdb --args ` - this should open a gdb prompt for the next steps. +6. `run` - this should end up printing out `Program received signal SIGSEGV, Segmentation fault.` +6. `bt` to view the call stack, explaining the error so you can actually do something about it! \ No newline at end of file diff --git a/GuildWarsPartySearch.Bot/run.sh b/GuildWarsPartySearch.Bot/run.sh index a853ee1..9b2532d 100644 --- a/GuildWarsPartySearch.Bot/run.sh +++ b/GuildWarsPartySearch.Bot/run.sh @@ -29,6 +29,17 @@ if [ ! -f $CLIENT_EXE ]; then source build.sh fi +echo $CLIENT_EXE +echo $EMAIL +echo $PASSWORD +echo $CHARACTER +echo $DISTRICT +echo $MAP_ID +echo $LOG_FILE +echo $BUILD_VERSION_FILE +echo $PLUGIN_EXE + +RUN_CMD=$(cat <&1 \ No newline at end of file +"$PLUGIN_EXE" +EOF +) + + +echo " +------- Command to run: +"; +echo $RUN_CMD +echo " +------- +"; + + +bash -c "$RUN_CMD" \ No newline at end of file