Crash on start because of g_assert (last_cell >= first_cell)
Affected version
45.0
Bug summary
Gnome calendar is crashing on start because of explicit assert in the code with the following backtrace
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff6cec6df in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff6c9d982 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff6c864ef in __GI_abort () at abort.c:79
#4 0x00007ffff7108fe5 in g_assertion_message (domain=domain@entry=0x5555555bd770 "GcalMonthViewRow",
file=file@entry=0x5555555c3f40 "../src/gui/views/gcal-month-view-row.c", line=line@entry=293,
func=func@entry=0x5555555c8230 <__func__.6.lto_priv.10> "recalculate_layout_blocks",
message=message@entry=0x5555591c8b40 "assertion failed: (last_cell >= first_cell)") at ../glib/gtestutils.c:3497
#5 0x00007ffff716fa2a in g_assertion_message_expr (domain=domain@entry=0x5555555bd770 "GcalMonthViewRow",
file=file@entry=0x5555555c3f40 "../src/gui/views/gcal-month-view-row.c", line=line@entry=293,
func=func@entry=0x5555555c8230 <__func__.6.lto_priv.10> "recalculate_layout_blocks", expr=expr@entry=0x5555555bde4f "last_cell >= first_cell")
at ../glib/gtestutils.c:3523
#6 0x000055555559f5cb in recalculate_layout_blocks (self=<optimized out>) at ../src/gui/views/gcal-month-view-row.c:293
#7 0x000055555559f64d in gcal_month_view_row_add_event (self=<optimized out>, event=<optimized out>)
at ../src/gui/views/gcal-month-view-row.c:724
#8 0x000055555559f818 in gcal_month_view_add_event (subscriber=0x555555a68b10, event=0x7fff240765e0) at ../src/gui/views/gcal-month-view.c:1119
#9 0x000055555558ab3a in add_event_to_subscriber (event=0x7fff240765e0, subscriber=<optimized out>) at ../src/core/gcal-timeline.c:231
#10 timeline_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../src/core/gcal-timeline.c:739
#11 0x00007ffff7142fd4 in g_main_dispatch (context=0x5555556393c0) at ../glib/gmain.c:3476
#12 0x00007ffff719d79f in g_main_context_dispatch_unlocked (context=0x5555556393c0) at ../glib/gmain.c:4284
#13 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x5555556393c0, block=block@entry=1, dispatch=dispatch@entry=1,
self=<optimized out>) at ../glib/gmain.c:4349
#14 0x00007ffff714123c in g_main_context_iteration (context=context@entry=0x5555556393c0, may_block=may_block@entry=1) at ../glib/gmain.c:4414
#15 0x00007ffff730e59d in g_application_run (application=application@entry=0x55555562ded0, argc=argc@entry=1, argv=argv@entry=0x7fffffffd6f8)
at ../gio/gapplication.c:2577
#16 0x0000555555576606 in main (argc=1, argv=0x7fffffffd6f8) at ../src/main.c:39
Bellow are values of last_cell and first cell
(gdb) fr 6
#6 0x000055555559f5cb in recalculate_layout_blocks (self=<optimized out>) at ../src/gui/views/gcal-month-view-row.c:293
293 g_assert (last_cell >= first_cell);
(gdb) p last_cell
$1 = 6
(gdb) p first_cell
$2 = 7
Steps to reproduce
Unfortunately, I couldn't provide consistent way to reproduce this problem.