obscurestar avatar obscurestar committed 49561f5

Interim debug checkin to test from teamcity

Comments (0)

Files changed (4)

indra/llcrashlogger/llcrashlogger.cpp

 
 bool LLCrashLogger::sendCrashLogs()
 {
+    std::ofstream wlog;
+    wlog.open("/Users/samantha/crashlogging2.txt");
+    wlog << "SPATTERS sendingCrashLogs.!\n";
+
 	gatherFiles();
 
 	LLSD post_data;
 														   "SecondLifeCrashReport");
 	std::string report_file = dump_path + ".log";
 
+    wlog << "SPATTERS looking in dump_path " << dump_path << " report_file " << report_file << "\n";
 	std::ofstream out_file(report_file.c_str());
 	LLSDSerialize::toPrettyXML(post_data, out_file);
 	out_file.close();
 	//*TODO: Translate
 	if(mCrashHost != "")
 	{
+        wlog << "SPATTERS sending to MAIN host " << mCrashHost << "\n";
 		sent = runCrashLogPost(mCrashHost, post_data, std::string("Sending to server"), 3, 5);
 	}
 
 	if(!sent)
 	{
+        wlog << "SPATTERS sending to MAIN host " << mAltCrashHost << "\n";
 		sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3, 5);
 	}
 	
+    wlog.close();
+    
 	mSentCrashLogs = sent;
 
 	return true;
 	LLCurl::initClass(false);
 
 	// We assume that all the logs we're looking for reside on the current drive
-	gDirUtilp->initAppDirs("com.secondlife.indra.viewer");
+	gDirUtilp->initAppDirs("SecondLife");
 
 	LLError::initForApplication(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
 
 	// Rename current log file to ".old"
 	std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log.old");
 	std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log");
+    llinfos << "SPATTERS moving " << log_file << " to " << old_log_file <<llendl;
 	LLFile::rename(log_file.c_str(), old_log_file.c_str());
 
 	// Set the log file to crashreport.log
 		return false;
 	}
 
+    llinfos << "SPATTERS gets to here 1" << llendl;
 	gServicePump = new LLPumpIO(gAPRPoolp);
 	gServicePump->prime(gAPRPoolp);
 	LLHTTPClient::setPump(*gServicePump);

indra/llvfs/llvfs_objc.mm

                                                          YES);
     if ([paths count])
     {
-        NSString *bundleName =
-        [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
-        path = [[paths objectAtIndex:0] stringByAppendingPathComponent:bundleName];
-        
+        //NSString *bundleName = @"SecondLife";
+        //[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
+        //path = [[paths objectAtIndex:0] stringByAppendingPathComponent:bundleName];
+        path = [paths objectAtIndex:0];
         //SPATTERS HACK:  Always attempt to create directory, ignore errors.
         NSError *error = nil;
 
 {
     return findSystemDirectory (NSApplicationSupportDirectory,
                                 NSUserDomainMask);
+    
 }
 
 #endif // LL_DARWIN

indra/mac_crash_logger/llcrashloggermac.cpp

 
 bool LLCrashLoggerMac::mainLoop()
 {
+    std::ofstream wlog;
+    wlog.open("/Users/samantha/crashlogging1.txt");
+    wlog << "SPATTERS mainloop.!\n";
+
     if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
 	{
+        wlog << "sending\n";
 		gSendReport = true;
 	}
 	
 	if(gRememberChoice)
 	{
+        wlog << "momento\n";
 		if(gSendReport) saveCrashBehaviorSetting(CRASH_BEHAVIOR_ALWAYS_SEND);
 		else saveCrashBehaviorSetting(CRASH_BEHAVIOR_NEVER_SEND);
 	}
 	
 	if(gSendReport)
 	{
+        wlog << "Send report!";
 		setUserText(gUserNotes);
 		sendCrashLogs();
-	}		
+	}	
+	
+    wlog.close();
 	
 	return true;
 }

indra/mac_crash_logger/mac_crash_logger.cpp

     
 int main(int argc, char **argv)
 {
+    std::ofstream wlog;
+    wlog.open("/Users/samantha/crashlogging.txt");
+    wlog << "SPATTERS starting crash reporter.!\n";
 	LLCrashLoggerMac app;
+    wlog << "SPATTERS created app instance.!\n";
+    for (int x=0;x<argc;++x) wlog << "SPATTERS arg " << x << " is '" << argv[x] << "'\n";
 	app.parseCommandOptions(argc, argv);
+    wlog << "SPATTERS parsed commands.!\n";
 
 	if (! app.init())
 	{
+        wlog << "SPATTERS failed to init.!\n";
+
 		llwarns << "Unable to initialize application." << llendl;
 		return 1;
 	}
     if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND)
     {
+        wlog << "SPATTERS wanted to dialog.!\n";
+
         
 //        return NSApplicationMain(argc, (const char **)argv);
     }
+    wlog << "SPATTERS starting mainloop.!\n";
+
 	app.mainLoop();
+    wlog << "SPATTERS finished main.!\n";
+
 	app.cleanup();
+    wlog << "SPATTERS finished cleanup.!\n";
+
 	llinfos << "Crash reporter finished normally." << llendl;
+    wlog.close();
     
 	return 0;
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.