Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating point exception on Centos 8 compile #39

Open
progfrosty opened this issue Apr 1, 2020 · 4 comments
Open

Floating point exception on Centos 8 compile #39

progfrosty opened this issue Apr 1, 2020 · 4 comments

Comments

@progfrosty
Copy link

I've compiled microwindows for Centos 8, with all standard libraries.

I've selected NANO-X to be compiled as well as the other libraries.

I set LINK_APP_INTO_SERVER = Y

Compiles fine, but on running any demo I see the window open briefly and then the message

Floating point exception (core dumped).

If I set LINK_APP_INTO_SERVER = N

the compile completes, but I get

nxclient: bad readblock -1, errno 104
nxclient 15577: Corrupted packet

when I use runapp, eg

./runapp demo-nuklear-demo

@progfrosty
Copy link
Author

Program received signal SIGFPE, Arithmetic exception.
0x00007ffff6d91da1 in X11_getscreeninfo (psd=0x7ffff6fe2500 , psi=0x7fffffffd910)
at /home/progfrosty/microwindows/src/drivers/scr_x11.c:598
598 psi->xdpcm = (DisplayWidth(x11_dpy, x11_scr) * 10) / DisplayWidthMM(x11_dpy, x11_scr);

@ghaerr
Copy link
Owner

ghaerr commented Apr 1, 2020

598 psi->xdpcm = (DisplayWidth(x11_dpy, x11_scr) * 10) / DisplayWidthMM(x11_dpy, x11_scr);

Shouldn't be any floating point for the exception, so I'm guessing divide by zero? Replace the above line with 'psi->xdpcm = 800;' (for 800 x 600) and lets see what happens.

@ghaerr
Copy link
Owner

ghaerr commented Apr 1, 2020

It sounds like something is amiss with X11... there were some changes made, which I thought I fixed, that got the X11 headers in src/nx11/X11-local/X11 mixed up with the host X11 headers, which are usually in /usr/X11/include. I'm guessing that your host X11 is updated and not compatible with the older X11R6 headers used for the NX11 library.

Check your 'config' file, you should be using one close to Configs/config.linux-X11, and make sure that the X11HDRLOCATION= line is properly filled out.

@progfrosty
Copy link
Author

The X11HDR and lib location are correct as far as I can see :)

If I force the xdpcm and ydpcm to 800 and 600, it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants