kitylam9 / moveme

Automatically exported from code.google.com/p/moveme
0 stars 0 forks source link

Crash when movemeDisconnect is called #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Calling movemeDisconnect in the static version of moveclient causes a crash 
inside UpdateMoveState. This is reproducible in VC9 under Windows XP using the 
following code:
    movemeConnect( "192.168.2.3", "7899" );
    Sleep( 1000 );
    movemeDisconnect();

This occurs because UpdateMoveState is calling EnterCriticalSection from 
another thread after movemeDisconnect has deleted the critical section.

Solution: moving DeleteCriticalSection after the call to stopTransfer in 
movemeDisconnect fixes the issue. Please see the attached patch.

Thanks for releasing the library by the way, it's great!

Original issue reported on code.google.com by jam3sward on 17 Nov 2011 at 8:04

Attachments:

GoogleCodeExporter commented 8 years ago
jam3sward,

  Thanks for the patch and sorry for the bug, I've applied this to trunk.

- MT

Original comment by mgtaylor...@gmail.com on 30 Nov 2011 at 8:32

GoogleCodeExporter commented 8 years ago

Original comment by mgtaylor...@gmail.com on 30 Nov 2011 at 8:33