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

[BUG] LabelType::Multi causes segmentation fault #519

Closed
crumblingstatue opened this issue Feb 18, 2021 · 2 comments
Closed

[BUG] LabelType::Multi causes segmentation fault #519

crumblingstatue opened this issue Feb 18, 2021 · 2 comments

Comments

@crumblingstatue
Copy link

crumblingstatue commented Feb 18, 2021

Setting the label type of a widget to LabelType::Multi causes segmentation fault.

Here is code to reproduce:

use fltk::{app::*, window::*, frame::*};

fn main() {
	let app = App::default();
	let mut win = Window::default().with_size(400, 400);
	let mut f = Frame::default().with_label("hi").size_of(&win);
	f.set_label_type(LabelType::Multi);
	win.show();
	app.run().unwrap();
}

Expected behavior
I have no idea what Multi label type does, I was just experimenting.

Meta info

  • OS: Arch Linux x86_64
  • FLTK Version 0.14.5
@MoAlyousef
Copy link
Collaborator

MoAlyousef commented Feb 18, 2021

I’ll have to check when I get home.

Are the other label types also causing issues?
A multilabel supports an image and text at the same time.

Edit: the implementation on FLTK’s side appear more involved. It requires an Fl_Multi_Label class, setting the image and text then setting the label. I think I’ll remove it for now until I create a MultiLabel struct and impl.

@MoAlyousef
Copy link
Collaborator

MoAlyousef commented Feb 19, 2021

I have disabled LabelType::Multi in master. To combine an image with text, one can override the WidgetBase::draw call.

Edit: The changes were published in the 0.15 version.

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