- Status Closed
- Percent Complete
- Task Type Bug Report
- Category
-
Assigned To
Roland Schulz - Operating System
- Severity Low
- Priority
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by Kenneth Graunke - 29.08.2008
Last edited by Steven Schwartfeger - 16.09.2008
FS#2185 - Shadow manager loading doesn't correctly initialize stuff
On client startup, shadowsEnabled is read before it’s initialized. This is clearly wrong.
==16593== Conditional jump or move depends on uninitialised value(s)
==16593== at 0x4BFD2B: psShadowManager::RecreateAllShadows() (shadowmanager.cpp:185)
==16593== by 0x4C0752: psShadowManager::EnableShadows() (shadowmanager.h:55)
==16593== by 0x4C0243: psShadowManager::Load(char const*) (shadowmanager.cpp:128)
==16593== by 0x4C049F: psShadowManager::psShadowManager() (shadowmanager.cpp:67)
==16593== by 0x48D6D2: psCelClient::Initialize(iObjectRegistry*, MsgHandler*, ZoneHandler*) (pscelclient.cpp:146)
==16593== by 0x43CCD4: psEngine::Initialize(int) (psengine.cpp:570)
==16593== by 0x50B6B4: pawsSplashWindow::Draw() (pawssplashwindow.cpp:63)
==16593== by 0x686D2F: pawsWidget::DrawChildren() (pawswidget.cpp:1221)
==16593== by 0x4C6A1A: psMainWidget::DrawChildren() (psmainwidget.cpp:524)
==16593== by 0x6383AF: PawsManager::Draw() (pawsmanager.cpp:606)
==16593== by 0x437C14: psEngine::HandleEvent(iEvent&) (psengine.cpp:867)
==16593== by 0x44BB06: psEngine::EventHandler::HandleEvent(iEvent&) (psengine.h:228)
16.09.2008 07:32
Reason for closing:
Additional comments about closing:
Seems the second one was used. Always
use class initialisation lists, is what
I say ;)
this should fix the problem [updated]
http://pastebin.ca/1188478
I've also remove the call to RecreateAllShadows() from Load() which was a superfluous call
but there is still a case when the variable will be uninitialized (it will affect the shadow configuration not the shadowmanager): when the default setting file is missing. This other patch sets a default value in case that file is missing… but having an hardcoded value doesn't make the default settings useless per default? (this question made me do two patch).
This second one initialized the variable to true if the default settings file wasn't found
http://pastebin.ca/1188479
Setting to patch included.
committed to trunk, r2159