godot-ci icon indicating copy to clipboard operation
godot-ci copied to clipboard

Godot Version 3.5.3 Support?

Open Sam2much96 opened this issue 1 year ago • 12 comments

Version 3.5.3 fixes API target requirements for apps published to Google PlayStore. It'll be sweet to get support?

Sam2much96 avatar Sep 29 '23 01:09 Sam2much96

Hi all,

@abarichello, Would this be as simple as updating the GODOT_VERSION here? https://github.com/abarichello/godot-ci/blob/0400d7855a6f093ab30bd8337e2811927dfde81a/Dockerfile#L18

I didn't see another maintained branch for version 3 (just a tag 3.5_stable and an old 3.2 branch)

Razzlegames avatar Oct 12 '23 20:10 Razzlegames

I noticed the 3.5.3 version from tux family segfaults on this command:

/usr/bin/bash: line 148: 16 Segmentation fault (core dumped) godot --editor --quit

Also this equivalent line when building the container RUN godot -e -q ${GODOT_TEST_ARGS}

This is after I altered the Dockerfile to use the newest Godot 3.5.3 release

FROM ubuntu:jammy
LABEL author="https://github.com/aBARICHELLO/godot-ci/graphs/contributors"

USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    git \
    git-lfs \
    unzip \
    wget \
    zip \
    adb \
    openjdk-11-jdk-headless \
    rsync \
    && rm -rf /var/lib/apt/lists/*

ARG GODOT_VERSION="3.5.3"
ARG RELEASE_NAME="stable"
ARG SUBDIR=""
ARG GODOT_TEST_ARGS=""
ARG GODOT_PLATFORM="linux_server.64"

RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \
    && wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
    && mkdir ~/.cache \
    && mkdir -p ~/.config/godot \
    && mkdir -p ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME} \
    && ln -s ~/.local/share/godot/templates ~/.local/share/godot/export_templates \
    && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \
    && mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM} /usr/local/bin/godot \
    && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
    && mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME} \
    && rm -f Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip

ADD getbutler.sh /opt/butler/getbutler.sh
RUN bash /opt/butler/getbutler.sh
RUN /opt/butler/bin/butler -V

ENV PATH="/opt/butler/bin:${PATH}"

# Download and setup android-sdk
ENV ANDROID_HOME="/usr/lib/android-sdk"
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip \
    && unzip commandlinetools-linux-*_latest.zip -d cmdline-tools \
    && mv cmdline-tools $ANDROID_HOME/ \
    && rm -f commandlinetools-linux-*_latest.zip

ENV PATH="${ANDROID_HOME}/cmdline-tools/cmdline-tools/bin:${PATH}"

RUN yes | sdkmanager --licenses \
    && sdkmanager "platform-tools" "build-tools;33.0.2" "platforms;android-33" "cmdline-tools;latest" "cmake;3.22.1" "ndk;25.2.9519653"

# Adding android keystore and settings
RUN keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 \
    && mv debug.keystore /root/debug.keystore

RUN godot -e -q ${GODOT_TEST_ARGS}
RUN echo 'export/android/android_sdk_path = "/usr/lib/android-sdk"' >> ~/.config/godot/editor_settings-4.tres
RUN echo 'export/android/debug_keystore = "/root/debug.keystore"' >> ~/.config/godot/editor_settings-4.tres
RUN echo 'export/android/debug_keystore_user = "androiddebugkey"' >> ~/.config/godot/editor_settings-4.tres
RUN echo 'export/android/debug_keystore_pass = "android"' >> ~/.config/godot/editor_settings-4.tres
RUN echo 'export/android/force_system_user = false' >> ~/.config/godot/editor_settings-4.tres
RUN echo 'export/android/timestamping_authority_url = ""' >> ~/.config/godot/editor_settings-4.tres
RUN echo 'export/android/shutdown_adb_on_exit = true' >> ~/.config/godot/editor_settings-4.tres

Razzlegames avatar Oct 14 '23 15:10 Razzlegames

Hey all, I verified this does look like it's an issue with the 3.5.3 build (at least on tux family). It segfaults after any command line run. E.g:

../../../Godot_v3.5.3-stable_linux_server.64 --quit --editor
   at: _load (core/io/resource_loader.cpp:270)
ERROR: res://Levels/TestFirstLevel/mainPocLevel.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Prefabs/Decorations/Parallax/Jungle/JungleAmbienceLoader.tscn
   at: poll (scene/resources/resource_format_text.cpp:412)
ERROR: Failed to load resource 'res://Levels/TestFirstLevel/mainPocLevel.tscn'.
   at: load (core/io/resource_loader.cpp:206)
ERROR: Failed loading resource: res://Levels/TestFirstLevel/mainPocLevel.tscn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:270)
ERROR: Failed loading scene: res://Levels/TestFirstLevel/mainPocLevel.tscn
   at: start (main/main.cpp:2107)
Segmentation fault

I'm going to file a bug report with the main Godot repo

Razzlegames avatar Dec 04 '23 00:12 Razzlegames

Awesome!

Sam2much96 avatar Dec 04 '23 11:12 Sam2much96

Any updates on this?

Sam2much96 avatar Mar 22 '24 12:03 Sam2much96

Any updates on this?

Given https://github.com/godotengine/godot/issues/85733, we'd need the issue to be fixed and 3.5.4 to be released first for a new 3.x Docker image to be usable.

Calinou avatar Mar 24 '24 01:03 Calinou

Hey all, Sorry I haven't had time to verify the root cause.

If anyone has time a simple case of reproduction and setting up the container (or a local Linux VM etc) to core dump will probably yield the root cause:

https://stackoverflow.com/questions/17965/how-to-generate-a-core-dump-in-linux-on-a-segmentation-fault

Then use addr2line etc

You could also run one of the offending commands with gdb on a debug bin with symbols to find the issue.

Razzlegames avatar Mar 25 '24 03:03 Razzlegames

Godot 3.6 beta released yesterday, can we do this?

Sam2much96 avatar May 14 '24 08:05 Sam2much96

@Sam2much96 I have an image you can use ready: https://hub.docker.com/layers/razzlegames/godot-ci/3.5.3_fixed/images/sha256-ab332dc8a2ae8cf9a58e82de6d8f965feac5a210a489c6ebe362d48c42a7139e?context=repo

You can reference it as: razzlegames/godot-ci:3.5.3_fixed

It works for my pipeline but please let me know your results.

I also made a PR but there's no baseline 3.5 branch.

Can someone with admin permissions please create a 3.5 branch off the 3.5-stable tag? @Calinou @abarichello etc?

If so I can fix the PR to the correct remote branch.

Razzlegames avatar Aug 04 '24 06:08 Razzlegames

FYI: I didn't determine the root cause as the segfault was not reproduceable in the Godot 3.5 branch and it appears the 3.5.3 binaries from official Godot Github work: https://github.com/godotengine/godot/releases/tag/3.5.3-stable

So I went with these (see my PR for details, look only at the Dockerfile: https://github.com/abarichello/godot-ci/pull/147/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557).

Razzlegames avatar Aug 04 '24 06:08 Razzlegames

@Razzlegames The Workflow Builds successfully for Linux and Windows, it breaks on Android with this error:

ERROR: Cannot export project with preset "Android" due to configuration errors: A valid Android SDK path is required in Editor Settings.

I believe it can be fixed with come custom bash scripts on Linux, if the Android SDK templates for 3.5.3 are available in the workflow repository

Sam2much96 avatar Aug 04 '24 08:08 Sam2much96

Can someone with admin permissions please create a 3.5 branch off the 3.5-stable tag? @Calinou @abarichello etc?

Done: https://github.com/abarichello/godot-ci/tree/3.5

Calinou avatar Aug 04 '24 14:08 Calinou