From: Andreas H. <an...@xs...> - 2005-09-05 16:00:36
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! Micha Bieber schrieb: |>What was the reason for the problem? | | | The dummy object, any doubts ... :-> | My guess: | | We have a chain: | | app -> qwtplot3d.dll/so -> qt.dll/so | | Qt has to initialize some of its structures (QString ?). The | construction for the qwt3d static object happens too early. Perhaps the | qt shared library isn't full available/initialized at this point yet. | Similar for destruction. I don't know and seeing the topic-relevant | discussions in the net, I have to admit that I'm not even eager to know | why ... . Oh well... ;-) But this all doesn't explain at least two things: a) why doesn't the crash on LabPlot happen on all systems b) why doesn't the crash happen on other qwtplot3d applications I don't know what the c++ standard says about construction of global static objects, but it seems to be system (compiler?) dependent. I think I might check the gcc mailing lists about this issue... | Anyway, in order to circumvent the problem, I moved all needed static | stuff inside functions (it's a common pattern). So whatever will be used | is constructed first in place when the function is called for the first | time. Because main runs then, order of initialization issues shouldn't | be longer an issue. | This might be better practice anyway: global objects are ugly ;-) Many thanks for your support! I'll inform the LabPlot maintainer about this development and I think he might use the new qwtplot3d version as soon as it is officially available. - - andreas PS: do you plan to add the neccessary adminstrative files for the usual "configure; make; make install" commands to your library? That would make it much easier to create installable packages of qwtplot3d and would perhaps eliminate the need for integrating the sources directly it into LabPlot. - -- Andreas Haumer | mailto:an...@xs... *x Software + Systeme | http://www.xss.co.at/ Karmarschgasse 51/2/20 | Tel: +43-1-6060114-0 A-1100 Vienna, Austria | Fax: +43-1-6060114-71 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDHGs/xJmyeGcXPhERAvF1AJ0VwMGMpZ/VKQ4S4DSMSng/rwN+2ACfYJJY Niu5rbqvWZz9cXDaZgPj3Rg= =WrtV -----END PGP SIGNATURE----- |