Garbage collection - be sure to mark all contained scm objects - any time you add a new SCM variable to a struct, you need to modify that object type's mark function! Adding a new type? - be sure to call init_TYPE from scwm.c -- search for init_ Using gh_list? - terminate the list with SCM_UNDEFINED, not SCM_EOL Dieing in malloc()? - free-d an already freed pointer; consider setting the pointer to NULL immediately after freeing it Be sure not to use, e.g., menu_p() as a C boolean -- use MENU_P() instead - the object_p() functions return SCM_BOOL_F or SCM_BOOL_T both of which evaluate as true in a C expression. This is also true for the gh_foo_p() functions such as gh_string_p and gh_number_p Creating a scm-level variable with SCWM_VAR_INIT? Be sure to initialize with a scheme and not a C value! e.g,. SCWM_VAR_INIT(scroll_region, "scroll-region", gh_int2scm(2)); When type checking, consider using, e.g., FONT_OR_SYMBOL_P to permit using a symbol when the value is actually used. Then when you want the font, use DYNAMIC_SAFE_FONT(scmFont) to get at the value; also see DEREF_IF_SYMBOL for an abstraction for getting the value of a symbol. See also DYNAMIC_PROCEDURE_P and PROCEDURE_OR_SYMBOL_P Rogue pointer warning? - are you marking something that is not an SCM? -> scm_gc_mark will not complain if passed an integer type because 'typedef long SCM' still Never return SCM_UNDEFINED -- either return SCM_BOOL_F, or SCM_UNSPECIFIED