Update to swordedit

Halo modding and gaming related applications.
kiddten
Commando
Posts: 2469
Joined: Wed Sep 30, 2009 1:42 am
Location: Nova Zeelandia.

Re: Update to swordedit

Post by kiddten » Fri Apr 23, 2010 9:34 pm

only windows. lets hope noone else gets the same error
kiddten, on most things nowadays wrote:no
TaxiService wrote:HERE IS THE GODDAMN WALDO YOU CHEATING DICK
๖ۣۜĐeяP wrote:U MOTHER FUCKER AND U FUCKING PARENTS AND FUCKED OFF ASS HOLES

Samuco

Re: Update to swordedit

Post by Samuco » Fri Apr 23, 2010 9:37 pm

It's probably because of PPC. You'll have to ask nil about this one.
Anyone else get that error?

nil
Halo Moderator
Halo Moderator
Posts: 1090
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: Update to swordedit

Post by nil » Fri Apr 23, 2010 10:09 pm

I got a kernel panic on my PPC. I haven't tested it out on an intel. Be careful, peoples.

I don't know what to make of that error message. Do you do anything bizarre after the application launches? It helps if you post the source code, too.
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!

Samuco

Re: Update to swordedit

Post by Samuco » Fri Apr 23, 2010 10:42 pm

Well, it asks for an admin password. Here's the nib code:

Code: Select all

- (void)awakeFromNib
{
	//Set the process ID
	haloProcessID = 1675;
	
	BOOL needsAuthorizationCheck = YES;
	
#ifdef __ppc__
	// PPC machines whose operating system is below leopard do not need authorization
	SInt32 osxMinorVersion;
	Gestalt(gestaltSystemVersionMinor, &osxMinorVersion);
	if (osxMinorVersion < 5)
	{
		needsAuthorizationCheck = NO;
	}
#endif
	
	if (needsAuthorizationCheck)
	{
		if (amIWorthy())
		{
			// when the app restarts from asking the user his adminstator's password, the app isn't activated for some reason, so we'll activate it
			//[NSApp activateIgnoringOtherApps:YES];
			
#ifndef _DEBUG
			// if we don't print this, the old instance of the app will stll be alive. this behavior is wanted in debug mode because xcode's debugger will remain opened
			printf("Don't forget to flush! ;-) "); // signal back to close caller
#endif
			fflush(stdout);
		
	[NSApp setDelegate:self];
	
	/* Beta experation code */
	NSString *nowString = [NSString stringWithUTF8String:__DATE__];
	NSCalendarDate *nowDate = [NSCalendarDate dateWithNaturalLanguageString:nowString];
	NSCalendarDate *expireDate = [nowDate addTimeInterval:(60 * 60 * 24 * 10)];
	
	/*if ([expireDate earlierDate:[NSDate date]] == expireDate)
	{
		NSRunAlertPanel(@"Beta Expired!",@"Your swordedit beta has expired!",@"Oh woes me!", nil, nil);
		[[NSApplication sharedApplication] terminate:self];
	}
	else
	{
		NSRunAlertPanel(@"Welcome to the beta.", [[NSString stringWithString:@"swordedit beta expires on "] stringByAppendingString:[expireDate description]], @"I feel blessed!", nil, nil);
	}*/
	/* End beta experation code */
	
	userDefaults = [NSUserDefaults standardUserDefaults];
	
	[self loadPrefs];
	
	if (!bitmapFilePath)
	{
		[self selectBitmapLocation];
	}
	
	[mainWindow makeKeyAndOrderFront:self];
	//[mainWindow center];
	
	NSString *autoa = [NSString stringWithContentsOfFile:@"/tmp/starlight.auto"];
	if (autoa)
	{
		
		NSArray *settings = [autoa componentsSeparatedByString:@","];
		NSString *pat = [settings objectAtIndex:0];
		if ([[NSFileManager defaultManager] fileExistsAtPath:pat])
		{
			//[selecte center];
			//[selecte makeKeyAndOrderFront:nil];
			
			[[NSApplication sharedApplication] beginSheet:selecte modalForWindow:[rendView window] modalDelegate:self didEndSelector:nil contextInfo:self];
			
			
			[tpro setUsesThreadedAnimation:YES];
			[tpro startAnimation:nil];

		
		[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(LoadMaps:) userInfo:pat repeats:NO];
		
		}
		
		}
		}
		else
		{
			extern char *gExecutablePath;
			authMe(gExecutablePath);
			[[NSApplication sharedApplication] terminate:nil];
		}
	}
	
}

Samuco

Re: Update to swordedit

Post by Samuco » Fri Apr 23, 2010 10:44 pm

It also attempts to load vehicles. Were you hosting a game when you opened it?

kiddten
Commando
Posts: 2469
Joined: Wed Sep 30, 2009 1:42 am
Location: Nova Zeelandia.

Re: Update to swordedit

Post by kiddten » Fri Apr 23, 2010 11:23 pm

