Sneaky Bastard 0.1.6 – just in time for summer!

Sneaky Bastard is now able to send your ip address to your mail. Perfect for those who know their way around SSH and have Remote Login enabled. (Check here for OS X SSH best practices)


Sneaky’s network report

What’s New

  • If set, Sneaky will gather its host machine’s network properties during mailing of snapshot/s.
  • User can now configure delay (in seconds) before Sneaky Bastard will take a snapshot.
  • 2 alert levels are now available: Normal and Badass. Normal level is default, it will make Sneaky grab a snapshot during application start and system wakup events. Badass level will make Sneaky activate even on a Screensaver Stop event (when idle time is disrupted).
  • Minor bug fixes in timing mechanism.


Sneaky Bastard’s new preference panel

Download Sneaky Bastard 0.1.6
Download source

Posted in download, networking, source code | Leave a comment

Sneaky Bastard 0.1.4 – Yes, it’s that time again…

A few bug fixes here:

  • Fixed timer routine to prevent runaway timers that can’t be invalidated
  • Embedded ED Framework

The last one’s a revelation. The previous version of Sneaky is dependent on the ED Frameworks to run. I mistakenly thought that Xcode would compile and link the framework to the final binary file, this was not the case. So I did some research: A few recompiling of the framework source code later and I was able to embed it to the final application.

Download it here:

Sneaky Bastard 0.1.4
Sneaky Bastard 0.1.4 source code

Posted in download | Leave a comment

Sneaky Bastard is now open source!

The code is still… well… quite a mess… but it’s better sooner than later is what I always say. So get your Xcode engines running and point your browsers to Google code.

You may need to grab the 2 ED Frameworks over here.

Sneaky Bastard is released under the terms of GPL version 2.

Posted in download, General, source code | Leave a comment

Sneaky Bastard 0.1.3c alpha, and a shiny new icon too

After a week or so of testing, I’m making this available to the public. Sneaky is now able to send snapshots via email. Email Settings can be set in the Preferences window.

Send comments, suggestions and what-not over here: krist[at]hellowala.org

Cheers!

Sneaky Bastard 0.1.3c alpha

Obligatory disclaimer: This is an experimental software. Use at your own risk

Posted in download, General | Leave a comment

The Magical Mystery World of Core Video (part 2 of 2)

After trying and failing with various configurations for using Core Image I still haven’t found what I’m looking for and Sneaky Bastard is still compounding it’s memory usage on subsequent snapshots. It got me to question the choices in the frameworks I’ve made. I had to go back to the sample code Sneaky Bastard video class was derived from. I wondered if Still Motion would accumulate as much memory upon subsequent image capture and file writes. Or if the memory accumulation was the result of my tinkering. Apparently Still Motion is no better. But on one hand, it seemed to make perfect sense for it’s purpose… it’s compiling one still frame after another to a quicktime movie. Naturally, memory usage would grow along with the size of the video buffer. Sneaky Bastard wasn’t supposed to compile snapshots. It’s job was to take snapsot, save it to the filesystem and forget about it. But there seems to be something peculiar to how all the QTKit classes work.

I actually confirmed this after doing an all nighter, putting all clean coding aside and doing a dirty hack just to see what it is that making CVBufferRef or CIImage change it’s NSLog output in subsequent snapPhoto calls. And some invectives even found it’s way in Obj-C code (What do you expect? I’ve gone to the point where I even tried old C functions I’ve never used before like free() or sizeof()?). If I release CIImage the object count is decremented, if I retain it, it’s incremented. The condition is so that if the object count is 0 I won’t release it or the program will crash… don’t understand a thing of what I just said, but’s that’s how I see it happen.

1
2
3
4
5
6
7
8
9
10
11
12
NSLog(@" ciimage is nil %d",(ciImage == nil));
NSString *peste = [[NSString alloc] initWithFormat:@"%@",ciImage];
NSLog(@"peste! %C",[peste characterAtIndex:63]);
unichar pu = [peste characterAtIndex:63];
NSString *fu = [NSString stringWithCharacters:&pu length:1];
int pi = [fu intValue];
if(pi > 1){
    NSLog(@"f*** you %d",pi);
    [ciImage release];
}else{
    [ciImage retain];
}

Read More »

Posted in bug, c, Core Image, QTKit, Quicktime | Leave a comment

The Magical Mystery World of Core Video (part 1 of 2)

Oh, cocoa, just when I’m starting to think I’ve got you figured out, you quickly show another side of you just for the purpose of letting me know that you aren’t just any other framework.

I’m stumped. I’ve recently discovered that Sneaky Bastard’s snapshot writing routine has been acquiring memory incrementally. It wasn’t noticeable for the last few weeks because all I’m seeing in my geek tool report are the memory footprints of much bigger programs like Safari and Xcode. But once I’ve cleared my desktop of any major applications, that’s when I start to realize it. On it’s initial launch, Sneaky Bastard will take 12 Mb from the memory, but after making that first snapshot, that will increase to 18 Mb. It should stay that way, right? Since it would essentially be doing the same thing throught it’s lifetime. Under 20 Mb for a small utility should be enough to do it’s job. Unfortunately, that’s not true in the current version. Because after every call to the snapPhoto method, Sneaky will gradually increase it’s memory footprint. Still not really that bothersome to me, it increases memory consumption by 2 Mb per snapshot taken, because I shutdown my Mac daily. So everyday, it starts back from 12 Mb. But this certainly won’t do for a program whose main raison d’etre is to run without user supervision on a variety of unanticipated scenarios. And it certainly won’t serve Sneaky well in it’s just recent harmonious relationship with the darwin kernel. If that memory usage keeps growing, suppose a Mac isn’t being shutdown for days, it will be just a matter of time before that little utility that quietly sits on the menu bar becomes a little annoying utility that hungrily consumes all the computer’s memory and leaves very little to it’s neighbors… and ultimately resulting in a crash.

Read More »

Posted in bug, cocoa, Core Image, Core Video, Quicktime | Leave a comment

Hanging by a (NS)Thread (part 2 of 2)

Run Loops, Threads, Timers… these are some of the concepts I’ve been trying to get a handle on in the past few days. I’ve been running into term Run Loops a lot more a little lately. WordPress developers use it a lot. I think this is the code that keeps track of all the events coming and going, sorta like the main() in standard C. In Actionscript this is probably similar to the root onEnterFrame event handler. It all a little bit disconcerting knowing that there’s just a little time to apply theory into practice, so I’ve been making careful efforts not to stray too much from the example codes I’m reading. Gotta keep within the general conventions or might end up screwing the program big time.

From NSOperations to NSThreads and back again

One of the things I immediately realized prior to working on the email support for Sneaky Bastard is how it would be insanely difficult it would be for me to debug it while it’s performing network tasks. And because it doesn’t have a window UI, all the network tasks that it will be performing will almost be invisible to the user (unless your a fan of tail -f /var/log/system.log). And it should be. It’s all good when everyone’s sure that networking perfectly but not so when your just starting to build it. Because at this point I’m not sure what bugs I’ll encounter, what issues I’ll be handling aside from the usual suspects of network timeout, authentication failure, etc. It eventually dawned on me that to be able to work on Sneaky’s network component I’ll need to have another tool where I can be able to test out certain scenarios and get some instant feedback at the same time. And to make this tool suited to Sneaky Bastard’s purposes, I’ll have to write it myself. What’s nice about it too is that this will give me a chance to do some real GUI programming in Cocoa.

Read More »

Posted in cocoa, download, networking, nib, source code | Leave a comment