Hi,
I finally got G-Ware to work flawlessly under wine after some tweaks in the comm.c file. One problem was in the (thread) function COMM_WaitCommEventService(). When I 'disconnect' in the client program it calls purge and sets the event mask to 0 (ie. it is no longer interested in events from the port). But there are still threads running that poll the port.
The program crashes when the thread exits the loop (with abort!=0) and tries to set *commio->buffer = rc; (line 2010) but this buffer is already freed by the client. Replacing
if (abort) rc = 0; *commio->buffer = rc;
by
if (!abort) *commio->buffer = rc;
fixes this problem.
There were other communication errors which I managed to fix but I have to find out first which changes are really necessary to make things work because I tried a lot of things in comm.c. It looks as if there are race conditions when more than one polling thread is running. Currently I check if a thread is already running and don't start a second one if so. But I will find out if that is responsible for the errors or something else and report it on the list.
Cheers, Cihan