Skip to content

Fix iOS simulator linking for x86_64 and EditorLog URL crash#116933

Open
gumaciel wants to merge 5 commits intogodotengine:masterfrom
gumaciel:fix/apple-embedded-export-archive-to-xcode-organizer
Open

Fix iOS simulator linking for x86_64 and EditorLog URL crash#116933
gumaciel wants to merge 5 commits intogodotengine:masterfrom
gumaciel:fix/apple-embedded-export-archive-to-xcode-organizer

Conversation

@gumaciel
Copy link
Contributor

@gumaciel gumaciel commented Mar 1, 2026

When exporting an iOS project, the generated .xcarchive stayed in the export directory, which poisoned Xcode's linker search paths for simulator builds with arm64 device dylibs. This commit moves the .xcarchive straight to the standard macOS Archives directory (~/Library/Developer/Xcode/Archives/YYYY-MM-DD/) so it fixes the simulator linking issue and allows the build to instantly appear inside Xcode Organizer.

Additionally, this adds explicit URI schema checks (file://, http://) to EditorLog::_meta_clicked, preventing a 64-bit integer overflow crash caused by attempting to parse system file paths with colons as script line numbers.


This bug reproduces in:

  • Godot 4.6.1 stable and 4.7 dev/master branches.
  • Mac Intel x86_64
  • Xcode Version 26.2 (17C52)

Steps to reproduce:

  • Export to iOS normally
  • On Xcode, build to simulator

Bug: Screenshot 2026-03-01 at 15 39 03

Changes in export: Screenshot 2026-03-01 at 17 24 48

When exporting an iOS project, the generated .xcarchive stayed in the export directory, which poisoned Xcode's linker search paths for simulator builds with arm64 device dylibs. This commit moves the .xcarchive straight to the standard macOS Archives directory (~/Library/Developer/Xcode/Archives/YYYY-MM-DD/) so it fixes the simulator linking issue and allows the build to instantly appear inside Xcode Organizer.

Additionally, this adds explicit URI schema checks (file://, http://) to EditorLog::_meta_clicked, preventing a 64-bit integer overflow crash caused by attempting to parse system file paths with colons as script line numbers.
@gumaciel gumaciel requested a review from a team as a code owner March 1, 2026 20:49
@Nintorch Nintorch added this to the 4.x milestone Mar 2, 2026
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

No sure if this is desired default behavior. And moving archive might break existing workflows.

@gumaciel gumaciel requested review from a team as code owners March 2, 2026 22:02
@gumaciel gumaciel requested a review from bruvzg March 2, 2026 22:04
Comment on lines +207 to +211
if (p_meta.begins_with("file://") || p_meta.begins_with("http://") || p_meta.begins_with("https://")) {
OS::get_singleton()->shell_open(p_meta);
return;
}

Copy link
Member

Choose a reason for hiding this comment

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

Is this change necessary? http(s):// and file:// links are already working in the editor log (handled by the last else branch).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added this because opening a file in Explorer, it's having some error with "64-bit integer overflow crash" due to the file name, for example: 20260304180510.

But you're right, I'll try to fix this issue with another approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bruvzg I've updated the branch

I've seen that line = parts[1].to_int() - 1; is only necessary when it needs to open a source code appointment to the line, also I've added validations if (parts[1].is_valid_int() && parts[1].length() < 10) because the length can't be higher than 10.

Please check again

@gumaciel gumaciel requested a review from a team as a code owner March 15, 2026 23:10
…sing and refine external editor fallback logic.
@gumaciel gumaciel requested a review from bruvzg March 16, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants