CSharpShellApp icon indicating copy to clipboard operation
CSharpShellApp copied to clipboard

Error CS8021

Open Alisis33 opened this issue 2 years ago • 5 comments

Sometimes this error show up. V2.5.123

Compiling...
Build failed [00:01.330].
[Warning] CS8021: Für RuntimeMetadataVersion wurde kein Wert gefunden. Keine Assembly mit System.Object wurde gefunden, und es wurde auch kein Wert für RuntimeMetadataVersion mit Optionen angegeben.

(The text say: no assembly found, no values for RuntimeMetadataVersion)

it happend without any special operations, some minutes after starting work. there is no pattern to forse it. this time it show up by simply compiling the code. i compiled a second time without restart, and it worked again. I hafe gigs on internal and external storage.

There was no stack trace because no System.

Then this error show up short after related to it ...i compiled a second time without restart, and it worked again.

System.ArgumentException: An item with the same key has already been added. Key: CSharp_Shell.IDE.SourceFile
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <ac5dda0190f24d829c27844a2bccc1dd>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <ac5dda0190f24d829c27844a2bccc1dd>:0 
  at CSharp_Shell.IDE.Workspace.AddSourceFile (CSharp_Shell.IDE.SourceFile x, System.Boolean readdReferences) [0x000e4] in <60465b6c8ccf40b0860d0afba5afc804>:0 
  at CSharp_Shell.IDE.Workspace.LoadSourceFiles (CSharp_Shell.IDE.IProject project) [0x00027] in <60465b6c8ccf40b0860d0afba5afc804>:0 
  at CSharp_Shell.IDE.Workspace.Init (CSharp_Shell.IDE.IProject project, System.Boolean setAsMainProject) [0x00218] in <60465b6c8ccf40b0860d0afba5afc804>:0 
  at CSharp_Shell.Activities.MainActivity+<>c__DisplayClass269_0.<InitProject>b__1 () [0x00000] in <60465b6c8ccf40b0860d0afba5afc804>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <ac5dda0190f24d829c27844a2bccc1dd>:0 
  at System.Threading.Tasks.Task.Execute () [0x00000] in <ac5dda0190f24d829c27844a2bccc1dd>:0 
--- End of stack trace from previous location where exception was thrown ---

  at CSharp_Shell.Activities.MainActivity.InitProject (System.String projectFilePath) [0x0010f] in <60465b6c8ccf40b0860d0afba5afc804>:0 

Alisis33 avatar Jun 17 '22 12:06 Alisis33

I'm not certain of the root cause. I'll add a check to the AddSourceFile method. And I'll make the compile button ignore too frequent clicks. Accidental "double compile" might cause this.

radimitrov avatar Jun 17 '22 14:06 radimitrov

I can not say, maybe not the compile alone, because it happens anytime. But mostly/allways short after starting work.

I use a large project with many files and long codes.

The only possibility to force it I see, is to use a very big project and heavely load/slow down the system. The Compiler maybe was such a load. But it show up too when I simply use the menu. It is very random and I could not force it.

Alisis33 avatar Jun 17 '22 21:06 Alisis33

This now pop up the same way some very few times. I have no idea if it is related

Java.Lang.IndexOutOfBoundsException: offset(354) should be less than line limit(0)
  --- End of managed Java.Lang.IndexOutOfBoundsException stack trace ---
java.lang.IndexOutOfBoundsException: offset(354) should be less than line limit(0)
	at android.text.TextLine.measure(TextLine.java:353)
	at android.text.Layout.getHorizontal(Layout.java:1225)
	at android.text.Layout.getHorizontal(Layout.java:1202)
	at android.text.Layout.getPrimaryHorizontal(Layout.java:1172)
	at android.widget.TextView.bringPointIntoView(TextView.java:10989)
	at android.widget.TextView.onPreDraw(TextView.java:8222)
	at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1124)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3926)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2671)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10094)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1010)
	at android.view.Choreographer.doCallbacks(Choreographer.java:809)
	at android.view.Choreographer.doFrame(Choreographer.java:744)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:995)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:247)
	at android.app.ActivityThread.main(ActivityThread.java:8676)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)


Alisis33 avatar Oct 19 '22 21:10 Alisis33

It isn't. That has to be the console. I think I remember fixing for this a few months ago. Are you still on a 2.5.X app version?

radimitrov avatar Oct 23 '22 13:10 radimitrov

I use now v2.6.29 I could not force it, it was very rare

Alisis33 avatar Oct 26 '22 22:10 Alisis33