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

Debug extremly slow/hanging after resource load in code #46

Open
Nijco opened this issue Jun 11, 2022 · 0 comments
Open

Debug extremly slow/hanging after resource load in code #46

Nijco opened this issue Jun 11, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Nijco
Copy link

Nijco commented Jun 11, 2022

OS/device including version:
Windows 10 / Manjaro Linux

Issue description:
Unfortunately, I have a big problem with the debugging in VS Code with this plugin:
In a recent project, I load an image in the code to read the pixel values. If I simply run the project, it works as expected.
But when I debug the project, the debugger will stop working as expected after the line with the Resource Loading.
After that line every step over/resume will take minutes. If the image it's loading is really small, the issue does not appear, although the image where the problem occurs is also not big (74KB).
After this happened in my project, I reproduced the issue in a minimal project on multiple machines on Windows and Linux.
The debugging in the "normal" Visual Studio works as expected.

The code:

using Godot;
using System;

public class world_test : Spatial
{
    public override void _Ready()
    {
        int i = 0;
        i++;
        i++;
        var t =(Image) ResourceLoader.Load("res://image.png"); //size 74KB imported as image
        i++; //if I do a step over / resume after this line it will take litereally minutes
        i++;
        i++;
	t.Lock();
        GD.Print(t.GetPixel(4,4));
    }

}

I wonder if this in the GedotDebugSession.log is the issue:

16:02:00.027212: GodotDebugSession: Starting debug session...
16:02:08.517004: Aborting invocation of method String Godot.Collections.Dictionary:ToString () on object Godot.Collections.Dictionary
16:08:35.812247: Error in soft debugger method call thread on method String Godot.Collections.Dictionary:ToString () on object Godot.Collections.Dictionary
Mono.Debugger.Soft.CommandException: Debuggee returned error code INVOKE_ABORTED.
   bei Mono.Debugger.Soft.VirtualMachine.ErrorHandler(Object sender, ErrorHandlerEventArgs args) in /home/ignacio/Projects/vscode/godot-csharp-vscode/thirdparty/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:Zeile 357.
   bei Mono.Debugger.Soft.ObjectMirror.EndInvokeMethodInternalWithResult(IAsyncResult asyncResult) in /home/ignacio/Projects/vscode/godot-csharp-vscode/thirdparty/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs:Zeile 353.
   bei Mono.Debugging.Soft.MethodCall.EndInvoke() in /home/ignacio/Projects/vscode/godot-csharp-vscode/thirdparty/debugger-libs/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs:Zeile 2827.
16:08:41.790351: Aborting invocation of method String Godot.Collections.Dictionary:ToString () on object Godot.Collections.Dictionary
16:15:00.274232: Error in soft debugger method call thread on method String Godot.Collections.Dictionary:ToString () on object Godot.Collections.Dictionary
Mono.Debugger.Soft.CommandException: Debuggee returned error code INVOKE_ABORTED.
   bei Mono.Debugger.Soft.VirtualMachine.ErrorHandler(Object sender, ErrorHandlerEventArgs args) in /home/ignacio/Projects/vscode/godot-csharp-vscode/thirdparty/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:Zeile 357.
   bei Mono.Debugger.Soft.ObjectMirror.EndInvokeMethodInternalWithResult(IAsyncResult asyncResult) in /home/ignacio/Projects/vscode/godot-csharp-vscode/thirdparty/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs:Zeile 353.
   bei Mono.Debugging.Soft.MethodCall.EndInvoke() in /home/ignacio/Projects/vscode/godot-csharp-vscode/thirdparty/debugger-libs/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs:Zeile 2830.

Thank you for any help and your work on this project.
Kind regards
Nico

@Nijco Nijco added the bug Something isn't working label Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants