Arithmetic error in BasicGUI.cpp

Reporter: desttinghim  |  Status: open  |  Last Modified: October 23, 2016, 01:09:31 PM

int gui_style_create(){
        gui::gui_data_elements.emplace(gui::gui_data_elements_maxid, gui::Style());
    gui::Style &sty = gui::gui_data_elements[gui::gui_data_elements_maxid]; = gui::gui_data_elements_maxid;
    //printf("Creating style with size %i\n", sizeof(gui::gui_data_elements[gui::gui_data_elements_maxid]));
        return gui::gui_data_elements_maxid++;

This piece of code seems to be failing. Specifically, the emplace command is triggering an Arithmetic error. It looks like a modulus is being done, and that is causing a divide by zero error.

 “/tmp/egm1633959076788919710.tmp” terminated by signal SIGFPE (Floating point exception)

This is the error I get when I manually run the compiled code from the command line. This problem appears to happen with every project. I'm not sure what I'm doing wrong.

This is a hashing bug in the BasicGUI extension: #929 (comment)
For now you can disable it by going to game settings->extensions and untick basicGUI


Alright, that worked. Took a little bit to find that. What's the difference between the green puzzle piece extensions and the ones in game settings?


I've always assumed the green puzzle piece was meant to be for GEX extensions but I don't think they were ever implemented, @RobertBColton please correct me if I'm wrong.


Hmm. Maybe the BasicGUI extension should be disabled by default until the problem is resolved, because it's difficult to tell what is going on from within LateralGM. To me, it just looked like my code was not being run until I dug a little deeper.

Please sign in to post comments, or you can view this issue on GitHub.