Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[iOS] SIGSEGV during mono_process_dbg_packet when applying code changes #22102

Open
jeromelaban opened this issue Feb 3, 2025 · 4 comments
Open
Labels
need-attention An issue requires our attention/response
Milestone

Comments

@jeromelaban
Copy link
Contributor

jeromelaban commented Feb 3, 2025

Apple platform

iOS

Framework version

net9.0-*

Affected platform version

9.0.102, 9.0.200-preview.0.25057.12

VS 17.11, VS 17.13

Description

Given a specific class structure, removing a method in a class will crash the app with the following stack:

0x10565f86c - /Users/jay/Library/Developer/CoreSimulator/Devices/2CFE56A9-9171-4779-990E-158E52CA28CD/data/Containers/Bundle/Application/447EFCA2-C686-45F7-AAC0-2A8EB691B050/Issue3290.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x10560c704 - /Users/jay/Library/Developer/CoreSimulator/Devices/2CFE56A9-9171-4779-990E-158E52CA28CD/data/Containers/Bundle/Application/447EFCA2-C686-45F7-AAC0-2A8EB691B050/Issue3290.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x1055797f0 - /Users/jay/Library/Developer/CoreSimulator/Devices/2CFE56A9-9171-4779-990E-158E52CA28CD/data/Containers/Bundle/Application/447EFCA2-C686-45F7-AAC0-2A8EB691B050/Issue3290.app/libmonosgen-2.0.dylib : mono_sigsegv_signal_handler_debug
0x104f477e0 - /usr/lib/system/libsystem_platform.dylib : _sigtramp
0x1051036e4 - /Users/jay/Library/Developer/CoreSimulator/Devices/2CFE56A9-9171-4779-990E-158E52CA28CD/data/Containers/Bundle/Application/447EFCA2-C686-45F7-AAC0-2A8EB691B050/Issue3290.app/libmono-component-debugger.dylib : mono_process_dbg_packet
0x105108fd4 - /Users/jay/Library/Developer/CoreSimulator/Devices/2CFE56A9-9171-4779-990E-158E52CA28CD/data/Containers/Bundle/Application/447EFCA2-C686-45F7-AAC0-2A8EB691B050/Issue3290.app/libmono-component-debugger.dylib : mono_debugger_agent_receive_and_process_command
0x10510b878 - /Users/jay/Library/Developer/CoreSimulator/Devices/2CFE56A9-9171-4779-990E-158E52CA28CD/data/Containers/Bundle/Application/447EFCA2-C686-45F7-AAC0-2A8EB691B050/Issue3290.app/libmono-component-debugger.dylib : debugger_thread
0x105752f08 - /Users/jay/Library/Developer/CoreSimulator/Devices/2CFE56A9-9171-4779-990E-158E52CA28CD/data/Containers/Bundle/Application/447EFCA2-C686-45F7-AAC0-2A8EB691B050/Issue3290.app/libmonosgen-2.0.dylib : start_wrapper
0x104f93414 - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
0x104f8e5e0 - /usr/lib/system/libsystem_pthread.dylib : thread_start

Steps to Reproduce

  • Unzip the following app: Issue22102.zip
  • Launch the app
  • Go to TestClass.cs
  • Remove the test1 method, do not comment it, then apply the code changes
  • The app will crash

Did you find any workaround?

  • Removing the Owner property
  • Not instantiating the MainPage class

Those changes are seemingly unrelated and make changes very difficult to trust.

Build logs

No response

@jeromelaban
Copy link
Contributor Author

Runtime logs: 22102-medataupdatelogs.txt

@jeromelaban
Copy link
Contributor Author

Possible workaround:

Adding the following at the end of the TestClass.cs file:

partial class Dummy
{
    private class Inner
    {
        private object Owner { get => null; set { } }
    }
}

makes metadata updates succeed.

@rolfbjarne
Copy link
Member

@jeromelaban which IDE are you using?

@rolfbjarne rolfbjarne added the need-info Waiting for more information before the bug can be investigated label Feb 12, 2025
@rolfbjarne rolfbjarne added this to the Future milestone Feb 12, 2025
@jeromelaban
Copy link
Contributor Author

@rolfbjarne my apologies, it's VS 17.12.4, but also had the issue with 17.13 Preview 5.

@microsoft-github-policy-service microsoft-github-policy-service bot added need-attention An issue requires our attention/response and removed need-info Waiting for more information before the bug can be investigated labels Feb 12, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
need-attention An issue requires our attention/response
Projects
None yet
Development

No branches or pull requests

2 participants