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

Would you please tell me how to run the example? #2

Open
faywong opened this issue Jun 27, 2019 · 2 comments
Open

Would you please tell me how to run the example? #2

faywong opened this issue Jun 27, 2019 · 2 comments

Comments

@faywong
Copy link

faywong commented Jun 27, 2019

I run the example with sbcl --script from terminal, I just get this error on Mac OS X:

2019-06-27 10:25:44.068 sbcl[55794:5419150] get 0x0
Unhandled FLOATING-POINT-INVALID-OPERATION in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                        {10005185B3}>:
  arithmetic error FLOATING-POINT-INVALID-OPERATION signalled

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005185B3}>
0: ("bogus stack frame")
1: ("foreign function: -[NSPlaceholderNumber initWithDouble:]")
2: ("foreign function: +[CALayer defaultValueForKey:]")
3: ("foreign function: _ZL23classDescription_lockedP10objc_class")
4: ("foreign function: _ZL23classDescription_lockedP10objc_class")
5: ("foreign function: _ZL23classDescription_lockedP10objc_class")
6: ("foreign function: _ZL16classDescriptionP10objc_class")
7: ("foreign function: _ZN2CA5Layer11class_stateEP10objc_class")
8: ("foreign function: -[CALayer init]")
9: ("foreign function: -[_NSBackingLayer init]")
10: ("foreign function: +[CALayer layer]")
11: ("foreign function: -[NSView(NSInternal) _createLayerAndInitialize]")
12: ("foreign function: -[NSView _updateLayerBackedness]")
13: ("foreign function: -[NSView didChangeValueForKey:]")
14: ("foreign function: __49-[NSThemeFrame _floatTitlebarAndToolbarFromInit:]_block_invoke")
15: ("foreign function: +[NSAnimationContext runAnimationGroup:]")
16: ("foreign function: -[NSThemeFrame _floatTitlebarAndToolbarFromInit:]")
17: ("foreign function: -[NSThemeFrame initWithFrame:styleMask:owner:]")
18: ("foreign function: -[NSWindow _commonInitFrame:styleMask:backing:defer:]")
19: ("foreign function: -[NSWindow _initContent:styleMask:backing:defer:contentView:]")
20: ("foreign function: -[NSWindow initWithContentRect:styleMask:backing:defer:]")
21: ("foreign function: uiNewWindow")
22: (CL-UI.RAW:NEW-WINDOW "libui Control Gallery" 640 480 T)
23: ((:METHOD INITIALIZE-INSTANCE :AFTER (CL-UI:WINDOW)) #<CL-UI:WINDOW {100309B423}>) [fast-method]
24: ((LAMBDA NIL :IN "/Users/somepeople/ui.lisp"))
25: (%MAIN)
26: ((LAMBDA NIL :IN CL-UI::CALL-WITH-UI))

It seems related to the thread model as mentioned in issue, but i don't know how to fix it, Would you please tell me how to run the example?

@faywong
Copy link
Author

faywong commented Jun 27, 2019

After seversal days of googling, I found

(sb-int:set-floating-point-modes :traps nil)

could work around this issue.

@theangelperalta
Copy link

@faywong, Thank you some much! I was having a similar issue with the updates I'm making to CL-Objc.

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