Make program resilient to non-existent default module #4

Closed
opened 2022-12-03 21:33:27 +00:00 by paladin1 · 1 comment
Owner

In the event the user has no default module installed and no pages in the config file, the program segfaults. Example backtrace where default module is "FOO":

(gdb) bt
#0 sword::SWModule::getDescription (this=0x0) at ../src/modules/swmodule.cpp:210
#1 0x0000000000404e41 in scabbard::getModDescription (this=0x7fffffffc4f0, modname=0x4e0b90 "FOO")
at scabbard.cpp:187
#2 0x000000000040bf98 in main (argc=1, argv=0x7fffffffda28) at scriptura.cpp:313

In the event the user has no default module installed and no pages in the config file, the program segfaults. Example backtrace where default module is "FOO": (gdb) bt #0 sword::SWModule::getDescription (this=0x0) at ../src/modules/swmodule.cpp:210 #1 0x0000000000404e41 in scabbard::getModDescription (this=0x7fffffffc4f0, modname=0x4e0b90 "FOO") at scabbard.cpp:187 #2 0x000000000040bf98 in main (argc=1, argv=0x7fffffffda28) at scriptura.cpp:313
paladin1 added the
bug
label 2022-12-03 21:33:27 +00:00
paladin1 self-assigned this 2022-12-03 21:33:27 +00:00
Author
Owner
Fixed by [90bb1d499cd7457aee7f0d1c35203421d70687e8](https://tildegit.org/paladin1/scriptura/commit/90bb1d499cd7457aee7f0d1c35203421d70687e8)
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: paladin1/scriptura#4
No description provided.