|
Revision 11122, 3.4 kB
(checked in by robert, 3 years ago)
|
|
From Ryan Kawicki, "I guess I missed these during my testing, but if the database pager has outstanding requests while the application is shutting down, the archive can become invalidated through unsafe calls to ReaderWriterTXP::getArchive. I've made this function return a ref_ptr and change other locations to as needed to conform to the change. I've tested this and no more crashes.
Following files from revision 11057 have been attached."
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | #ifndef __TXPNODE_H_ |
|---|
| 36 | #define __TXPNODE_H_ |
|---|
| 37 | |
|---|
| 38 | #include <osg/Group> |
|---|
| 39 | #include <osg/NodeVisitor> |
|---|
| 40 | #include <osg/NodeCallback> |
|---|
| 41 | #include <osg/ref_ptr> |
|---|
| 42 | |
|---|
| 43 | #include "TXPArchive.h" |
|---|
| 44 | #include "TXPPageManager.h" |
|---|
| 45 | |
|---|
| 46 | namespace txp |
|---|
| 47 | { |
|---|
| 48 | |
|---|
| 49 | class TXPNode : public osg::Group |
|---|
| 50 | { |
|---|
| 51 | public: |
|---|
| 52 | |
|---|
| 53 | TXPNode(); |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | TXPNode(const TXPNode&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); |
|---|
| 57 | |
|---|
| 58 | META_Node(txp, TXPNode); |
|---|
| 59 | |
|---|
| 60 | virtual void traverse(osg::NodeVisitor& nv); |
|---|
| 61 | |
|---|
| 62 | void setArchiveName(const std::string& archiveName); |
|---|
| 63 | void setOptions(const std::string& options); |
|---|
| 64 | |
|---|
| 65 | const std::string& getOptions() const; |
|---|
| 66 | const std::string& getArchiveName() const; |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | bool loadArchive(TXPArchive*); |
|---|
| 73 | |
|---|
| 74 | TXPArchive* getArchive() { return _archive.get(); } |
|---|
| 75 | |
|---|
| 76 | void setArchive( TXPArchive* archive ) |
|---|
| 77 | { |
|---|
| 78 | _archive = archive; |
|---|
| 79 | } |
|---|
| 80 | |
|---|
| 81 | virtual osg::BoundingSphere computeBound() const; |
|---|
| 82 | |
|---|
| 83 | protected: |
|---|
| 84 | |
|---|
| 85 | virtual ~TXPNode(); |
|---|
| 86 | |
|---|
| 87 | void updateEye(osg::NodeVisitor& nv); |
|---|
| 88 | void updateSceneGraph(); |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | osg::Node* addPagedLODTile(int x, int y); |
|---|
| 92 | |
|---|
| 93 | std::string _archiveName; |
|---|
| 94 | std::string _options; |
|---|
| 95 | |
|---|
| 96 | OpenThreads::Mutex _mutex; |
|---|
| 97 | |
|---|
| 98 | osg::ref_ptr<TXPArchive> _archive; |
|---|
| 99 | osg::ref_ptr<TXPPageManager> _pageManager; |
|---|
| 100 | |
|---|
| 101 | double _originX; |
|---|
| 102 | double _originY; |
|---|
| 103 | osg::BoundingBox _extents; |
|---|
| 104 | |
|---|
| 105 | std::vector<osg::Node*> _nodesToAdd; |
|---|
| 106 | std::vector<osg::Node*> _nodesToRemove; |
|---|
| 107 | |
|---|
| 108 | }; |
|---|
| 109 | |
|---|
| 110 | |
|---|
| 111 | } |
|---|
| 112 | |
|---|
| 113 | #endif // __TXPNODE_H_ |
|---|