View Issue Details

IDProjectCategoryView StatusLast Update
0017421LazarusWidgetsetpublic2017-04-23 12:31
ReporterJon Lennart AasendenAssigned ToJuha Manninen 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.9.28.2Product Build 
Target VersionFixed in Version 
Summary0017421: dialogs.QuestionDlg crashes Lazarus if you use integer version
Descriptiondialogs.QuestionDlg have a couple of overloaded versions. I tried to use the integer implementation (that takes it's last parameter as an integer rather than a string).

So I called:
dialogs.QuestionDlg('test','more test', mtConfirmation,[mrYes,mrNo],0);

This crashed Lazarus, but before it went down it reported having problems with Button-names.

I opted to use the string version instead, which works fine:
dialogs.QuestionDlg('test','more test', mtConfirmation,[mrYes,mrNo],'');
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetCarbon
Attached Files

Activities

Jon Lennart Aasenden

2010-09-15 11:19

reporter   ~0041098

I think the call is valid, but i havent checked out the syntax for it. Either way, calling a central method with the wrong parameters should result in an exception and not a crash. Better param testing should help make lazarus more stable and enjoyable to the end user.

Juha Manninen

2010-09-15 11:32

developer   ~0041106

Does it happen also with the latest development version, 0.9.29?

Bart Broersma

2010-09-15 13:18

developer   ~0041108

Last edited: 2010-09-15 13:37

QuestionDlg('test','more test', mtConfirmation,[mrYes,mrNo],0)
just works fine in 0.9.29 r26368

Althoug on showing the dialog this appeasr on the console:

(foo:6172): Gtk-CRITICAL **: gtk_widget_get_parent_window: assertion `widget->parent != NULL' failed

(foo:6172): Gtk-CRITICAL **: gtk_widget_get_parent_window: assertion `widget->parent != NULL' failed

Zeljan Rikalo

2010-09-21 08:27

developer   ~0041252

Tested with 0.9.29 r27243 and bug exists. It raises exception "TQuestionDlg.Create: missing Button caption 0."

Bart Broersma

2010-09-21 18:18

developer   ~0041266

OTOH it runs fine with r27368 / fpc 2.4.0 on Suse Linux 10.0 (gtk2-2.8.3-4).

Zeljan Rikalo

2010-09-21 21:37

developer   ~0041269

Sorry I didn't say that problem exists on carbon only.

Alexey Tor.

2017-03-12 21:07

reporter   ~0098846

Last edited: 2017-03-12 21:08

View 2 revisions

Trunk 1.7
OSX 10.8
dialogs.QuestionDlg('test','more test', mtConfirmation,[mrYes,mrNo],0);
works ok, even no exception
with last int=0, or ''.

Solved in the meantime

Juha Manninen

2017-04-23 12:31

developer   ~0099802

Fixed in the meantime. Resolving.

Issue History

Date Modified Username Field Change
2010-09-15 11:14 Jon Lennart Aasenden New Issue
2010-09-15 11:14 Jon Lennart Aasenden Widgetset => Carbon
2010-09-15 11:19 Jon Lennart Aasenden Note Added: 0041098
2010-09-15 11:32 Juha Manninen LazTarget => -
2010-09-15 11:32 Juha Manninen Note Added: 0041106
2010-09-15 11:32 Juha Manninen Status new => feedback
2010-09-15 13:18 Bart Broersma Note Added: 0041108
2010-09-15 13:36 Bart Broersma Note Edited: 0041108
2010-09-15 13:37 Bart Broersma Note Edited: 0041108
2010-09-21 08:27 Zeljan Rikalo Note Added: 0041252
2010-09-21 08:27 Zeljan Rikalo Status feedback => confirmed
2010-09-21 18:18 Bart Broersma Note Added: 0041266
2010-09-21 21:37 Zeljan Rikalo Note Added: 0041269
2010-09-22 23:24 Bart Broersma Category LCL => Widgetset
2010-09-22 23:24 Bart Broersma Description Updated
2017-03-12 21:07 Alexey Tor. Note Added: 0098846
2017-03-12 21:08 Alexey Tor. Note Edited: 0098846 View Revisions
2017-04-23 12:31 Juha Manninen Note Added: 0099802
2017-04-23 12:31 Juha Manninen Status confirmed => resolved
2017-04-23 12:31 Juha Manninen Resolution open => fixed
2017-04-23 12:31 Juha Manninen Assigned To => Juha Manninen