Posts Tagged ‘troubleshooting’

openFrameworks iPhone 3GS / OS 3.0

Tuesday, July 14th, 2009

i’ve been dealing with a performance bug in a particle + accelerometer oF app. the same project which has run very smoothly on a first generation iPhone with OS 2.2.1 has a noticeable stutter on an iPhone 3GS with OS 3.0.

there was no improvement despite several rounds of optimizing the openGL drawing code and plugging several memory leaks.

finally, in frustration i bumped the explicit frame rate declaration from the default 60 fps to 120 fps. i realize that ofSetFrameRate(60) is merely the upper limit of the frame rate, and that the hardware won’t actually go faster than it can handle, however this immediately improved performance on the 3GS and the first gen is about the same as it was. further improvement was had with a declared frame rate of 240 fps.

i haven’t had a chance to look into the underlying issue, but i believe that oF is using NSTimer under the hood to trigger a scheduled update() and draw(). has there been some change in the SDK there?


Thursday, August 14th, 2008

another headache with GoldenCheetah. trying to implement a new feature – support for iBike CSV files. these files have a bunch of configuration data at the top, which is easy enough to skip, but for some reason the QTextStream::readLine() function is loading the entire file rather than line 1 (at least according to what i gather from gdb).

i’d figured that it was a line endings thing (\r rather than \n or \r\n) however changing up the line endings in both a GUI editor nor via the command line (cat oldfile.csv | tr “\r” “\n” > newfile.csv) corrected the problem.

opening the file in TextWrangler, replacing the line endings AND trimming the trailing zeros from the data DOES work though…so what else is going on here? is the regex replacing other hidden characters? is the file write process doing something?

at the very least, i’m getting more comfortable with gdb.