Discussion:
[Crystal-develop] [Crystal-cvs] SF.net SVN: crystal:[39923] CS/trunk/libs/csplugincommon/rendermanager/ occluvis.cpp
Vincent Knecht
2014-01-04 18:45:14 UTC
Permalink
Le samedi 04 janvier 2014 à 07:50 +0000,
Revision: 39923
http://sourceforge.net/p/crystal/code/39923
Author: ralphcampbell
Date: 2014-01-04 07:50:00 +0000 (Sat, 04 Jan 2014)
-----------
Planeshift creates iMeshWrappers which have not been registered with sector->PrepareMesh() so allow sector->UnprepareMesh(this) to succeed in csMeshWrapper::SetParent()
--------------
CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp
Modified: CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp
===================================================================
--- CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp 2014-01-03 04:22:45 UTC (rev 39922)
+++ CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp 2014-01-04 07:50:00 UTC (rev 39923)
@@ -882,7 +882,8 @@
}
// ensure the object was found
- CS_ASSERT(found);
+ if(!found)
+ return;
// get all mesh lists for the various render views
csArray<csRefArray<NodeMeshList>*> nodeMeshLists = nodeMeshHash.GetAll();
It looks like this change is not correct in optimized build,
'found' is #ifdef'ed for CS_DEBUG line 834 in the same file.

***@omnius:csopt $ jam
...patience...
...patience...
...patience...
...patience...
...found 4920 target(s)...
...updating 251 target(s)...
C++ ./out/linux/optimize/libs/csplugincommon/rendermanager/occluvis.o
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp: In member function ‘virtual void CS::RenderManager::csOccluvis::UnregisterVisObject(iVisibilityObject*)’:
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:885:11: erreur: ‘found’ was not declared in this scope
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp: In member function ‘void CS::RenderManager::csOccluvis::RenderMeshes(CS::RenderManager::VisTreeNode*, iRenderView*, size_t&, iShader*&, iShaderVariableContext*, CS::RenderManager::csOccluvis::NodeMeshList*&) [with bool bQueryVisibility = false, CS::RenderManager::VisTreeNode = CS::Geometry::SpatialTreeChild::BoxChild<false>, size_t = long unsigned int]’:
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:1088:108: instantiated from here
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:332:25: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare]
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp: In member function ‘void CS::RenderManager::csOccluvis::RenderMeshes(CS::RenderManager::VisTreeNode*, iRenderView*, size_t&, iShader*&, iShaderVariableContext*, CS::RenderManager::csOccluvis::NodeMeshList*&) [with bool bQueryVisibility = true, CS::RenderManager::VisTreeNode = CS::Geometry::SpatialTreeChild::BoxChild<false>, size_t = long unsigned int]’:
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:1093:107: instantiated from here
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:332:25: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare]

g++ -c
-o ./out/linux/optimize/libs/csplugincommon/rendermanager/occluvis.o
-I/home/vince/Projects/CrystalSpace/trunk/CS/. -I./include
-I/home/vince/Projects/CrystalSpace/trunk/CS/./include -pipe -Wall
-Wno-unknown-pragmas -fvisibility=hidden -mtune=generic -mfpmath=sse
-I/usr/local/include -DNVALGRIND -fno-exceptions
-fvisibility-inlines-hidden -DNVALGRIND -ffunction-sections
-fdata-sections -O3 -fomit-frame-pointer -ffast-math -g2
-DCS_CRYSTALSPACE_LIB -fPIC -DCS_CRYSTALSPACE_LIB
-DCS_PLUGIN_META_EXT='".csplugin"' -DCS_PLUGIN_EXT='".so"'
-I/home/vince/Projects/CrystalSpace/trunk/CS/libs/csutil/ptmalloc
-I/home/vince/Projects/CrystalSpace/trunk/CS/libs/csutil/ptmalloc/sysdeps/pthread -DCS_CONFIGDIR='"/usr/local/etc/crystalspace-2.1"' -DCS_PLUGINDIR='"/usr/local/lib/crystalspace-2.1"' -DCS_COMPILER_NAME_AND_VERSION='"GCC_4.6"' /home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp

...failed C
++ ./out/linux/optimize/libs/csplugincommon/rendermanager/occluvis.o ...
Ralph Campbell
2014-01-04 21:12:14 UTC
Permalink
Sorry about that. I just fixed it.
Post by Vincent Knecht
Le samedi 04 janvier 2014 à 07:50 +0000,
Revision: 39923
http://sourceforge.net/p/crystal/code/39923
Author: ralphcampbell
Date: 2014-01-04 07:50:00 +0000 (Sat, 04 Jan 2014)
-----------
Planeshift creates iMeshWrappers which have not been registered with sector->PrepareMesh() so allow sector->UnprepareMesh(this) to succeed in csMeshWrapper::SetParent()
--------------
CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp
Modified: CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp
===================================================================
--- CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp 2014-01-03 04:22:45 UTC (rev 39922)
+++ CS/trunk/libs/csplugincommon/rendermanager/occluvis.cpp 2014-01-04 07:50:00 UTC (rev 39923)
@@ -882,7 +882,8 @@
}
// ensure the object was found
- CS_ASSERT(found);
+ if(!found)
+ return;
// get all mesh lists for the various render views
csArray<csRefArray<NodeMeshList>*> nodeMeshLists = nodeMeshHash.GetAll();
It looks like this change is not correct in optimized build,
'found' is #ifdef'ed for CS_DEBUG line 834 in the same file.
...patience...
...patience...
...patience...
...patience...
...found 4920 target(s)...
...updating 251 target(s)...
C++ ./out/linux/optimize/libs/csplugincommon/rendermanager/occluvis.o
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:885:11: erreur: ‘found’ was not declared in this scope
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:1088:108: instantiated from here
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:332:25: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare]
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:1093:107: instantiated from here
/home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp:332:25: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare]
g++ -c
-o ./out/linux/optimize/libs/csplugincommon/rendermanager/occluvis.o
-I/home/vince/Projects/CrystalSpace/trunk/CS/. -I./include
-I/home/vince/Projects/CrystalSpace/trunk/CS/./include -pipe -Wall
-Wno-unknown-pragmas -fvisibility=hidden -mtune=generic -mfpmath=sse
-I/usr/local/include -DNVALGRIND -fno-exceptions
-fvisibility-inlines-hidden -DNVALGRIND -ffunction-sections
-fdata-sections -O3 -fomit-frame-pointer -ffast-math -g2
-DCS_CRYSTALSPACE_LIB -fPIC -DCS_CRYSTALSPACE_LIB
-DCS_PLUGIN_META_EXT='".csplugin"' -DCS_PLUGIN_EXT='".so"'
-I/home/vince/Projects/CrystalSpace/trunk/CS/libs/csutil/ptmalloc
-I/home/vince/Projects/CrystalSpace/trunk/CS/libs/csutil/ptmalloc/sysdeps/pthread -DCS_CONFIGDIR='"/usr/local/etc/crystalspace-2.1"' -DCS_PLUGINDIR='"/usr/local/lib/crystalspace-2.1"' -DCS_COMPILER_NAME_AND_VERSION='"GCC_4.6"' /home/vince/Projects/CrystalSpace/trunk/CS/libs/csplugincommon/rendermanager/occluvis.cpp
...failed C
++ ./out/linux/optimize/libs/csplugincommon/rendermanager/occluvis.o ...
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Crystal-develop mailing list
https://lists.sourceforge.net/lists/listinfo/crystal-develop
Loading...