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.

IndexOutOfRangeException in ILReader.ReadOpCode() line 36

See original GitHub issue

When analyzing a certain exception I’m seeing an exception in ILReader.ReadOpCode() line 36 here: https://github.com/benaadams/Ben.Demystifier/blob/57e2d49ad1ebc0309c6f50f7555d159a6fcf820e/src/Ben.Demystifier/Internal/ILReader.cs#L36

The instruction is 235. singleByteOpCode only contains 225 entries.

Stack trace:

>	System.Diagnostics.Internal.ILReader.ReadOpCode Line 36	C#	Symbols loaded.
 	System.Diagnostics.Internal.ILReader.Read Line 25	C#	Symbols loaded.
 	System.Diagnostics.EnhancedStackTrace.TryResolveSourceMethod Line 350	C#	Symbols loaded.
 	System.Diagnostics.EnhancedStackTrace.TryResolveGeneratedName Line 289	C#	Symbols loaded.
 	System.Diagnostics.EnhancedStackTrace.GetMethodDisplayString Line 122	C#	Symbols loaded.
 	System.Diagnostics.EnhancedStackTrace.GetFrames Line 71	C#	Symbols loaded.
 	System.Diagnostics.EnhancedStackTrace.EnhancedStackTrace Line 46	C#	Symbols loaded.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
jkotascommented, Feb 18, 2018

235 is not valid opcode. It likely means that the IL reader has gotten out of sync and it is reading in the middle of IL instructions. You should disassemble the offending method using ildasm to figure this out.

0reactions
KirillOsenkovcommented, Feb 11, 2019

@onyxmaster thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - What is an IndexOutOfRangeException ...
What Is It? This exception means that you're trying to access a collection item by index, using an invalid index. An index is...
Read more >
Index was outside the bounds of the array.
this is my error message : IndexOutOfRangeException: Index was outside the bounds of the array. mobileInputs.Update () (at Assets/scripts/ ...
Read more >
IndexOutOfRangeException Class (System)
The exception that is thrown when an attempt is made to access an element of an array or collection with an index that...
Read more >
How to resolve system.indexoutofrangeexception
As for the original question, I tried with the returned column name as well: Console.WriteLine(reader["Id"].ToString() + ' ' + reader["email"].
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