Skip to content

Segfault when linking Scale widget with Entry #161

@timholy

Description

@timholy

If I move the scale slowly, this works as intended. However, quick movement---or any movement, if I delete the @schedule---causes a segfault for me:

using Gtk.ShortNames

e = @Entry()
sc = @Scale(false, 1:10)
hbox = @Box(:v)
win = @Window(hbox, "Segfault")
push!(hbox, e)
push!(hbox, sc)

signal_connect(sc, "value-changed") do widget
    println("value-changed")
    adj = @Adjustment(sc)
    val = getproperty(adj, :value, Int)
    @schedule setproperty!(e, :text, string(val))
end

showall(win)

I also get the segfault if I use G_.value(sc) rather than getproperty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions