Scilab engine event handler crash

JP Teyssier j-pierre.teyssier at brive.unilim.fr
Thu Oct 7 21:52:36 CEST 2010


Dear users group,
I'm running the following C code (Scilab 5.2.2, Windows XP SP3 32 bits)

#include <stdio.h>
#include <stdlib.h>
#include "call_scilab.h"

void main(void)
{
	printf("Hello world\n");

	printf("Init Scilab layer\n");
	DisableInteractiveMode();
	if (StartScilab(NULL,NULL,NULL) == FALSE)
		printf("Error while calling StartScilab\n");
	else
		printf("StartScilab OK\n");

	getchar();

	if (TerminateScilab(NULL) == FALSE)
		printf("Error while calling TerminateScilab\n");

	return;
}

If I send the event CTRL_CLOSE_EVENT (clic close red cross at right top)
to that program when it is waiting (getchar()), I generate a windows error
(Windows cannot terminate this program).

Does anybody knows how to solve/avoid that issue?

Best regards,
Jean-Pierre Teyssier
XLIM University of Limoges




More information about the users mailing list