lfos / calcurse

A text-based calendar and scheduling application
https://calcurse.org
BSD 2-Clause "Simplified" License
963 stars 95 forks source link

Segfault on small terminal window #455

Open avidseeker opened 1 year ago

avidseeker commented 1 year ago

Bug description. calcurse crashes on small terminal windows.

Reproduce.

  1. $ calcurse <enter>
  2. Resize terminal window so that it's smaller than sidebar area.

Expected Behavior.

Print message like: "screen is too small to display", like pacman.

Screenshots.

zsh: segmentation fault (core dumped)  calcurse

Version: calcurse 4.8.0-2

lfos commented 1 year ago

Thanks for the bug report. Are you able to share your calcurse config and more detailed steps to reproduce (e.g., does this always happen, are you resizing in a specific way)? I am unable to reproduce the behavior.

avidseeker commented 1 year ago
ninedotnine commented 1 year ago

Same bug here. Specifically, if the width of the window is smaller than the width of the two right panels, it segfaults. The window does not need to be resized for this to happen; if the width is too small when calcurse is run then it will immediately segfault.

v 4.8.0. Also my system language is French, if that changes anything. My conf:

appearance.calendarview=monthly
appearance.compactpanels=yes
appearance.defaultpanel=calendar
appearance.layout=1
appearance.headerline=yes
appearance.eventseparator=yes
appearance.dayseparator=no
appearance.emptyline=yes
appearance.emptyday=--
appearance.notifybar=yes
appearance.sidebarwidth=37
appearance.theme=yellow on default
appearance.todoview=show-completed
appearance.headingpos=right-justified
daemon.enable=no
daemon.log=no
format.inputdate=2
format.notifydate=%a %F
format.notifytime=%T
format.appointmenttime=%H:%M
format.outputdate=%D
format.dayheading=%e %B
general.autogc=no
general.autosave=yes
general.confirmdelete=yes
general.confirmquit=no
general.firstdayofweek=monday
general.multipledays=yes
general.periodicsave=0
general.systemevents=yes
notification.command=printf '\a'
notification.notifyall=flagged-only
notification.warning=300