FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Pages: 1 [2]

Author Topic: bad_alloc / access violation reading location  (Read 7376 times)

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: bad_alloc / access violation reading location
« Reply #15 on: April 14, 2010, 07:45:59 am »

Interesting find!!

I tested the tutorials on a fresh install of fife on my laptop and noticed the same errors with the static lib you encountered in both Release and Debug modes. I am in the process of trying to figure out what is happening, but I will definitely try your patch against the DLL and static versions of fife.

I need to double check this but on my desktop I was running the tutorials against a statically build FIFE lib just fine. I will try a fresh checkout there are well to see if I can reproduce the problem.

These are certainly interesting problems and hopefully we can get them all knocked out soon.
Logged

noobpeek

  • Newbie
  • Posts: 15
    • View Profile
Re: bad_alloc / access violation reading location
« Reply #16 on: April 16, 2010, 01:11:18 am »

Hi vtchill!

I managed to get your tutorial working on the static built! It is mainly a problem with the definition of the tutorial's shrine.xml.

Instead of referencing the cameras as "main" and "small", the xml named them as "shrine_main" and "shrine_small". Is the code supposed to be able to filter these names out as well? I have not looked into your code in detail, but after tweaking the xml file, I got the program working.

Another "bug" in the tutorial is the returning of true in the loop of the Game.run(). Thus, it could only make one cycle and left the program. Commenting out the "return true" statement from the while loop does the trick.

The last issue is the same cleaning up of SDL memory issue. Can be solved when replaced the create mouse code with mine (which I posted earlier on).

Thanks so much! Working fine now..

I shall try and port your code over to the dynamic library and see how it fares.. Will post the results here!

Thanks!
Logged

noobpeek

  • Newbie
  • Posts: 15
    • View Profile
Re: bad_alloc / access violation reading location
« Reply #17 on: April 16, 2010, 01:11:59 am »

Oh. Forgot to add. That is only solved for Release versions.

Debug versions still have those push_back memory problems..  ???
Logged

noobpeek

  • Newbie
  • Posts: 15
    • View Profile
Re: bad_alloc / access violation reading location
« Reply #18 on: April 16, 2010, 02:03:46 am »

Hey vtchil!

I have succeeded in making the tutorial run on the dynamic loading version. With the patches of SDL memory and the small changes in the tutorial which I mentioned, the program could run and end properly in the RELEASE version.

 ;D
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: bad_alloc / access violation reading location
« Reply #19 on: April 16, 2010, 08:14:45 am »

great to hear!

I will certainly make the changes you mentioned for the tutorials. I believe I have 2 versions of the map files and I renamed the cameras in one of them but apparently forgot to commit the new map file. The Game::Run() function used to be called differently from main.cpp so that the return true was necessary but now as you said makes the game exit; I will change this as well.

If you want to write up a bug report about the SDL cursor malloc/free problem and submit a patch to that bug it would be helpful so we could track it in our bug system. I can also do this if you prefer, but I figured I would give you the chance since you put a lot of effort into finding the problem.

a wiki page about how to file a bug is here: http://wiki.fifengine.net/Bug_Report
the new bug form can be found here: http://fife.trac.cvsdude.com/engine/newticket

You can also search in the existing bugs to see if someone has already mentioned this problem.

Thanks for the feedback and nice job getting it to work with static and dynamic libs!
Logged
Pages: 1 [2]