Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-28 Thread Lv Qing
Hi,

... 
Problem solved!

It is about some qt q_timer not-blocking signal issue,it is indeed nothing 
wrong with  osg or vpb.I dont excatly know why,but I hope it will help others.

Thank you all for your assistances in my most difficult time!

Cheers,
Lv

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38847#38847





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-26 Thread Robert Osfield
Hi Lv,

On Fri, Apr 22, 2011 at 1:17 PM, Lv Qing donlvq...@msn.com wrote:
 ... use osg2.9.12 and vpb 0.9.10 ,it still fails。so desperate~~

There is little that others in the community will be able to help you
with.  As I said before it's unlikely that the OSG has anything
specific to do with the problem, so changing version is unlikely to
make any difference, and if changing OSG versions did affect the
results it still is likely to be just co-incidence - the problem is
most likely elsewhere.

I would recommend running 3rd party memory tracking tools as this
might provide some light on what is going wrong.  I've used valgrind
under Linux recently and while the results were sometimes rather
cryptic it was very useful in establishing both memory management and
threading issues.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-22 Thread Lv Qing
Hi,

... use osg2.9.12 and vpb 0.9.10 ,it still fails。so desperate~~


Thank you!

Cheers,
Lv

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38731#38731





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Lv Qing
Hi,

... 


linux qt4 osg2.8.4

I have use ViewerQT to integrate an osg application to a qt4 application witch 
has other developer's none-osg application.

Then something strange happen,the ViewerQT  seems disturb qt4 application's 
shared memory ,which cause some memory crash however
not direct to my osg code but other developer's none-osg code.I removed
my osg code entirely,everything is OK,so I pretty sure it is related to my osg 
code.


Then I remove every osg code but  just loading an vpb generated .osga terrain 
model,the shared memory disturbing issure return! Instead I load a commen .osga 
 model like cow.ive ,it is OK!








Thank you!

Cheers,
Lv

Code:

class CompositeViewerQT : public osgViewer::CompositeViewer, public 
AdapterWidget

{

public:



CompositeViewerQT(QWidget * parent = 0, const char * name = 0, const QGLWidget 
* shareWidget = 0, WindowFlags f = 0):

AdapterWidget( parent, name, shareWidget, f )

{

setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);


setCameraManipulator(new osgGA::TrackballManipulator);

osg::ref_ptrosg::Node loadedModel= osgDB::readNodeFile(terrain.osga);   
//vpb generated .osga model .error

osg::ref_ptrosg::Node loadedModel= osgDB::readNodeFile(cow.ive);   //OK

setSceneData(loadedModel.get());


connect(_timer, SIGNAL(timeout()), this, SLOT(updateGL()));

_timer.start(10);

}



virtual void paintGL()

{

frame();

}



protected:



QTimer _timer;

};




--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38705#38705





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Sebastian Messerschmidt

Just a guess,

are you mixing debug and release builds? (i.e. linking in the debug 
build to release libraries)
I've encountered the strangest memory corruptions and crashes (due to 
differently sized STL data structures) under windows however.
Since I'm not quite know the stl implementation you use, that is just a 
guess.


hth
Sebastian

Hi,

...


linux qt4 osg2.8.4

I have use ViewerQT to integrate an osg application to a qt4 application witch 
has other developer's none-osg application.

Then something strange happen,the ViewerQT  seems disturb qt4 application's 
shared memory ,which cause some memory crash however
not direct to my osg code but other developer's none-osg code.I removed
my osg code entirely,everything is OK,so I pretty sure it is related to my osg 
code.


Then I remove every osg code but  just loading an vpb generated .osga terrain 
model,the shared memory disturbing issure return! Instead I load a commen .osga 
 model like cow.ive ,it is OK!








Thank you!

Cheers,
Lv

Code:

class CompositeViewerQT : public osgViewer::CompositeViewer, public 
AdapterWidget

{

public:



CompositeViewerQT(QWidget * parent = 0, const char * name = 0, const QGLWidget 
* shareWidget = 0, WindowFlags f = 0):

AdapterWidget( parent, name, shareWidget, f )

{

setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);


setCameraManipulator(new osgGA::TrackballManipulator);

osg::ref_ptrosg::Node  loadedModel= osgDB::readNodeFile(terrain.osga);   
//vpb generated .osga model .error

osg::ref_ptrosg::Node  loadedModel= osgDB::readNodeFile(cow.ive);   //OK

setSceneData(loadedModel.get());


connect(_timer, SIGNAL(timeout()), this, SLOT(updateGL()));

_timer.start(10);

}



virtual void paintGL()

{

frame();

}



protected:



QTimer _timer;

};




--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38705#38705





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Lv Qing
Hi,

... Thank you for reply so soon!I build osg2.8.4 on linux only release no debug.

I just notic that since osg2.9.8 there is some improvement of 
VirtualPlanetBuilder suppot and DatabasePager memory management and QT 
support.Maybe I should try this?


Thank you!

Cheers,
Lv

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38710#38710





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Robert Osfield
Hi Lv,

