Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pointers may only be used in an unsafe context #2391

Closed
marwie opened this issue May 5, 2021 · 0 comments
Closed

Pointers may only be used in an unsafe context #2391

marwie opened this issue May 5, 2021 · 0 comments
Labels
Bug Decompiler The decompiler engine itself

Comments

@marwie
Copy link
Contributor

marwie commented May 5, 2021

Input code

Please see #2389

Decompilation fails in UnityEngine.Rendering.CommandBuffer e.g. RequestAsyncReadback

Here is the relevant section in CSReference
https://github.com/Unity-Technologies/UnityCsReference/blob/61f92bd79ae862c4465d35270f9d1d57befd1761/Runtime/Export/Graphics/RenderingCommandBuffer.bindings.cs#L42

Erroneous output

<UnityEngine>\UnityEngine\Rendering\AsyncGPUReadback.cs:1143 Pointers may only be used in an unsafe context

Error:
image

Calling:
image

Adding unsafe to the call makes the error go away but this might not be correct looking at the CSReference above (maybe they changed it tho) where the called method Internal_RequestAsyncReadback_1(src, callback); does not have a third argument

image

image

Details

Please see #2389

@marwie marwie added Bug Decompiler The decompiler engine itself labels May 5, 2021
@marwie marwie changed the title (Possibly) Missing unsafe keyword Pointers may only be used in an unsafe context May 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
ElektroKill added a commit to dnSpyEx/ILSpy that referenced this issue Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

No branches or pull requests

1 participant