Just a small update with the things I tried today:

As I wrote earlier, there are a lot of "proc_mode = (...)" instructions in my source. I suspected that some of these might have lead to my Win 10 issues. So I went over and removed *any* of these instructions, with three exceptions:

1. A _startup function that handles pause state and visibility of some related UI elements in a while loop.
2. A _startup function that handles controls. In fact, it recognizes key presses and sets values of variables accordingly, for other functions to evaluate.
3. And finally, a function that handles mouse control.

As these contain important control features that need to run during pause, I simply kept the proc_mode = PROC_NOFREEZE inside their while loops (that's correct, isn't it? we should put proc_mode calls directly into a loop, right?).

Now, some engine-error messages I had before, are seemingly gone. Haven't tested this thouroughly, but it could be that it fixed some other bugs. Nice.

But the Crash bug itself, with that "acknex.exe has stopped working" message - it's still present! And I can reproduce it by starting up the game, beginning a new game from the main menu, then the level loads, then I press <P>, which activates my pause function, and the game crashes.

So, my next idea was obviously: Then it must be the freeze_mode = 2 call itself. Commented it out, still crashes.

Okay, crazy. Then I started looking for other things that happen when I press <P>. Among other things, the mouse control gets activated. So I went there, copied the mouse control function, tried a few things, reverted them, and basically ended up with *two* instances of my mouse handling function, both exactly the same, except for their name - and I couldn't reproduce the bug anymore.

Here, see for yourself:

Code:
function handle_mouse()
{
	if(MOUSECONTROL_ACTIVE) { return; }
	MOUSECONTROL_ACTIVE=1;
	
	mouse_mode = 1;
	mouse_map = tga_mousemap_gui;	
	mouse_pointer = 0;

	var _button_pressed=1;

	while(1)
	{
		proc_mode = PROC_NOFREEZE;
		
		if(MOUSECONTROL_ENABLED)
		{
			if(mouse_mode > 0) // move it over the screen
			{  
				if(mouse_moving) 
				{
					vec_set(mouse_pos,mouse_cursor);
				}
				
				if(mouse_valid) // inside engine window?
				{
					// enable keyboard/gamepad controls
					if(inp_force.x != 0 || inp_force.z != 0)
					{
						mouse_pos.x+=(inp_force.x*MOUSECONTROL_JOYSPEEDFACTOR)*time_step;
						mouse_pos.y-=(inp_force.z*MOUSECONTROL_JOYSPEEDFACTOR)*time_step;
					}
				}
			}
			else
			{
				mouse_mode=1;
			}
		}
		else
		{
			mouse_mode=0;
		}
		
		wait(1);
	}
}

function handle_mouse_old()
{
	if(MOUSECONTROL_ACTIVE) { return; }
	MOUSECONTROL_ACTIVE=1;
	
	mouse_mode = 1;
	mouse_map = tga_mousemap_gui;	
	mouse_pointer = 0;

	var _button_pressed=1;

	while(1)
	{
		proc_mode = PROC_NOFREEZE;
		
//		if(GAME_MODE==0 || freeze_mode==2)
		if(MOUSECONTROL_ENABLED)
		{
			if(mouse_mode > 0) // move it over the screen
			{  
				if(mouse_moving) 
				{
					vec_set(mouse_pos,mouse_cursor);
				}
				
				if(mouse_valid) // inside engine window?
				{
					// enable keyboard/gamepad controls
					if(inp_force.x != 0 || inp_force.z != 0)
					{
						mouse_pos.x+=(inp_force.x*MOUSECONTROL_JOYSPEEDFACTOR)*time_step;
						mouse_pos.y-=(inp_force.z*MOUSECONTROL_JOYSPEEDFACTOR)*time_step;
					}
					
/*
					// commented out, just to see if there's a problem with this...
					if(inp_button1)
					{
						if(!_button_pressed)
						{
							mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE, 0, 0, 0, 0);
							_button_pressed=1;
						}
					}
					
					if(!inp_button1) 
					{
						if(_button_pressed)
						{
							mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE, 0, 0, 0, 0);
							_button_pressed=0;
						}
					}
*/
				}
			}
			else
			{
				mouse_mode=1;
			}
		}
		else
		{
			mouse_mode=0;
		}
		
		wait(1);
	}
}



Doesn't make ANY sense at all, I know, but that's the current state. It strikingly reminds me of the problem I described under B) in my initial post, and I simply don't get what is going on here.

This is really driving me insane. With this bug I'm looking for the needle in the haystack. I can't even tell what to do with this finding - does this indicate something? I mean, it would really help if at least I could pinpoint it to something like "oh, there must be a pointer I'm using the wrong way" or maybe a broken resource file or something, but I only have this immensely strange behaviour and don't even know why it occurs.

Any hints? JCL?

Last edited by Turrican; 02/26/18 13:52. Reason: Inserted a comment-block to second mouse function to really depict the current state of the function