i wasn't running anything but finder and firefox.
kiddten, on most things nowadays wrote:no
TaxiService wrote:HERE IS THE GODDAMN WALDO YOU CHEATING DICK
๖ۣۜĐeяP wrote:U MOTHER FUCKER AND U FUCKING PARENTS AND FUCKED OFF ASS HOLES

Samuco

Re: Update to swordedit

Post by Samuco » Sat Apr 24, 2010 1:37 am

Try it with this condition:
1. Halo demo open
2. Hosting your own game

Have you got an intel computer nil?

kiddten
Commando
Posts: 2469
Joined: Wed Sep 30, 2009 1:42 am
Location: Nova Zeelandia.

Re: Update to swordedit

Post by kiddten » Sat Apr 24, 2010 1:52 am

with halo open it doesn't kernel panic. interesting. thank you.
kiddten, on most things nowadays wrote:no
TaxiService wrote:HERE IS THE GODDAMN WALDO YOU CHEATING DICK
๖ۣۜĐeяP wrote:U MOTHER FUCKER AND U FUCKING PARENTS AND FUCKED OFF ASS HOLES

Samuco

Re: Update to swordedit

Post by Samuco » Sat Apr 24, 2010 1:56 am

Here's my theory: When the kernel tries to read the memory of a non-existant program, the computer gets confused. Snow Leopard is smarter, and doesn't really mind.
Try hosting a game (if you tell me the name and password, ill join :)) and test whether live swordedit works.

2310
Ranger
Posts: 686
Joined: Sat Dec 26, 2009 5:16 am
Location: Forerunner Cartography Installation 330, making new maps!

Re: Update to swordedit

Post by 2310 » Sat Apr 24, 2010 6:27 am

Awesome! I would imagine this could be used to test secret areas of a map that would otherwise need complex steps to get to. It could also be used to objectively observe live player behavior on maps, especially for balancing asymmetrical maps.

Fonzeh
Ranger
Posts: 1894
Joined: Tue Oct 16, 2007 3:57 am
Location: "I didn't just take your mom out to dinner. I ate your mom for dinner."
Contact:

Re: Update to swordedit

Post by Fonzeh » Sat Apr 24, 2010 7:26 am

This...

Is WHAT IM TALKING ABOUT!

Also, if you could build a feature that allows you to fly around the map while the other players continue playing, that'd be perfect.
G[v]N wrote:HUGE NOTIFICATION
THIS GRAVY HAS BRAINS
Mota-Lev was here 30/4/2010@2:18pm
Image

nil
Halo Moderator
Halo Moderator
Posts: 1090
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: Update to swordedit

Post by nil » Sat Apr 24, 2010 9:44 am

It'd be easier if you uploaded the source code (and presumably the Xcode project) as you should, whenever you release a new build to the public, anyway. I can only see what's occurring in the one method you posted.

Code: Select all

//Set the process ID
haloProcessID = 1675;
This logic is completely wrong? The PID isn't always the same, and it would rarely be a random number like 1675. Perhaps you're grabbing the PID elsewhere in your program, but I can't tell from what you've posted. In any case, that code should be omitted.

Also, you can't assume Halo Demo is open when the user opens swordedit, nor can you assume once it's open that it won't be relaunched. You will need to keep track of when Halo Demo launches and terminates and grab the new PID in those situations, and be able to handle when Halo Demo isn't running.
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!

dirk

Re: Update to swordedit

Post by dirk » Sat Apr 24, 2010 9:52 am

nil wrote:It'd be easier if you uploaded the source code (and presumably the Xcode project) as you should, whenever you release a new build to the public, anyway. I can only see what's occurring in the one method you posted.

Code: Select all

//Set the process ID
haloProcessID = 1675;
This logic is completely wrong? The PID isn't always the same, and it would rarely be a random number like 1675. Perhaps you're grabbing the PID elsewhere in your program, but I can't tell from what you've posted. In any case, that code should be omitted.

Also, you can't assume Halo Demo is open when the user opens swordedit, nor can you assume once it's open that it won't be relaunched. You will need to keep track of when Halo Demo launches and terminates and grab the new PID in those situations, and be able to handle when Halo Demo isn't running.
We need to see the whole thing to be able to tell why it is crashing.

----
Source was released under GPL,
http://code.google.com/p/swordedit/

You need to release the source, I remember that beta code from when sword originally posted it for the collective to test.

nil
Halo Moderator
Halo Moderator
Posts: 1090
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: Update to swordedit

Post by nil » Sat Apr 24, 2010 9:57 am

One more thing - you should have haloProcessID be 0 when Halo Demo is not running. I'd guess that reading/writing to a PID of 0 won't cause the kernel to be mad, though of course, you should make all efforts against reading/writing to something that isn't open anyway.
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!

dirk

Re: Update to swordedit

Post by dirk » Sat Apr 24, 2010 10:05 am

One more thing, someone needs to learn how to use GDB:

Code: Select all

2010-04-24 14:03:26.554 swordedit[10606:e07] *** WARNING: Method selectRow:byExtendingSelection: in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
0x00012749 in -[RenderView applicationWillTerminate:] ()
(gdb) 
I did not experience a kernel panic when running the PPC version on my Intel mac and I think only because I was running it in GDB at the time.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests