Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7742417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:16:13+00:00 2026-06-01T09:16:13+00:00

I’m checking my code for memory leaks. Everything is okay until I got the

  • 0

I’m checking my code for memory leaks. Everything is okay until I got the code:

mSystem = new LightSystem();
sf::View *view = th::DisplayManager::Get()->GetCamera();
mSystem->SetView(*view);

SetView does really tiny job (extracts a few members of passed view pointer. When latest code line is commented everything is okay, but uncommenting everything works in default mode and fails in memory leak detection with valgrind (valgrind --tool=memcheck ./Binary).

==23703== Use of uninitialised value of size 8
==23703==    at 0x6B8472: ltbl::LightSystem::SetView(sf::View const&) (LightSystem.cpp:55)
==23703==    by 0x6A7A7D: th::LightManager::Initialize() (LightManager.cpp:46)
==23703==    by 0x6A75EA: th::Root::Initialize() (Root.cpp:101)
==23703==    by 0x6A7113: th::Root::Root() (Root.cpp:66)
==23703==    by 0x6A7553: th::Root::Get() (Root.cpp:88)
==23703==    by 0x6291A8: th::Game::Initialize() (Game.cpp:36)
==23703==    by 0x61DC1C: main (main.cpp:82)
==23703== 
==23703== Invalid read of size 8
==23703==    at 0x6B8472: ltbl::LightSystem::SetView(sf::View const&) (LightSystem.cpp:55)
==23703==    by 0x6A7A7D: th::LightManager::Initialize() (LightManager.cpp:46)
==23703==    by 0x6A75EA: th::Root::Initialize() (Root.cpp:101)
==23703==    by 0x6A7113: th::Root::Root() (Root.cpp:66)
==23703==    by 0x6A7553: th::Root::Get() (Root.cpp:88)
==23703==    by 0x6291A8: th::Game::Initialize() (Game.cpp:36)
==23703==    by 0x61DC1C: main (main.cpp:82)
==23703==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==23703== 
==23703== 
==23703== Process terminating with default action of signal 11 (SIGSEGV)
==23703==  Access not within mapped region at address 0x8
==23703==    at 0x6B8472: ltbl::LightSystem::SetView(sf::View const&) (LightSystem.cpp:55)
==23703==    by 0x6A7A7D: th::LightManager::Initialize() (LightManager.cpp:46)
==23703==    by 0x6A75EA: th::Root::Initialize() (Root.cpp:101)
==23703==    by 0x6A7113: th::Root::Root() (Root.cpp:66)
==23703==    by 0x6A7553: th::Root::Get() (Root.cpp:88)
==23703==    by 0x6291A8: th::Game::Initialize() (Game.cpp:36)
==23703==    by 0x61DC1C: main (main.cpp:82)
==23703==  If you believe this happened as a result of a stack
==23703==  overflow in your program's main thread (unlikely but
==23703==  possible), you can try to increase the size of the
==23703==  main thread stack using the --main-stacksize= flag.
==23703==  The main thread stack size used in this run was 8388608.

The questions are: why does it works successfully without valgrind and breaks with it.
I have also tried to set --main-stacksize= a big value but it didn’t help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:16:15+00:00Added an answer on June 1, 2026 at 9:16 am
    ==23703== Process terminating with default action of signal 11 (SIGSEGV)
    ==23703==  Access not within mapped region at address 0x8
    

    At some point (probably LightSystem.cpp:55) you’re dereferencing a pointer to which you assigned 8 which looks nothing like a valid address.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
i got an object with contents of html markup in it, for example: string
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.