Random memory corruption at app quit #134

Closed
Bertram25 opened this Issue Mar 14, 2013 · 9 comments

Comments

Projects
None yet
2 participants
Owner

Bertram25 commented Mar 14, 2013

Hi,

I'm opening this issue to merge the #15 and #74, since they are basically the same.
(See their description if you need more info.)

I set this as low priority, since I'll fix potential causes of it while I see them, but I'm not actively on it, so a commit might reference this issue from time to time. Plus, the bug happens mainly in two cases:

  1. When the lua state is closed, as luabind tries to delete certain objects that are owned by the engine.
  2. When the audio manager tries to free audio sources/files that can't be or because it is already done.

I'll close the two other issues, as they are now duplicates of this one.

Contributor

IkarusDowned commented Mar 18, 2013

there's a problem when you try to exit during state-transitions as well.
For example, when you are transitioning from map to battle mode and exit the game, you will get an error. I was gonna take a look at this sometime "soon"

Owner

Bertram25 commented Mar 18, 2013

There is a "Transition" game mode called, that does draw the before-battle "blurring" animation. That might come from this one. It is located here:
https://github.com/Bertram25/ValyriaTear/blob/master/src/modes/battle/battle.cpp#L1258

Thanks! :)

Owner

Bertram25 commented Mar 26, 2013

cc9818f
Sorry @IkarusDowned , I know you wanted this one but since I saw it, I fixed it.
Hope you don't mind ;)

Contributor

IkarusDowned commented Mar 26, 2013

haha no problem, i hadnt had a chance to look into it yet, might as well
fix it if you knew how!

On Wed, Mar 27, 2013 at 2:53 AM, Yohann Ferreira
notifications@github.comwrote:

cc9818fhttps://github.com/Bertram25/ValyriaTear/commit/cc9818f0ad6fb53347a67f38ed43fc5369cee597
Sorry @IkarusDowned https://github.com/IkarusDowned , I know you wanted
this one but since I saw it, I fixed it.
Hope you don't mind ;)


Reply to this email directly or view it on GitHubhttps://github.com/Bertram25/ValyriaTear/issues/134#issuecomment-15474616
.

Owner

Bertram25 commented Mar 26, 2013

Cool :)

Owner

Bertram25 commented Apr 5, 2013

Since the fix on the battle mode instance initialization, and the globalization of common sound effects, I have been having any such crash anymore. Neat, isn't it? :)

Has someone been having a crash lately?

Owner

Bertram25 commented May 16, 2013

Had this one when opening the save mode (continue option) reapeatedly:
5 0x0000000000bf5676 in std::auto_ptr<vt_video::Color>::~auto_ptr (this=0x1dc8df8, __in_chrg=) at /usr/include/c++/4.7/backward/auto_ptr.h:170
6 0x0000000000bf6dec in luabind::detail::pointer_holderstd::auto_ptr<vt_video::Color, vt_video::Color>::~pointer_holder (this=0x1dc8de0, __in_chrg=)
at /home/yohann/Projets/ValyriaTear/src/luabind/luabind/detail/instance_holder.hpp:79
7 0x0000000000c61ffd in luabind::detail::object_rep::~object_rep (this=0x1dc8d78, __in_chrg=) at /home/yohann/Projets/ValyriaTear/src/luabind/src/object_rep.cpp:47
8 0x0000000000c6221b in luabind::detail::destroy_instance (L=0x104f6a0) at /home/yohann/Projets/ValyriaTear/src/luabind/src/object_rep.cpp:93

Seems the color class is a problem when used as an anonymous constructor in a parameter. I'll check that.

Owner

Bertram25 commented Jun 11, 2013

Hi everyone, (@codergreen, @authenticate, @shirishag75)

Now the problem of anonymous colors parameters is solved as for me, and @logzero and @authenticate fixed certain memleak and other bad practices or warnings, Valyria is more stable than ever.

Thus, if anybody still encounters a crash at app quit with a master build and get a backtrace, can he post it here?

Thanks a lot and best regards,

Owner

Bertram25 commented Jul 1, 2013

Since I saw no memory corruptions at app end in the last two weeks and thanks to authenticate and logzero help on fixing crash causes. I'll close this issue for now.

I you experience new crash, please open a new issue. :)

Thanks a lot!

@Bertram25 Bertram25 closed this Jul 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment