[aquaria] crash :/

Mathias Panzenböck grosser.meister.morti at gmx.net
Tue Apr 26 00:31:55 EDT 2011

Ok, I fixed the seg fault by writing a very simple reference counting smart pointer (SmartPtr<Type>) 
and using this to hold references to IngredientData. :)

The smart pointer only works for single threaded usage, but I think only one thread is accessing all 
the IngredientData instances (in a writing manner). For multithreading one would need atomic 
integers and more testing. Or copy+paste from Qt (its also GPL).

You can pull the changes from here:

Note that I changed Continuity::ingredients to private during debugging. Generally I think there are 
to much things in public scope. I think a narrow interface narrows down the usage and makes 
debugging more easy (that includes using const where appropriate).

Now I can finally continue playing. :) The seg faults where really hindering.


On 04/24/2011 05:04 AM, Andrew Church wrote:
>> Just wanted to report a segmentation fault. I wasn't running in a debugger so I don't have a stack
>> trace. It did happen during cooking. Cooking seems strange lately. When I combine two things these
>> things don't go away and I have to click around until I can combine other things. This was exactly
>> the moment of the crash.
> That's designed behavior (except the crash, of course), to speed up cooking
> of the same item multiple times.  If you can reproduce the crash, please
> post a backtrace.
>    --Andrew Church
>      achurch at achurch.org
>      http://achurch.org/

More information about the aquaria mailing list