Arithmetic Error Floating-point-inexact Signalled
Support Search GitHub This repository Watch 20 Star 91 Fork 33 lispgames/cl-sdl2 Code Issues 14 Pull requests 1 Projects 0 Wiki Pulse Graphs New issue Unable to see the window when running basic example from SLIME #23 Open sonelliot opened this Issue Jun 5, 2014 · 16 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 6 participants sonelliot commented Jun 5, 2014 If I run (sdl2-examples:basic-test) from within SLIME then I don't see any window and the REPL hangs forever. Subsequently aborting the thread seems to leave it in a broken state and I need to kill SBCL and restart it from scratch. But if I run it from the command line using the SBCL executable then it works fine. I am using SBCL 1.1.12 (x86) on Windows 8. Any help would be appreciated. I have been banging my head on this issue for a while and I really hope it isn't just something stupid I'm doing! 😠lispgames member rpav commented Jun 5, 2014 Yeah Windows (and OSX, really) throw a monkey in the wrench... the initial thread is magical and you must run GUI things from it. If you use CCL this is less of an issue, because CCL has a safe way to interrupt a thread and run a function... SBCL does not. cl-sdl2 doesn't have a way to make this all invisible yet, but it does have enough you should be able to make it work... the basic idea is this: (bt:make-thread (lambda () (swank:create-server :port 4005 :dont-close t))) (sdl2:make-this-thread-main (lambda () (sdl2.kit:start))) This must be run from the initial thread, so run this from a shell and not as an inferior-lisp, and then M-x slime-connect, if you're not already. The second bit assumes you're using sdl2kit, but you can replace the call with your own initialization and main loop. Note that SDL2:MAKE-THIS-THREAD-MAIN does not do sdl2:init (but sdl2kit does, if you use that). Also I haven't actually tested this precise code, but I have tested make-this-thread-main and gotten cl-sdl2 working in both Windows and OSX with SBCL. This will cause your repl to "hang": you're running a function in that thread that's not going to return. Thus interaction must be through SLIME. o-simon commented Jun 6, 2014 I think my issue is related. I'm using OS X 10.9.3, SBCL 1.2.0. From Emacs/Slime I get a window with a red triangle, but the window doesn't respond. I tried your instructions. In the shell I started sbcl and tried as follows: (load "~/quicklisp/setup.lisp") (ql:quickload "sdl2") (ql:quickload "sdl2-examples"
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 https://github.com/lispgames/cl-sdl2/issues/23 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up install lispbuilder-sdl on Mac OS X up vote 0 down vote favorite anyone develop common lisp games on Mac OS X? Recently, I want to set up a lisp games development on Mac OS X. But I get http://stackoverflow.com/questions/36806167/install-lispbuilder-sdl-on-mac-os-x stuck. Operating System version: ProductName: Mac OS X ProductVersion: 10.11.4 BuildVersion: 15E65 sbcl version: SBCL 1.3.3 I find the Github repository page: https://github.com/lispbuilder/lispbuilder/wiki/DownloadInstallation and follow the OS X installation part. I tried to install Runtime Libraries of SDL 1.2 and Runtime Binaries as well as Development Libraries of SDL 2.0. It behaves as the following: when I run some simple code which runs well on Linux that uses lispbuilder-sdl: (defun draw-a-box-in-window () (sdl:with-init () (let ((width 500) (height 500)) (sdl:window width height) (setf (sdl:frame-rate) 60) (sdl:clear-display (sdl:color :r 127 :g 127 :b 127)) (sdl:draw-box (sdl:rectangle :x (floor (/ width 3)) :y (floor (/ height 3)) :w (floor (/ height 3)) :h (floor (/ height 3))) :color (sdl:color :r 200 :g 200 :b 200)) (sdl:update-display) (sdl:with-events () (:quit-event () t) (:key-down-event () (when (sdl:key-down-p :sdl-key-q) (sdl:push-quit-event))))))) (draw-a-box-in-window) something errors happened: arithmetic error FLOATING-POINT-INEXACT signalled [Condition of type FLOATING-POINT-INEXACT] Restarts: 0: [RETRY] Retry SLIME evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT]
certain floating point traps. It is arithmetic error implementation-dependent whether floating point traps occur, and whether or how they may be enabled or arithmetic error floating-point-inexact disabled. Therefore, conforming code may establish handlers for this condition, but must not depend on its being signaled. The following X3J13 cleanup issue, not part of the specification, applies to this section: FLOATING-POINT-CONDITION-NAMES:X3J13-NOV-89 Copyright 1996, The Harlequin Group Limited. All Rights Reserved.
Importance Assigned to Milestone SBCL Edit New Undecided Unassigned Edit You need to log in to change this bug's status. Affecting: SBCL Filed here by: Cyrus Harmon When: 2012-12-21 Target Distribution Baltix BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance New Undecided Assigned to Nobody Me Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description after building with lichtblau's recent changes (commit 2b29a7c2b236cfab1d4d06311e84414abba71b4c), I see the following when the build reaches the sb-sprof self test: ; SYS:CONTRIB;SB-SPROF;SB-SPROF.FASL.NEWEST written ; compilation finished in 0:00:00.938 * /Users/sly/projects/sbcl/sbcl/src/runtime/sbcl --noinform --core /Users/sly/projects/sbcl/sbcl/output/sbcl.core --lose-on-corruption --disable-debugger --no-sysinit --no-userinit --eval '(load (format nil "SYS:CONTRIB;~:@(~A~);TEST.LISP" "sb-sprof"))' }>: arithmetic error FLOATING-POINT-INEXACT signalled 0: (SB-DEBUG::MAP-BACKTRACE #