question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run samples involving records

See original GitHub issue

Link: https://sharplab.io/#v2:EYLgtghgzgLgpgJwDQxAgrgOyQExAagB8ABAJgEYBYAKBuPIE4AKTOAdwAIAlOAYyfIBKAHQANQQG4aNAPQyOAWiXTqCPgHsEObnyYBLTDA7iptapghg4UAA4RecDvWFcsMPVeEBhdWBt6AG0QAZUQANz0HKA4AbydSDgBJKABRAA94BAsAxMw9IziAXw5CoA===

Error message: Unbreakable.AssemblyGuardException: Method System.Void Rec::Deconstruct(System.Int32&) performs pointer operations which cannot be validated.

Sample code:

using System;

Console.WriteLine(new Rec(1).X);

// ---

record Rec(int X);

namespace System.Runtime.CompilerServices { class IsExternalInit { } }

This probably happens because records with parameter lists synthesize a Deconstruct method. Is there any way the restriction can be modified to make it possible to run some record samples?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ashmindcommented, Nov 13, 2021

Hi @Kryptos-FR, I didn’t have a chance to take a look at the root cause, however this has been resolved by moving to a new Run model.

0reactions
ashmindcommented, Dec 16, 2020

Interesting! I will take a look when I have a moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux perf record not generating any samples
perf record -e cpu-clock <command>. works for me. The problem seems to be that th default event (cycles) is not available.
Read more >
Service Manager - ITOM Practitioner Portal
The following is an excerpt of a sample error message indicating that no mapping configuration was found for the push TQL query. java.lang....
Read more >
Troubleshooting | Apps Script
These errors are caused by using a function or class incorrectly, and can only be detected once the script has been run. For...
Read more >
Dealing with errors - Power Query
In this query, you have a Sales column that has one cell with an error caused by a conversion error.
Read more >
Review and troubleshoot import errors
Learn how to view and troubleshoot common errors that occur during record imports. ... The import file contains a row with data that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found