Closing the device config dialog causes 64-bit PCem to crash

Support and general discussion.
Post Reply
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Closing the device config dialog causes 64-bit PCem to crash

Post by Battler » Sat 08 Aug, 2015 4:09 pm

For example, click the Configure button next to the video card selection box, and change the VRAM amount. Press OK or Cancel, it doesn't matter. Some time after that dialog closes, 64-bit PCem will crash. 32-bit PCem is not affected.

Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: Closing the device config dialog causes 64-bit PCem to c

Post by Battler » Sat 08 Aug, 2015 10:34 pm

Found a fix.

In win-deviceconfig.c, in deviceconfig_open(), find:

Code: Select all

uint16_t *data = malloc(16384);
After this, add:

Code: Select all

uint16_t *data_ = data;
Then, find:

Code: Select all

free(data);
Change to:

Code: Select all

free(data_);
It will then no longer crash.

User avatar
SarahWalker
Site Admin
Posts: 1571
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Closing the device config dialog causes 64-bit PCem to c

Post by SarahWalker » Sun 09 Aug, 2015 9:11 am

Committed a variation of that to rev 294.

Post Reply