View Issue Details

IDProjectCategoryView StatusLast Update
0010190LazarusLCLpublic2011-12-01 11:26
ReporterBee JayAssigned ToPaul Ishenin 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.25 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0010190: TCalendar crash when activating dsShowWeekNumbers through OI
DescriptionSteps to produce the bug:
1. Create new application.
2. Place a TCalendar onto form.
3. Activate dsShowWeekNumbers of DisplaySettings property through OI.
4. Run the application.
5. Error window will appear with message: "Project <project_name> raised exception class: External SIGFPE". Other error windows will follow.

The problem also occurs if dsShowWeekNumbers setting is done through code inside form's OnCreate event. But, if it's done inside other events, for example from OnClick of a TButton, it runs fine.
Additional InformationTested on Ubuntu Gutsy on i386 using Lazarus 0.9.25 from SVN with gtk2 widgetset.
Tagsgtk2
Fixed in Revision30018
LazTarget1.2
WidgetsetGTK 2
Attached Files

Relationships

related to 0011136 resolvedZeljan Rikalo TDateEdit.Options.dsStartMon property doesn't work 
related to 0013712 resolvedJuha Manninen TDateEdit: drag event in calendar makes interaction with desktop impossible 
related to 0014059 resolvedJuha Manninen TDateEdit: Main form's focus is lost when dropdown calendar is shown 
related to 0014058 resolvedJuha Manninen TDateEdit: dropdown calendar doesn't close when I click outside it 
related to 0014057 closedVincent Snijders TDateEdit: calendar days overlap 
related to 0014056 closedVincent Snijders TDateEdit calendar crops all available dates 
related to 0008857 resolvedBart Broersma TCalendar on show reset to first day of mounth 
related to 0014060 closedVincent Snijders TDateEdit: left arrow for year is not visible 

Activities

Juha Manninen

2010-12-20 13:49

developer   ~0044429

I collected all GTK2 Calendar related issues under this one.
I debugged to find this crash bug and the dsStartMon bug but there is no obvious error. Nasty!
QT widget calendar works rather well.

Bart Broersma

2011-03-24 15:09

developer   ~0046792

FWIW a backtrace of the crash.
Program contains of 1 form with 1 calandar on it.
In FormCreate only:
  Calendar1.DisplaySettings := [dsShowWeekNumbers];

The cras happens with all settings that change the (internal) size of the calendar (by adding or removing columns/rows etc.)

Starting program: /home/bart/LazarusProjecten/foo
[Thread debugging using libthread_db enabled]
[New Thread 1083227744 (LWP 6885)]
SetWidgetSizeAndPosition Calendar1:TCalendar LCL=l=80,t=24,r=300,b=214 allocation=l=80,t=24,r=300,b=214 086161D8=GtkFrame [VPrNwDb] LCLObject=40949310=Calendar1:TCalendar<Is MainWidget><Is FixedWidget>

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 1083227744 (LWP 6885)]
0x401b39fd in gtk_calendar_get_type () from /opt/gnome/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0 0x401b39fd in gtk_calendar_get_type ()
   from /opt/gnome/lib/libgtk-x11-2.0.so.0
0000001 0x404d9f8b in g_cclosure_marshal_VOID__BOXED ()
   from /opt/gnome/lib/libgobject-2.0.so.0
0000002 0x404cc637 in g_cclosure_new_swap ()
   from /opt/gnome/lib/libgobject-2.0.so.0
0000003 0x404ccd19 in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
0000004 0x404dc447 in g_signal_stop_emission ()
   from /opt/gnome/lib/libgobject-2.0.so.0
0000005 0x404dde80 in g_signal_emit_valist ()
   from /opt/gnome/lib/libgobject-2.0.so.0
0000006 0x404de1f5 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
0000007 0x4037527f in gtk_widget_size_allocate ()
   from /opt/gnome/lib/libgtk-x11-2.0.so.0
0000008 0x4023c85f in gtk_frame_get_shadow_type ()
   from /opt/gnome/lib/libgtk-x11-2.0.so.0
0000009 0x404d9f8b in g_cclosure_marshal_VOID__BOXED ()
   from /opt/gnome/lib/libgobject-2.0.so.0
