Graham - 2020-01-17

I recompiled fluxbox with DEBUG enabled and ran it under valgrind. The valgrind output is attached. There are potentially several bugs here.

Simply starting fluxbox provokes the following:

==35274== Conditional jump or move depends on uninitialised value(s)
==35274==    at 0x1A360B: FluxboxWindow::leaveNotifyEvent(XCrossingEvent&) (Window.cc:2867)
==35274==    by 0x208867: FbTk::EventManager::dispatch(unsigned long, _XEvent&, bool) (EventManager.cc:191)
==35274==    by 0x1C3576: Fluxbox::handleEvent(_XEvent*) (fluxbox.cc:618)
==35274==    by 0x1C3E97: Fluxbox::eventLoop() (fluxbox.cc:541)
==35274==    by 0x140083: main (main.cc:210)
==35274==  Uninitialised value was created by a heap allocation
==35274==    at 0x4838DEF: operator new(unsigned long) (vg_replace_malloc.c:344)
==35274==    by 0x18D09A: BScreen::createWindow(unsigned long) (Screen.cc:1160)
==35274==    by 0x18D6AC: BScreen::initWindows() (Screen.cc:545)
==35274==    by 0x1C7F65: Fluxbox::initScreen(BScreen*) (fluxbox.cc:493)
==35274==    by 0x1CABB7: operator() (stl_function.h:1284)
==35274==    by 0x1CABB7: operator() (binders.h:129)
==35274==    by 0x1CABB7: forAll<std::__cxx11::list<BScreen*>, std::binder1st<std::mem_fun1_t<void, Fluxbox, BScreen*> > > (STLUtil.hh:78)
==35274==    by 0x1CABB7: Fluxbox::Fluxbox(int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (fluxbox.cc:448)
==35274==    by 0x13FF95: main (main.cc:208)
==35274==

The remaining memory errors were obtained by clicking the "Toolbar on Head" menu configuration options between "Head 1", "Head 2" and "All Heads". (in no particular order, but I probably clicked each a couple of times )