DCPUTeam / DCPUToolchain

[ARCHIVED] The code repository for the DCPU-16 Toolchain.
http://dcputoolcha.in/
MIT License
96 stars 14 forks source link

dtemu crashes (and other nasty things) when pressing Esc #198

Closed Wallbraker closed 11 years ago

Wallbraker commented 11 years ago

I run a simple hello world c program, press F8 to activate radiation and then press Esc, this causes all sorts of weird issues, including segfaults and memory corruption.

Mause commented 11 years ago

Can you provide some information about the system you experienced this on, and the code you were emulating?

Just put the code on a site like http://hastebin.com

Wallbraker commented 11 years ago

Linux 64bit, the important bit is pressing F8 and then Esc, the code was as stated a simple hello world program:

#include <stdio.h>
#include <ext/screen.h>

int main(void)
{
    char buf[30];
    sprintf(buf, "Hello World!");
    eputs(buf, 0, 0);
    sprintf(buf, "Lets print a number %i", 42);
    eputs(buf, 0, 1);
    return 0;
}
patflick commented 11 years ago

yep, confirmed. the same thing happens on my machine.

jdiez17 commented 11 years ago

It probably has to do with the way keyboard events are handled, I'll look into it.

hach-que commented 11 years ago

Is this related to #213?

patflick commented 11 years ago

@hach-que not sure, but with the current version this is fixed