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

SIGSEGV after swift build #54

Closed
gavr123456789 opened this issue Aug 3, 2021 · 5 comments
Closed

SIGSEGV after swift build #54

gavr123456789 opened this issue Aug 3, 2021 · 5 comments

Comments

@gavr123456789
Copy link

System: arch linux

swift --version
Swift version 5.4 (swift-5.4-RELEASE)
Target: x86_64-unknown-linux-gnu

Here full video from the start

Peek.2021-08-03.21-50.mp4

Here text error by language server if it helps:

[Error - 21:51:47] Request textDocument/colorPresentation failed.
Error: Connection got disposed.
	at Object.dispose (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
	at Object.dispose (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/common/client.js:73:35)
	at LanguageClient.handleConnectionClosed (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/common/client.js:2424:42)
	at LanguageClient.handleConnectionClosed (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/node/main.js:155:15)
	at closeHandler (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/common/client.js:2411:18)
	at CallbackList.invoke (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at closeHandler (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/connection.js:256:26)
	at CallbackList.invoke (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at StreamMessageReader.fireClose (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js:40:27)
	at Socket.<anonymous> (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js:125:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 21:51:47] Request textDocument/foldingRange failed.
Error: Connection got disposed.
	at Object.dispose (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
	at Object.dispose (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/common/client.js:73:35)
	at LanguageClient.handleConnectionClosed (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/common/client.js:2424:42)
	at LanguageClient.handleConnectionClosed (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/node/main.js:155:15)
	at closeHandler (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-languageclient/lib/common/client.js:2411:18)
	at CallbackList.invoke (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at closeHandler (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/connection.js:256:26)
	at CallbackList.invoke (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at StreamMessageReader.fireClose (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js:40:27)
	at Socket.<anonymous> (/home/gavr/.vscode/extensions/vknabel.vscode-swift-development-environment-2.12.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js:125:42)
	at Socket.emit (events.js:327:22)
	at Pipe.<anonymous> (net.js:673:12)
@mikolasstuchlik
Copy link
Contributor

Hi.

There is a bug in the SPM that makes it crash when there are circular dependencies in the .pc files.

The Arch has such circular dependency.

The fix in the SPM is on the way in the Swift 5.5, so try using the development toolchain. The alternative solution is removing the circular dependency in the .pc files by hand.

The issue was originally discussed in this issue: #43 .

@gavr123456789
Copy link
Author

Okey, thanks for explanation, will wait 5.5 then

@gavr123456789
Copy link
Author

gavr123456789 commented Nov 29, 2021

hello again, maybe I waited too long, for now I can compile GTK3 Hello world example successfully, but with SwiftGtkListViewDemo-gtk4 I have fatalError on compiling Gtk-4 Calendar-Dialog.

/home/gavr/Projects/Swift/SwiftGtkListViewDemo-gtk4/.build/checkouts/SwiftGtk/Sources/Gtk/Gtk-4.0-BookmarkList-CClosureExpression.swift:5061:28: warning: extraneous duplicate parameter name; 'iconName' already has an argument label
    @inlinable public init(iconName iconName: UnsafePointer<CChar>? = nil) {
                           ^~~~~~~~~
                           
/home/gavr/Projects/Swift/SwiftGtkListViewDemo-gtk4/.build/checkouts/SwiftGtk/Sources/Gtk/Gtk-4.0-BookmarkList-CClosureExpression.swift:5091:43: warning: extraneous duplicate parameter name; 'iconName' already has an argument label
    @inlinable public static func newFrom(iconName iconName: UnsafePointer<CChar>? = nil) -> Widget! {
                                          ^~~~~~~~~
                                          
[31/34] Compiling Gtk Gtk-4.0-Calendar-Dialog.swift
error: fatalError

this is error after swift run, the ./run-gir2swift.sh and swift build was done.

@mikolasstuchlik
Copy link
Contributor

I was not able to look into it yet. Just letting you know I didn't forget about it.

@rhx
Copy link
Owner

rhx commented Jan 15, 2022

hello again, maybe I waited too long, for now I can compile GTK3 Hello world example successfully, but with SwiftGtkListViewDemo-gtk4 I have fatalError on compiling Gtk-4 Calendar-Dialog.

Can you try again and let me know? I fixed a gtk4 linker issue last week that caused problems on Linux.

@rhx rhx closed this as completed May 9, 2022
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

3 participants