Recently in the Towerdefense mod me and FreshDumbledore are making, I added an "emergency repair" particle system to all towers (using the same xml definition as the airship in tech uses for a custom damage particle system), but every time I morph a tower into a portal with this this xml definition I get a segmentation fault with the following output:
In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:
Error saved to logfile [/home/james/.megaglest/error.log]
*ERROR* [2014-09-05 01:54:30] In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleRuntimeError Line: 629] [In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:
] gameInitialized = 1, program = 0x1d8b340
*ERROR* [2014-09-05 01:54:31] In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleRuntimeError Line: 648] [In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:
Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x7a7117] line: 639
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x7a780f] line: 5607
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f82f8b13c30] line: 0
./megaglest:Glest::Game::Unit::checkCustomizedParticleTriggers(bool)address [0xa39fbe] line: 3917
./megaglest:Glest::Game::Unit::tick()address [0xa3ec4e] line: 3113
./megaglest:Glest::Game::World::tick()address [0xaf5a6a] line: 1005
./megaglest:Glest::Game::World::update()address [0xafe117] line: 937
./megaglest:Glest::Game::Game::update()address [0x6707fd] line: 2157
./megaglest:Glest::Game::Program::loopWorker()address [0x7dc958] line: 476
./megaglest:Glest::Game::glestMain(int, char**)address [0x7d2a75] line: 5451
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x7d45c1] line: 5699
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f82f8afeec5] line: 0
./megaglest() [0x5eddd9]address [0x5eddd9]
]
Segmentation fault (core dumped)
This happens if the object is damaged or not, and therefore also if the particle is being used or not
FreshDumbledore made a suggestion as to why this fault exists, he suggested that the particle is linked to the original object, when the morph occurs the particle wants to be cancelled but the original object which the particle belongs to is gone so the game gets confused (or something like that, maybe he'll explain a little better).
There is also a workaround this bug (using an attackboost as seen
here), but this is tacky.