25 #error *****Isis.h MUST be included before any other files!*****
32 #include <QCoreApplication>
38 #define APPLICATION IsisMain
88 std::map<QString, void *> empty;
109 int main(
int argc,
char *argv[]) {
113 signal(SIGABRT,
Abort);
125 QCoreApplication::addLibraryPath(qtpluginpath.
expanded());
131 delete QCoreApplication::instance();
138 MyMutex *mutex =
new MyMutex();
139 std::fstream *alloc_output =
new std::fstream(
"/dev/null");
140 Debug(make_all_allocations_invisible_except(NULL));
141 ForAllDebugChannels(
if(debugChannel.is_on()) debugChannel.off());
142 Debug(dc::malloc.on());
143 Debug(libcw_do.on());
144 Debug(libcw_do.set_ostream(alloc_output));
145 Debug(libcw_do.set_ostream(alloc_output, mutex));
154 alloc_filter_ct alloc_filter;
155 std::vector<std::string> objmasks;
156 objmasks.push_back(
"libc.so*");
157 objmasks.push_back(
"libstdc++*");
158 std::vector<std::string> srcmasks;
159 srcmasks.push_back(
"*new_allocator.h*");
160 srcmasks.push_back(
"*set_ostream.inl*");
161 alloc_filter.hide_objectfiles_matching(objmasks);
162 alloc_filter.hide_sourcefiles_matching(srcmasks);
163 alloc_filter.hide_unknown_locations();
164 delete libcw_do.get_ostream();
165 libcw_do.set_ostream(&std::cout);
166 list_allocations_on(libcw_do, alloc_filter);
175 std::vector<std::string> currentStack;
178 std::cerr <<
"Segmentation Fault" << std::endl;
179 for(
unsigned int i = 1; i < currentStack.size(); i++) {
180 std::cerr << currentStack[i] << std::endl;
187 std::vector<std::string> currentStack;
190 std::cerr <<
"Abort" << std::endl;
191 for(
unsigned int i = 1; i < currentStack.size(); i++) {
192 std::cerr << currentStack[i] << std::endl;
Definition: Application.h:114
#define APPLICATION
Definition: Isis.h:38
File name manipulation and expansion.
Definition: FileName.h:111
void stopMonitoringMemory()
QString expanded() const
Definition: FileName.cpp:121
static void GetStackTrace(const void *)
Definition: IsisDebug.h:115
std::map< QString, void * > GuiHelpers()
Base include file for all Isis applications.
Definition: Isis.h:87
int main(int argc, char *argv[])
The programmer supplied main function.
Definition: Isis.h:109
void SegmentationFault(int)
static bool p_applicationForceGuiApp
Definition: Application.h:130
void startMonitoringMemory()
void InterruptSignal(int)