On Thu, Apr 21, 2011 at 5:53 PM, Lv Qing donlvq...@msn.com wrote:
 I just notic that since osg2.9.8 there is some improvement of 
 VirtualPlanetBuilder suppot and DatabasePager memory management and QT 
 support.Maybe I should try this?

The latest 2.9.12 dev release does have improvements in thread safe of
the pager, but you have to really thrash it to see these problems in
older versions of the OSG so I'd guess that 2.8.4 is probably fine.
There won't be any harm in trying 2.9.12 out though is pretty API
compatible.

As for your specific problems, the OSG itself doesn't use shared
memory at all, and doesn't use any clever memory tricks so should just
operate independantly from Qt and what ever it does on the memory
front.  The exception to this would be if Qt itself is reimplementing
malloc/free and new/delete in which case you really have to look at Qt
for tracking down what the problem is.

My guess is that use of paged databases on the OSG isn't directly the
problem, rather it might just be stressing the system more such that
eixsting problems in other codes are brought to the fore, so it's as
much just a coincedence rather than direct cause and effect.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Rob Radtke
A co-worker of mine recently fixed a bunch of similar VPB issues by 
following this advice:


http://forum.osgearth.org/Critical-issue-with-paging-and-horizon-td5789174.html

The jist of it is this:
'Try setting your OSG_MAX_PAGEDLOD environment variable to something 
higher (default is 300 if I remember correctly).  Also, try changing 
your loading policy to preemptive since that way the current LOD is 
loaded first. '


- Rob


On 4/21/2011 8:50 AM, Lv Qing wrote:

Hi,

...


linux qt4 osg2.8.4

I have use ViewerQT to integrate an osg application to a qt4 application witch 
has other developer's none-osg application.

Then something strange happen,the ViewerQT  seems disturb qt4 application's 
shared memory ,which cause some memory crash however
not direct to my osg code but other developer's none-osg code.I removed
my osg code entirely,everything is OK,so I pretty sure it is related to my osg 
code.


Then I remove every osg code but  just loading an vpb generated .osga terrain 
model,the shared memory disturbing issure return! Instead I load a commen .osga 
 model like cow.ive ,it is OK!








Thank you!

Cheers,
Lv

Code:

class CompositeViewerQT : public osgViewer::CompositeViewer, public 
AdapterWidget

{

public:



CompositeViewerQT(QWidget * parent = 0, const char * name = 0, const QGLWidget 
* shareWidget = 0, WindowFlags f = 0):

AdapterWidget( parent, name, shareWidget, f )

{

setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);


setCameraManipulator(new osgGA::TrackballManipulator);

osg::ref_ptrosg::Node  loadedModel= osgDB::readNodeFile(terrain.osga);   
//vpb generated .osga model .error

osg::ref_ptrosg::Node  loadedModel= osgDB::readNodeFile(cow.ive);   //OK

setSceneData(loadedModel.get());


connect(_timer, SIGNAL(timeout()), this, SLOT(updateGL()));

_timer.start(10);

}



virtual void paintGL()

{

frame();

}



protected:



QTimer _timer;

};




--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38705#38705





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Robert Osfield
Hi Rob,

On Thu, Apr 21, 2011 at 10:24 PM, Rob Radtke r...@stellarscience.com wrote:
 A co-worker of mine recently fixed a bunch of similar VPB issues by
 following this advice:

 http://forum.osgearth.org/Critical-issue-with-paging-and-horizon-td5789174.html

 The jist of it is this:
 'Try setting your OSG_MAX_PAGEDLOD environment variable to something higher
 (default is 300 if I remember correctly).  Also, try changing your loading
 policy to preemptive since that way the current LOD is loaded first. '

From the thread it sounds like tiles may well be overly fine grained,
and that the cost of recreating tiles is very high.  This might be
more common with osgEarth databases, but for VPB generated databases
my experience is that for default settings things balance out without
performance issues.  Use of GL texture compression might well be an
issue as well - VPB databases use GL compression which is lightweight
to download to the GPU.

Upping the maximum number of PagedLOD will give you more headroom if
you system can handle it, how far you can safely go will depend upon
how much data you have in each tile and how much memory you have
available, this is of course something that will vary of dataset to
dataset and from system to system so isn't something the OSG can
pre-empt with perfect defaults for all scenario's.

However, I would add, a low PagedLOD results in lower memory usuage,
but greater bandwidth and CPU load. In all cases though, it will just
me handling OSG and GL specific memory, it shoudln't touch
applications other memory usage other than to contend generally for
the systems resources.  So for Lv I suspect OSG_MAX_PAGEDLOD will be a
red-herring and problem is likely to be elsewhere in the app.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Lv Qing
Hi,

... 

I dig up a littlte more this morning.I replace origina terrain.osga(about 2G) 
with a small terrain.osga(10mb) ,problem remains,my total memory is 4G.

The error is printed within a net data send/receive management application 
which  works normaly without  osg application.The osg application seems 
distubed its or others share memory .

I will try osg2.9.12 this afternoon. My VirtualPlanetBuilder is a very old 
version 0.9.1 ,I will also try a new version .

I really hope it is not something wrong with Qt itself which is beyond my  
knowledge and capability,thx!

Thank you!

Cheers,
Lv

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38724#38724





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org