Giter VIP home page Giter VIP logo

Comments (8)

jolby avatar jolby commented on September 27, 2024 1

Hello! I want to thank you for creating this project. I'm interested in trying to see if sbcl + Avalonia GUI can work together. I ran into this floating point error while loading this on both linux/.NET-7.0 and win11/.NET-7. I was able to get the project to load as well as run the tests if I eval'd this form prior to (ql:quickload :bike):
(sb-vm::set-floating-point-modes :traps nil)

This is probably not optimal, but at least it allows forward progress to run this system.

from bike.

rn7s2 avatar rn7s2 commented on September 27, 2024

My SBCL was installed from sbcl-2.2.3-x86-64-windows-binary.msi.

And I got an error while loading:

PS C:\Users\rn7s2> sbcl
This is SBCL 2.2.3, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (ql:quickload :bike)
To load "bike":
  Load 6 ASDF systems:
    alexandria asdf bordeaux-threads cffi trivial-features
    uiop
  Install 7 Quicklisp releases:
    bike cl-ppcre flexi-streams named-readtables
    split-sequence trivial-garbage trivial-gray-streams
; Fetching #<URL "http://beta.quicklisp.org/archive/named-readtables/2022-03-31/named-readtables-20220331-git.tgz">
; 25.99KB
==================================================
26,611 bytes in 0.26 seconds (100.30KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-garbage/2021-12-30/trivial-garbage-20211230-git.tgz">
; 10.74KB
==================================================
10,996 bytes in 0.00 seconds (2637.75KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/split-sequence/2021-05-31/split-sequence-v2.0.1.tgz">
; 11.43KB
==================================================
11,705 bytes in 0.02 seconds (753.11KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-gray-streams/2021-01-24/trivial-gray-streams-20210124-git.tgz">
; 7.86KB
==================================================
8,046 bytes in 0.00 seconds (6414.22KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/flexi-streams/2022-02-20/flexi-streams-20220220-git.tgz">
; 435.47KB
==================================================
445,922 bytes in 1.34 seconds (324.02KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/cl-ppcre/2022-02-20/cl-ppcre-20220220-git.tgz">
; 153.70KB
==================================================
157,392 bytes in 0.93 seconds (164.62KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/bike/2021-10-20/bike-20211020-git.tgz">
; 72.44KB
==================================================
74,178 bytes in 0.64 seconds (112.62KB/sec)
; Loading "bike"
..................................................
[package cl-ppcre]................................
..................................................
[package split-sequence]..........................
[package impl-specific-gray]......................
[package trivial-gray-streams]....................
[package flexi-streams]...........................
..................................................
..................................................
..................................................
[package trivial-garbage].........................
[package editor-hints.named-readtables]...........
[package editor-hints.named-readtables]...........
..................................................
..................................................
.......................
debugger invoked on a DOTNET-ERROR in thread
#<THREAD "main thread" RUNNING {1002338003}>:
  .Net exception System.BadImageFormatException
Could not load file or assembly 'System.IO.Compression.Native, Culture=neutral, PublicKeyToken=null'. The module was expected to contain an assembly manifest.
   at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.Assembly.Load(String assemblyString)
   at lambda_method10(Closure , IntPtr , IntPtr& , Int32& , IntPtr& )

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [TRY-RECOMPILING              ] Recompile assemblies and try loading it again
  1: [RETRY                        ] Retry
                                     loading FASL for #<CL-SOURCE-FILE "bike" "src" "assemblies">.
  2: [ACCEPT                       ] Continue, treating
                                     loading FASL for #<CL-SOURCE-FILE "bike" "src" "assemblies">
                                     as having been successful.
  3:                                 Retry ASDF operation.
  4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  5:                                 Retry ASDF operation.
  6:                                 Retry ASDF operation after resetting the
                                     configuration.
  7: [ABORT                        ] Give up on "bike"
  8: [REGISTER-LOCAL-PROJECTS      ] Register local projects and try again.
  9:                                 Exit debugger, returning to top level.

(%LOAD-ASSEMBLY "System.IO.Compression.Native")
   source: (%TRANSFORM-EXCEPTION (MEM-REF #:EX651 :POINTER))
0]

.Net exception System.BadImageFormatException

So I think I should try to rebuild named-readtables and see what's happening.

from bike.

Lovesan avatar Lovesan commented on September 27, 2024

Maybe this has something to do with .NET 6. I'll take a look at this.

from bike.

Lovesan avatar Lovesan commented on September 27, 2024

@rn7s2 Your issue has been fixed in the latest commit

from bike.

rn7s2 avatar rn7s2 commented on September 27, 2024

Great
Thank you for your quick fix

from bike.

Lovesan avatar Lovesan commented on September 27, 2024

@jolby Thanks! The solution is indeed suboptimal, but at least it works

from bike.

Lovesan avatar Lovesan commented on September 27, 2024

Apparently, there's something going on with NaN on one of the .Net background threads. Maybe inside the GC thread?

The following disables NaN-related exceptions on SBCL:

(sb-vm::set-floating-point-modes :traps (remove :invalid (getf (sb-vm::get-floating-point-modes) :traps)))

On CCL:

(ccl:set-fpu-mode :invalid nil)

Also, there's https://shinmera.github.io/float-features/ library for handling such kind of things.

from bike.

Lovesan avatar Lovesan commented on September 27, 2024

ECL workaround: (ext:trap-fpe 'floating-point-invalid-operation nil)

from bike.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.