[BUG] object allocation during garbage collection phase

Bug #350498 reported by Nathaniel Sherry
4
Affects Status Importance Assigned to Milestone
OpenFracas
New
Undecided
Unassigned

Bug Description

First reported by Crimer on the OpenFracas forums

./IO/Serialize.rb:165: [BUG] object allocation during garbage collection phase
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
:(

Gentoo system:
ruby 1.8.7_p72
sdl-ruby 2.0.1b
libglade2-ruby 0.16.0

New --> generate, a window appears (not sure which one) for 1sec, then crash.
Open --> selection window appears for 1 sec, then crash.
New --> open , a selection window appears for 1 sec, then crash.

Revision history for this message
Crimer (reini-crimer) wrote :

New -->OK --> the game just computes, and does nothing. It is still responsive.

Revision history for this message
Nathaniel Sherry (nsherry) wrote :

I have created a dummy version of the map preview widget, which containts only stubs for all of the methods. I have lightly tested it, and it seems to not crash when generating a new map (although understandably it doesn't display anything)

Try replacing the MapEdit/simplegameboard.rb file with this one, and see if the bug persists.

The objective of this test is to attempt to determine which library containts the bug. This will test Cairo's Ruby bindings.

Revision history for this message
Crimer (reini-crimer) wrote :

I replaced the file.

Open --> "select Map to Open" window appears. :)
New --> generate, "random map generator" appears. :)
New --> open , "select Map to Open" window appears. :)

New -->OK --> the game just computes, and does nothing. It is still responsive.
New--> Open --> europe.ofmap --> open --> ok --> a window with red and yellow lines appears for 1 sec. then it crashes.

Revision history for this message
Nathaniel Sherry (nsherry) wrote :

Well, it looks like the map preview widget is causing some of the trouble, but not all of it, it would seem.

A few more questions for you, if you don't mind:

* What is the size of the map reported in the 'Generate' window? is it 10x10? If it is, this small default size may be responsible for the crash when you try "New -->OK -->"

* What happens if you try:
New --> Generate --> Generate a 40 x 40 map --> OK --> OK?

* Can you send me several log files? debug.log, error.log and Settings.yaml. They should be found in:
~/$XDG_CONFIG/OpenFracas/ if $XDG_CONFIG is defined
otherwise ~/.config/OpenFracas if ~/.config exists
otherwise ~/.openfracas

Lastly, just to be extra thorough, I'm assuming libcairo itself is also version 1.8 to match the version of the ruby bindings?

Revision history for this message
Crimer (reini-crimer) wrote :

* Size of map in the "Generate" window is 10x10.

* With 40x40 it is the same result as with 10x10.

* The game only crashes when I select a map.
If I try to generate a map it does not do anything. Though my cursor changes into busy.

*Ruby bindings for cairo 1.8.0
*Cairo 1.8.6

* Open --> select a map --> ok --> game crashes. (sorry did not test that with the replaced file )

Revision history for this message
Crimer (reini-crimer) wrote :
Revision history for this message
Crimer (reini-crimer) wrote :
Revision history for this message
Nathaniel Sherry (nsherry) wrote :

I have attached a new version of the file OFManager.rb. If you replace the copy that exists in the root directory of the source, it should solve at least some of the issues you are having. The hanging upon opening a map seems to have been caused by attempting to deserialize the map twice, the second time trying to deserialize an already-deserialized map.

Let me know how this works for you, and we can try to figure out how to deal with any other problems that still remain

Revision history for this message
Nathaniel Sherry (nsherry) wrote :

Is this bug still an issue after the latest update? I'd like to push an updated version of the game if this issue has been resolved.

Thanks

Revision history for this message
Crimer (reini-crimer) wrote :

Sorry that it took me so long to answer, I was away for a couple of weeks.

I replaced the file.

I can open and generate maps now.
After I click on "OK" the Distribute units window appears then the game crashes.

Revision history for this message
Crimer (reini-crimer) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.