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

Setting breakpoint in flixel.graphics.FlxGraphic causes the program to crash. #621

Open
EliteMasterEric opened this issue Jan 17, 2024 · 2 comments

Comments

@EliteMasterEric
Copy link

EliteMasterEric commented Jan 17, 2024

Reproduction Steps

  1. Create a Flixel sample project, with this PlayState:
package;

import flixel.FlxG;
import flixel.FlxState;
import flixel.text.FlxText;

class PlayState extends FlxState
{
	override public function create()
	{
		super.create();

		var text:FlxText = new FlxText(0, 0, FlxG.width, "Hello World!");
		add(text);
	}

	override public function update(elapsed:Float)
	{
		super.update(elapsed);

		if (FlxG.keys.justPressed.SPACE)
		{
			FlxG.switchState(new PlayState());
		}
	}
}
  1. Navigate to flixel/graphics/FlxGraphic.hx in your haxelib install folder.
  2. Set a breakpoint at the beginning of the destroy() function. This line.
  3. Run the program, then attempt to switch state.

Expected Behavior

The program should hit the breakpoint twice, then upon continuing the program should continue running.

Actual Behavior

The program hits the breakpoint for the first time, then after clicking continue, it hits the breakpoint a second time and a null object reference exception is thrown, and the program immediately ends.

image

Note that the program does NOT throw an exception if the breakpoint is not placed, and therefore this is an issue with the Visual Studio Code extension and not the program or library.

@EliteMasterEric
Copy link
Author

I see the following output from the program:

hxcpp/debug/jsonrpc/Server.hx:86: Debug Server Started:
Debug server connected!
hxcpp/debug/jsonrpc/Server.hx:592: Connected to vsc debugger server at 127.0.0.1:6972
hxcpp/debug/jsonrpc/VariablesPrinter.hx:244: Critical Error in the debugger thread
hxcpp/debug/jsonrpc/VariablesPrinter.hx:244: Critical Error in the debugger thread

@yuxiaomao
Copy link
Contributor

I think it's a hxcpp debugger's problem? https://github.com/vshaxe/hxcpp-debugger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants