T-Pau / Ready

A Home Computer Emulator for iPad.
Other
57 stars 6 forks source link

Emulator locks up in Simulator on start #4

Closed AndyQ closed 4 years ago

AndyQ commented 4 years ago

Describe the bug So, just installed totally fresh on Simulator (so no disk images). When I clicked on Tools tab, then the Tools button, the emulator started, the C64 start screen appeared but the cursor wasn't flashing and the UI was totally unresponsive.

To Reproduce Launch app on Simulator (I picked iPad Pro 9.7-inch) Click tools tab Click tools button App switches to emulator screen Cursor doesn't flash and whole UI is unresponse

Expected behavior Cursor flashes, keyboard and other buttons work as expected

Possible Fix: Did a little debugging and it something odd appears to be happening in ViceThread.m :: updateBitmapWidth. The async block was not getting called. Oddly, if you set a breakpoint in at the image = [UIImage....] line just above, and then one inside the async block, then both would be called.

However, changing from an async call to a sync call seems to resolve the issue on the Simulator and all is working fine. e.g

dispatch_sync(dispatch_get_main_queue(), ^{
        self.imageView.image = image;
    });
dillof commented 4 years ago

The simulator is not supported, and this change would slow things down on a real device.