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 »

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 »

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: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

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

Post by SarahWalker »

Committed a variation of that to rev 294.
Post Reply