Skip to content

Conversation

melekr
Copy link
Contributor

@melekr melekr commented Aug 15, 2025

Adds 16KB page size support
  • Updates Android native libs for 16KB page size compatibility
  • Includes x86_64 .so builds
Updates Android Native Client
  • Updates Crashpad Java handler
  • Removes Crashpad executable handler path
  • Validates native lib directory
  • Fixes attribute lookups for 'device.sdk' and 'device.abi'
  • Improves env var setup and database path checks

ref: BT-5996

melekr added 2 commits August 15, 2025 14:30
Update Android native libs for 16KB page size compatibility
Include x86_64 .so builds
Update Crashpad Java handler
Remove Crashpad executable handler path
Validate native lib directory
Fix attribute lookups for 'device.sdk' and 'device.abi'
Improve env var setup and database path checks
@melekr melekr self-assigned this Aug 15, 2025
@melekr melekr requested review from konraddysput and rick-bt August 15, 2025 20:43
Copy link
Contributor

@rick-bt rick-bt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

targetPlatform: ${{ matrix.targetPlatform }}
projectPath: ${{ matrix.projectPath }}/
allowDirtyBuild: true
allowDirtyBuild: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no end of file char

Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude VisionOS: 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i dont have visionos support, your sdk generates error or warning. Please bring the previous meta files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is was generated with the minimum Unity 2021/2022.3 versions.
.meta files here follow the new standard format.

  • Exclude are standard now. for older versions they would be ignored.
  • Other versions do not support simulator slices or 16kb either.

var apiLevelString = backtraceAttributes["device.sdk"];
int apiLevel;
if (apiLevelString == null || !int.TryParse(apiLevelString, out apiLevel))
if (!backtraceAttributes.TryGetValue("device.sdk", out var apiLevelString) || !int.TryParse(apiLevelString, out var apiLevel))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even in the newest version of unity you can still target older .net sdks - we should stick to the previous api

return;
}

if (!backtraceAttributes.TryGetValue("device.abi", out var deviceAbi))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please look at the comment

return;
}

// Java Crash Handler
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it has java in the method name. not sure if this comment is useful

{
{
// Guard malformed attributes
if (attribute.Key == null || attribute.Value == null) continue;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddAttribute already does it

var backtraceNativeLibraryPath = Path.Combine(nativeDirectory, _nativeLibraryName);
if (!File.Exists(backtraceNativeLibraryPath)) {
backtraceNativeLibraryPath = string.Format("{0}!/lib/{1}/{2}", Application.dataPath, deviceAbi, _nativeLibraryName);
backtraceNativeLibraryPath = $"{Application.dataPath}!/lib/{deviceAbi}/{_nativeLibraryName}";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my comment regardin new .net api


// prepare native crash handler environment variables
var paths = new List<string>();
if (!string.IsNullOrEmpty(nativeDirectory)) paths.Add(nativeDirectory);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use {} after if statement

var paths = new List<string>();
if (!string.IsNullOrEmpty(nativeDirectory)) paths.Add(nativeDirectory);
var parent = Directory.GetParent(nativeDirectory);
if (parent != null && Directory.Exists(parent.FullName)) paths.Add(parent.FullName);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better if you can compare if this is null or empty instead

@melekr melekr requested a review from konraddysput August 15, 2025 22:13
@melekr melekr changed the base branch from master to release/3.13.0 August 15, 2025 22:26
AndroidJNIHelper.ConvertToJNIArray(new string[0]),
AndroidJNIHelper.ConvertToJNIArray(new string[0]),
AndroidJNIHelper.ConvertToJNIArray(attachments.ToArray()),
AndroidJNIHelper.ConvertToJNIArray(Array.Empty<string>()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is also the newest .net syntax - can you bring back my old version?

Array.Empty is a sugar syntax on top of something we already had. it's just better to be compatible with more apis

Copy link
Collaborator

@konraddysput konraddysput left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your meta files now don't have end of file line

userData:
assetBundleName:
assetBundleVariant:
assetBundleVariant:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end of file

@melekr melekr merged commit 3447fe2 into release/3.13.0 Aug 15, 2025
7 checks passed
melekr added a commit that referenced this pull request Aug 15, 2025
* Bump version and update changelog

* Add 16KB page size support (#251)

* Update OOM handling and static dependencies for Device & Simulator (#255)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants