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!

Author Topic: segmentation fault while deleting instance  (Read 627 times)

conan

  • Newbie
  • Posts: 17
    • View Profile
segmentation fault while deleting instance
« on: November 14, 2015, 09:36:51 pm »

Hi,

I have quite a tricky situation. I get a segfault every time I try to delete an instance on the map, deleting it with layer.removeInstance(instance). I am pretty sure I'm doing instance.removeActionListener() and that there is nothing else depending on it. I also tracked the problem and it doesn't happen exactly when I delete the instance but next time the engine pumps(), so it happens on the C++ side.

I'm going crazy because I can't debug this C++ side. Is there any way to get more information from the engine part, some way to run a debugger or get a more verbose explanations why it segfaults?

Thank you so much!
Logged

conan

  • Newbie
  • Posts: 17
    • View Profile
Re: segmentation fault while deleting instance
« Reply #1 on: November 14, 2015, 10:04:10 pm »

I figured it out!!!!!!!!!!!!!!!!!!!!!!   ;D

It turned out that I had the cellRenderer.addPathVisual() on those instances and of course when the cell renderer wouldn't find them it would go on strike.

Wow, that was lucky. I'm sorry for cluttering the forum with my nagging, but believe me that by the time I decide to ask something it means that I'm in the border of despair. Hopefully my mistakes will be useful for someone in the future.
Logged

Niektory

  • Newbie
  • Posts: 26
    • View Profile
Re: segmentation fault while deleting instance
« Reply #2 on: November 15, 2015, 10:13:22 am »

Yeah, the engine does have some non-obvious traps like this, unfortunately. There's definitely room for better error reporting. Don't worry about posting your woes here, that's what the forum is for. :)
Logged