Author: eudoxos
Date: 2009-02-06 21:46:33 +0100 (Fri, 06 Feb 2009)
New Revision: 1658
Modified:
trunk/core/yade.cpp
trunk/gui/py/_eudoxos.cpp
trunk/gui/py/_utils.cpp
trunk/gui/py/utils.py
trunk/gui/qt3/GLViewer.cpp
trunk/gui/qt3/QtGUI-python.cpp
trunk/gui/qt3/QtSimulationPlayer.cpp
trunk/pkg/common/Engine/DeusExMachina/RotationEngine.cpp
trunk/pkg/common/Engine/DeusExMachina/RotationEngine.hpp
trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.cpp
Log:
1. Beautify no-debug code in main
2. SpiralEngine now saves angle it has turned so far
3. Remove failing assertion from IFacet2ISphere4SCG?\194?\160(why it fails? it
was a
(I-isRealI-interactionGeometry)||(!I-isReal!I-interactionGeometry)...)
4. Improve the utils.spiralproject function to specify period (moderately
tested, but seems to work)
5. Adjust locks in GLViewer. Fixes my crashes on nvidia for both player and 3d
view (didn't dare to try 2nd view). Next step will be to move this lock to
Omega and lock it when loading/resetting simulation etc.
6. Change theora video quality to 63 (maximum) instead of medium 32 in
utils.encodeVideoFromFrames. Makes the video about 3x bigger.
Modified: trunk/core/yade.cpp
===
--- trunk/core/yade.cpp 2009-02-04 21:45:01 UTC (rev 1657)
+++ trunk/core/yade.cpp 2009-02-06 20:46:33 UTC (rev 1658)
@@ -31,8 +31,6 @@
using namespace std;
-bool dontUseGdb(false);
-
#ifdef LOG4CXX
// provides parent logger for everybody
log4cxx::LoggerPtr logger=log4cxx::Logger::getLogger(yade);
@@ -61,8 +59,7 @@
case SIGSEGV:
signal(SIGSEGV,SIG_DFL); signal(SIGABRT,SIG_DFL); //
prevent loops - default handlers
cerrSIGSEGV/SIGABRT handler called; gdb batch file
is `Omega::instance().gdbCrashBatch'endl;
- if(!dontUseGdb)
- std::system((string(gdb -x
)+Omega::instance().gdbCrashBatch).c_str());
+ std::system((string(gdb -x
)+Omega::instance().gdbCrashBatch).c_str());
unlink(Omega::instance().gdbCrashBatch.c_str()); //
delete the crash batch file
raise(sig); // reemit signal after exiting gdb
break;
@@ -152,6 +149,8 @@
filesystem::path::default_name_check(filesystem::native);
string configPath=string(getenv(HOME)) + /.yade SUFFIX; // this is
the default, may be overridden by -c / -C
+
+ bool useGdb=true;
int ch; string gui=; string simulationFileName=; bool setup=false;
int verbose=0; bool coreOptions=true; bool explicitUI=false;
while(coreOptions (ch=getopt(argc,argv,hnN:wC:cxvS:))!=-1)
@@ -162,7 +161,7 @@
case 'w': setup=true; break;
case 'C': configPath=optarg; break;
case 'c': configPath=.; break;
- case 'x': dontUseGdb=true; break;
+ case 'x': useGdb=false; break;
case 'v': verbose+=1; break;
case 'S': simulationFileName=optarg; break;
case '-': coreOptions=false; break;
@@ -221,13 +220,15 @@
}
#ifdef YADE_DEBUG
- // postponed until the config dir has been created
- ofstream gdbBatch;
-
Omega::instance().gdbCrashBatch=(yadeConfigPath/gdb_crash_batch-pid).string()+lexical_caststring(getpid());
- gdbBatch.open(Omega::instance().gdbCrashBatch.c_str());
gdbBatchattach lexical_caststring(getpid())\nset pagination
off\nthread info\nthread apply all backtrace\ndetach\nquit\n; gdbBatch.close();
- signal(SIGABRT,sigHandler);
- signal(SIGSEGV,sigHandler);
- LOG_DEBUG(ABRT/SEGV signal handlers set, crash batch created
as Omega::instance().gdbCrashBatch);
+ if(useGdb){
+ // postponed until the config dir has been created
+ ofstream gdbBatch;
+
Omega::instance().gdbCrashBatch=(yadeConfigPath/gdb_crash_batch-pid).string()+lexical_caststring(getpid());
+ gdbBatch.open(Omega::instance().gdbCrashBatch.c_str());
gdbBatchattach lexical_caststring(getpid())\nset pagination
off\nthread info\nthread apply all backtrace\ndetach\nquit\n; gdbBatch.close();
+ signal(SIGABRT,sigHandler);
+ signal(SIGSEGV,sigHandler);
+ LOG_DEBUG(ABRT/SEGV signal handlers set, crash batch
created as Omega::instance().gdbCrashBatch);
+ }
#endif
LOG_INFO(Loading yadeConfigFile.string());
IOFormatManager::loadFromFile(XMLFormatManager,yadeConfigFile.string(),preferences,Omega::instance().preferences);
@@ -270,9 +271,11 @@
// Py_Finalize();