0000010 0x404cc637 in g_cclosure_new_swap ()
   from /opt/gnome/lib/libgobject-2.0.so.0
0000011 0x404ccd19 in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
0000012 0x404dc447 in g_signal_stop_emission ()
   from /opt/gnome/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
0000013 0x404dde80 in g_signal_emit_valist ()
   from /opt/gnome/lib/libgobject-2.0.so.0
0000014 0x404de1f5 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
0000015 0x4037527f in gtk_widget_size_allocate ()
   from /opt/gnome/lib/libgtk-x11-2.0.so.0
0000016 0x08245ac6 in SETWIDGETSIZEANDPOSITION (LCLCONTROL=0x40949310)
    at gtk2proc.inc:6707
0000017 0x08245657 in RESIZEHANDLE (LCLCONTROL=0x40949310) at gtk2proc.inc:6566
0000018 0x0826f48c in TGTK2WSWINCONTROL__SETBOUNDS (AWINCONTROL=0x40949310,
    ALEFT=80, ATOP=24, AWIDTH=220, AHEIGHT=190, pvmt=0x4122d760)
    at gtk2wscontrols.pp:603
0000019 0x0818ec8d in TWINCONTROL__DOSENDBOUNDSTOINTERFACE (this=0x40949310)
    at ./include/wincontrol.inc:8172
0000020 0x0818eda6 in TWINCONTROL__REALIZEBOUNDS (this=0x40949310)
    at ./include/wincontrol.inc:8218
0000021 0x0818f087 in TWINCONTROL__REALIZEBOUNDSRECURSIVE (this=0x40949310)
    at ./include/wincontrol.inc:8256
0000022 0x0818f074 in TWINCONTROL__REALIZEBOUNDSRECURSIVE (this=0x40948ec0)
    at ./include/wincontrol.inc:8253
0000023 0x08185bcb in TWINCONTROL__DOALLAUTOSIZE (this=0x40948ec0)
    at ./include/wincontrol.inc:3486
0000024 0x08199d83 in TCONTROL__ENABLEAUTOSIZING (this=0x40948ec0)
    at ./include/control.inc:4842

The same crash occurs if you change DisplaySettings in FormShow, but not if you do it in FormAcivate.
B.t.w. None of this happens if you create the control at runtime (in FormCreate).

Paul Ishenin

2011-03-25 11:25

manager   ~0046811

Please test and close if ok.

Issue History

Date Modified Username Field Change
2007-11-16 07:29 Bee Jay New Issue
2007-11-16 07:29 Bee Jay Widgetset => GTK 2
2007-11-30 22:55 Vincent Snijders LazTarget => 1.2
2007-11-30 22:55 Vincent Snijders Status new => acknowledged
2008-04-12 12:42 Felipe Monteiro de Carvalho Tag Attached: gtk2
2008-04-16 16:36 Felipe Monteiro de Carvalho Status acknowledged => confirmed
2010-12-20 13:26 Juha Manninen Relationship added related to 0011136
2010-12-20 13:30 Juha Manninen Relationship added related to 0013712
2010-12-20 13:31 Juha Manninen Relationship added related to 0014059
2010-12-20 13:33 Juha Manninen Relationship added related to 0014058
2010-12-20 13:35 Juha Manninen Relationship added related to 0014057
2010-12-20 13:36 Juha Manninen Relationship added related to 0014056
2010-12-20 13:37 Juha Manninen Relationship added related to 0008857
2010-12-20 13:45 Juha Manninen Relationship added related to 0014060
2010-12-20 13:49 Juha Manninen Note Added: 0044429
2011-03-24 15:09 Bart Broersma Note Added: 0046792
2011-03-25 11:25 Paul Ishenin Fixed in Revision => 30018
2011-03-25 11:25 Paul Ishenin Status confirmed => resolved
2011-03-25 11:25 Paul Ishenin Fixed in Version => 0.9.31 (SVN)
2011-03-25 11:25 Paul Ishenin Resolution open => fixed
2011-03-25 11:25 Paul Ishenin Assigned To => Paul Ishenin
2011-03-25 11:25 Paul Ishenin Note Added: 0046811
2011-12-01 11:26 Marc Weustink Status resolved => closed