Skip to content

Commit

Permalink
Merge pull request #435 from brandmooffin/patch/2.4.8.3
Browse files Browse the repository at this point in the history
potential fix for the null reference in ccnode.visit()
  • Loading branch information
brandmooffin authored Jan 14, 2025
2 parents b33ad2d + f7ca922 commit e418203
Show file tree
Hide file tree
Showing 29 changed files with 89 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core_uwp_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
Expand Down
63 changes: 31 additions & 32 deletions .github/workflows/uwp_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,46 @@ name: UWP

on:
push:
branches: [ "*" ]
branches: ["*"]
pull_request:
branches: [ "*" ]
branches: ["*"]

jobs:

build:

strategy:
matrix:
configuration: [Debug, Release]

runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on:
windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on

env:
Solution_Name: ./cocos2d-mono.Uwp/cocos2d-mono.Uwp.sln # Replace with your solution name, i.e. MyWpfApp.sln.
Solution_Name: ./cocos2d-mono.Uwp/cocos2d-mono.Uwp.sln # Replace with your solution name, i.e. MyWpfApp.sln.

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Build the application
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Build the application
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Android.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Android</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2D-Mono for Android</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for Android</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Core.Android.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Core.Android</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2D-Mono for Core Android</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for Core Android</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Core.DesktopGL.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Core.DesktopGL</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2D-Mono for Core DesktopGL</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for Core DesktopGL (OpenGL Desktop Platforms)</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Core.Uwp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Core.Uwp</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>cocos2d-mono for Core UWP</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for Core UWP (Windows Universal)</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Core.Windows.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Core.Windows</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2D-Mono for Core Windows</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for Core Windows (DX)</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Core.iOS.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Core.iOS</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2d-Mono for Core iOS</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for Core iOS</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.DesktopGL.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.DesktopGL</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2D-Mono for DesktopGL</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for DesktopGL (OpenGL Desktop Platforms)</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Uwp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Uwp</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>cocos2d-mono for UWP</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for UWP (Windows Universal)</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.Windows.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.Windows</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2D-Mono for Windows</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for Windows (DX)</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions Nuget Packages/Cocos2D.iOS.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Cocos2D-Mono.iOS</id>
<version>2.4.8.2</version>
<version>2.4.8.3</version>
<title>Cocos2d-Mono for iOS</title>
<authors>Cocos2D-Mono Team, Broken Walls Studios</authors>
<owners>Cocos2D-Mono Team, Broken Walls Studios</owners>
Expand All @@ -13,8 +13,7 @@
<description>Cocos2D-Mono for iOS</description>
<repository url="https://github.com/brandmooffin/cocos2d-mono" />
<releaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</releaseNotes>
<copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</copyright>
<tags>mono monogame cocos2d game</tags>
Expand Down
5 changes: 2 additions & 3 deletions box2d/box2d.Android/box2d.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<BaseIntermediateOutputPath>obj\Android\Debug</BaseIntermediateOutputPath>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>2.4.8.2</Version>
<Version>2.4.8.3</Version>
<Title>box2d for Android</Title>
<Authors>Cocos2D-Mono Team, Broken Walls Studios</Authors>
<Description>box2d for Android</Description>
Expand All @@ -19,8 +19,7 @@
<RepositoryUrl>https://github.com/brandmooffin/cocos2d-mono</RepositoryUrl>
<PackageTags>mono monogame cocos2d game</PackageTags>
<PackageReleaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</PackageReleaseNotes>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
Expand Down
5 changes: 2 additions & 3 deletions box2d/box2d.DesktopGL/box2d.DesktopGL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>2.4.8.2</Version>
<Version>2.4.8.3</Version>
<PackageId>box2d.DesktopGL</PackageId>
<Company>Broken Walls Studios</Company>
<Copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</Copyright>
Expand All @@ -25,8 +25,7 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReleaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/brandmooffin/cocos2d-mono</PackageProjectUrl>
<RepositoryUrl>https://github.com/brandmooffin/cocos2d-mono</RepositoryUrl>
Expand Down
4 changes: 2 additions & 2 deletions box2d/box2d.Uwp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.8.2")]
[assembly: AssemblyFileVersion("2.4.8.2")]
[assembly: AssemblyVersion("2.4.8.3")]
[assembly: AssemblyFileVersion("2.4.8.3")]
5 changes: 2 additions & 3 deletions box2d/box2d.Windows/box2d.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>2.4.8.2</Version>
<Version>2.4.8.3</Version>
<PackageId>box2d.Windows</PackageId>
<Company>Broken Walls Studios</Company>
<Copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</Copyright>
Expand All @@ -26,8 +26,7 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReleaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/brandmooffin/cocos2d-mono</PackageProjectUrl>
<RepositoryUrl>https://github.com/brandmooffin/cocos2d-mono</RepositoryUrl>
Expand Down
5 changes: 2 additions & 3 deletions box2d/box2d.iOS/box2d.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
<AssemblyName>box2d.iOS</AssemblyName>
<Title>box2d for iOS</Title>
<Authors>Cocos2D-Mono Team, Broken Walls Studios</Authors>
<Version>2.4.8.2</Version>
<Version>2.4.8.3</Version>
<Description>box2d for iOS</Description>
<Copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</Copyright>
<PackageProjectUrl>https://github.com/brandmooffin/cocos2d-mono</PackageProjectUrl>
<RepositoryUrl>https://github.com/brandmooffin/cocos2d-mono</RepositoryUrl>
<PackageReleaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/base_nodes/CCNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ public virtual void Visit()

int i = 0;

if ((m_pChildren != null) && (m_pChildren.count > 0))
if ((m_pChildren != null) && (m_pChildren.count > 0) && m_pChildren.Elements != null)
{
SortAllChildren();

Expand Down
5 changes: 2 additions & 3 deletions cocos2d/cocos2d.Android/cocos2d.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
<TargetFramework>net7.0-android33.0</TargetFramework>
<BaseIntermediateOutputPath>obj\Android\Debug</BaseIntermediateOutputPath>
<PackageReleaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</PackageReleaseNotes>
<Authors>Cocos2D-Mono Team, Broken Walls Studios</Authors>
<Version>2.4.8.2</Version>
<Version>2.4.8.3</Version>
<Title>Cocos2D-Mono for Android</Title>
<Description>Cocos2D-Mono for Android</Description>
<Copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</Copyright>
Expand Down
5 changes: 2 additions & 3 deletions cocos2d/cocos2d.Core.Android/cocos2d.Core.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
<TargetFramework>net7.0-android33.0</TargetFramework>
<BaseIntermediateOutputPath>obj\Core\Android\Debug</BaseIntermediateOutputPath>
<PackageReleaseNotes>
- CCDrawManager reset width and height on Init
- Remove early config init during CCLabel init
- Null reference check in CCNode.Visit()
</PackageReleaseNotes>
<Authors>Cocos2D-Mono Team, Broken Walls Studios</Authors>
<Version>2.4.8.2</Version>
<Version>2.4.8.3</Version>
<Title>Cocos2D-Mono for Core Android</Title>
<Description>Cocos2D-Mono for Core Android</Description>
<Copyright>Copyright © 2024 Cocos2D-Mono Team; Broken Walls Studios, LLC.</Copyright>
Expand Down
Loading

0 comments on commit e418203

Please sign in to comment.