bohonghuang / cl-gtk4

GTK4/Libadwaita/WebKit2 bindings for Common Lisp.
GNU Lesser General Public License v3.0
216 stars 9 forks source link

FLOATING-POINT-INVALID-OPERATION #51

Open Filipp-Druan opened 11 months ago

Filipp-Druan commented 11 months ago

After a lot of tinkering with CL-GTK4, running and restarting examples frequently, the FLOATING-POINT-INVALID-OPERATION error started appearing. I don't understand why this happens. Both applications that I load via C-c C-c and built-in examples are affected by this error, although everything was working before.

I rebooted REPL and it went away on its own. Although last time, as I remember, rebooting REPL didn't help.

It seems the same error occurred some time after I ran the example I wrote.

bohonghuang commented 11 months ago

See #30.

Filipp-Druan commented 11 months ago

See #30.

Tell me, is there any way to make a collective complaint to the SBCL developers? I know another FFI library that has the same error. https://github.com/lispnik/iup#hello-world

bohonghuang commented 11 months ago

You can directly report SBCL bugs by sending an email to sbcl-bugs@lists.sourceforge.net. But I don't consider this to be a serious issue, and I believe the SBCL developers may also share the same opinion because this error is essentially caused by SBCL's default use of strict floating-point mode and its trapping of the Unix SIGFPE signal. You can try adding (sb-int:set-floating-point-modes :traps nil) to the startup file of SBCL to attempt to avoid this issue.

Filipp-Druan commented 11 months ago

You can directly report SBCL bugs by sending an email to sbcl-bugs@lists.sourceforge.net. But I don't consider this to be a serious issue, and I believe the SBCL developers may also share the same opinion because this error is essentially caused by SBCL's default use of strict floating-point mode and its trapping of the Unix SIGFPE signal. You can try adding (sb-int:set-floating-point-modes :traps nil) to the startup file of SBCL to attempt to avoid this issue.

Can you sign this letter with me?

bohonghuang commented 11 months ago

I personally don't believe that this is a critical issue. In Lisp implementation, actively returning such errors can contribute to enhancing the robustness of our programs during development. We can easily choose to ignore these errors in a production environment with SBCL. Nevertheless, I encourage you to proceed with sharing your feedback directly with the SBCL developers, as they may be willing to listen to your opinions, or they may provide a more professional response from the perspective of the Lisp implementation.