Jump to content

Crash running custom Console command


photo

Recommended Posts

Posted

Hello,

I have upgraded a bigger project from 2.9 to 2.10 and now I'm experiencing consistent crashs when I'm invoking any custom console command except the last one.

The crash is actually quite easy to reproduce:

1.: Create a dotnet core project

2.: Modify the AppWorldLogic.cs file:

		private void Command1(int argc, string[] argv)
		{
			Log.Message("First command invoked\n");
		}

		private void Command2(int argc, string[] argv)
		{
			Log.Message("Second command invoked\n");
		}

		public override bool Init()
		{
			// Write here code to be called on world initialization: initialize resources for your world scene during the world start.
			Unigine.Console.AddCommand("run_first", "first command", Command1);
			Unigine.Console.AddCommand("run_second", "second command", Command2);

			Engine.GCMode = Engine.GCMODE.EVERY_FRAME;

			return true;
		}

The crash happens when run_first is executed via the Console (run_second was working on my machine).

Changing the Engine.GCMode is needed for reproducing the crash (in my real world application, which eats a lot of memory, I didn't touch the GCMode -  so setting the GCMode to default is unfortunately not an option)

Btw the debugger tells me that the crash is happening in Console::flush() line 1335.

I'm running Windows 10, 1903

Many thanks,

Helmut

  • 2 months later...
Posted

Hello Helmut,

Sorry for an extremely long delay with the answer. We actually addressed this issue in January.

This fix will be included in 2.11 (ETA end of March).

Thank you for the feedback.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...