Monday 18 January 2010

EXC_BAD_ACCESS

I've been getting the odd random crash. I'd hoped this was nothing or something to do with the emulator. Tonight the crash went from random to consistent. I'm crashing in a CGContext function. CGContextClearRect to be exact. I had no idea why. The data being passed was fine but I still get crashes. The crashes sometimes moved around too. After a bit of research it looks like I can't use any CGContext calls from anything other than the main thread. I believe I'm using a calling thread as the crash is in the init code, which is on a applicationDidFinishLaunching callback. I'm going to have to sort it out tomorrow. Bugger!

So, last night I wrote a schedule. I'd planned 5 full days of work this week which leaves debugging for next week. The schedule started badly. I had to pick up my new car today. I'm trying to raise some money to allow me to live for a few months without needing to work. To do this I'm selling one of my cars and buying a much cheaper car instead. The plan was to get an hours work done before I left and then get back by about midday. The hour's work didn't really accomplish much and a massive traffic jam meant I wasn't back until after 1.30. Then the new car started playing up so I took 3 hours out this evening to try and fix it. Add to this the crash and I've got very little done today.

What I did get done however was to get the Font load and draw working. I found a simple bitmap font generator on the net. I generated the font on my laptop and included the generated texture on the Mac. I did try a bit of software for running windows on Mac called Parallel Desktop. I could have used Boot Camp but wanted something where I could run Windows in a window. Parallel Desktop however has a fantastic feature where is runs Windows as part of the Mac desktop by capturing the windows from the virtual Windows machine. The start menu docks into the Mac doc and the windows just appear on the Mac desktop. It truly is excellent and enabled you to use Mac and PC on the same machine as if they were the same OS. I've not given it a decent workout yet but it certainly is useful.

Anyway, back to the project. I've got to get this threading problem sorted tomorrow and the font displaying the scores. I've also got to get all the overlay and effect sprites working tomorrow. I'm still sticking to my deadline of submitting on the 1st of Feb and between now and then I'm moving house.

I've also got a job interview next Tuesday. I've been offered a couple of jobs since I lost mine at Christmas but I've used the excuse that they're too far away. I'm not prepared to move from the area as I plan to move in with my GF as soon as I can. However this job is remote working from home. It is also a very interesting and challenging position, and it's certainly a job tailored to my expertise. This does mean I have a choice to make. Should I pass up a great job for my risky iPhone work or just take the job and demote the iPhone career to a hobby? There are a lot of things to consider, but in the end it will probably hinge on the money. It may just be too good to turn down. We'll see next Tuesday I guess.

Time to look up iPhone threading.........

1 comment:

  1. I've heard good things about Parallels, VMware Fusion is also supposed to be very good (it's got DX9 and OGL 2.1 support).

    ReplyDelete