[iPhone] GSEvent Leaks

I am working on an OpenGL application based on the OpenGL ES Application Template in XCode and have a problem with a memory leak I am unable to resolve.
In my app the user can move around a figure rendered with OpenGL, the figure is also automatically animated if the user does nothing for a while.
When the figure is animated by the app, everything is ok (i.e no leaks). But as soon as I receive touchesBegan, touchesMoved and touchesEnded messages, I get leaking objects of type GSEvent and GeneralBlock-16.
They are only 128 and 16 Byte in size, but when you run the app for a while moving the figure around I get a memory warning and the app will eventually get killed by the iPhone.
Looking at the output generated by instruments I figured that the GSEvent Object was malloced in CreateWithEventRecord but never got freed. The GeneralBlock-16 is malloced in EventReceivedThread. The stack trace for both ends with an entry 0x0 which is kind of strange. But my app is never listed in the trace.
Does anyone have any idea what I am doing wrong here? I am using the touches* messages like this:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
for(UITouch *t in touches){
CGPoint mouseLoc = [t locationInView:self];
[self moveX:mouseLoc.x Y:mouseLoc.y];

After a little more digging I have discovered that this leak is caused when the accelerometer is used. To verify I created a new OpenGL ES application using the iPhone OpenGL ES project template. The only change I made was to set the sharedAccelerometer delegate and implement the UIAccelerometerDelegate protocol. I do nothing in the accelerometer method. When you run this app with Instruments and move your finger around the screen it generates the same leaks as our respected apps. Note that I don't even implement the touch* methods. I'm going to start a new thread for this issue in the new beta developer forums as it seems like a more appropriate place. Let me know if this helps.
-James

Similar Messages

  • Possible iPhone Battery Leak?

    Last night when I got home I plugged my iPhone into the charger cable and noticed that there was some resistance and the connector was a bit crooked.
    I looked inside the connector area on the phone and there was a yellowish deposit on one side of the connector. My iPhone has definitely not been in contact with any food or anything else, and from the location it appeared that this deposit leaked from inside the phone.
    So, it appears that this may be a battery leak. I'm traveling at the moment, so I don't have access to an Apple store, but when I get back I will take my iPhone into the genius bar and see what they think.
    I carefully cleaned out the deposit with a paper clip; it was a powdery residue. The iPhone is working normally and no further deposit has appeared, but I'm wondering whether it is safe to use the phone until I can have it looked at.
    Does this sound like a battery leak to any iPhone experts out there?
    Thanks,
    Jack
    iPHone   Other OS  

    You'd be surprised what falls into one's shirt or pants pockets on a daily basis. Everything from corn muffin crumbs to pocket lint.
    The current generation of lithium polymer batteries are unlikly to leak, and if you look at the autopsy photos of an iPhone, you'd have quite a mess inside before it could every corrode its way to the connector.
    And i wouldn't use a paper clip - you could damage the pins or short something out!

  • [iPhone] Memory leak when UIWebview is loaded with URL

    I have created a custom browser in my app using UIWebview . A memory leak is seen on everytime webview is loaded with provided  url. A snapshot of the leak is shown below.You may note that no back trace is shown and hence cause of leak is unknown.
    Snapshot of leak
    Please help me with this issue as early as possible.

    You might want to take this discussion to the developers forums. This is a general user to user forum for using the iPhone. This is way outside the scope of general use.

  • HELP! My iPhone is leaking!

    leaking money.
    I have my phone set up through gophone Pick Your Plan without the edge data package.
    Every 10 minutes or so I get a message that says "Your last transaction cost $0.01." Anyone know why I'm getting this message? I find it weird because my iPhone is connected to my home wireless network, could it be something besides EDGE that's causing this?
    This is a recent problem(started happening yesterday). I've had my phone set up without data for 2 months now without any problems like this.
    Thanks for any input or help.

    I have one of my iPhones setup on the Pick a Plan as well. A few tips:
    Close any widgets such as such as weather and stocks. They use edge and you will be charged money for these. They continue to update every few minutes eating up your money. If you leave weather open and press the sleep button, it is still active and will use edge to update every few minutes. Even if you have WiFi enabled, it switches to edge while on sleep.
    As pointed out, email uses edge also while on sleep, even with WiFi enabled. There goes more of your money.
    Maps use edge if WiFi is not enabled. There goes a HUGE chunk of your money, $3 to load one map page. $1.65 to load one webpage in Safari while not on WiFi.
    It is far cheaper in the long run to have a data plan. I can't tell you how many times in the beginning that I would forget and load up a webpage and get charged multiple dollars for it. Seriously, get the data plan.

  • IPhone SDK - Leaks in application

    Hi All,
    We are developing an application for iphone and our application has got two memory leaks. Do we have to clear all leaks before we submit our app to app store or there can be some leaks. Also the leaks that we are facing is related to NSMutablearray. Please direct us to some idea on how we can fix these leaks.
    vijay

    This is not a developer forum. It's a user to user forum.
    You should have a properly working app before you submit it.

  • I think my iPhone is leaking :s

    Ok this is going to sound crazy but hear me out. I have had my iPhone a week and tonight it was sitting beside me while I was watching tv. I picked it up, as you do and noticed the screen was slightly wet. I thought this was strange as I have nothing even remotly liquidy in the room. Anyway I had it in a rubber shell so I took it out that and noticed the inside of the rubber was soaking but the outside was dry! This would indicate to me the liquid is coming from inside the device. Just to stress the point - it has definitly not been anywhere near water. Has anyone had this? I don't really know what to do because it's still working fine but I spent slot of money on it and I'm afraid it will break.
    P.s I took out the sim and this was also damp.

    There are no liquid components inside the iPhone (including the battery, which is filled with a polymer). The water came from somewhere external, perhaps condensation, perhaps you got it a little wet a short time ago - the tight-fitting rubber case would have prevented the water from evaporating. Could have been rain, water spilled on a counter near the phone, anything really. The case may have acted as a 'siphon' with the very small amount of space between phone and case creating surface tension of the water, drawing it in (this is called capillary action).
    In any case, leave the case off, turn the phone off, and let it dry completely (at least a day, placing it in a bag with rice or desiccant is a good idea).
    If your moisture sensors are tripped, your warranty is void.
    http://support.apple.com/kb/HT3302

  • I have light leaking from the right top corner of my iPhone 5.is it a problem or a major thing. Is there anyone, who hasn't got this problem?

    I noticed light leaking from the top right corner of my new iPhone 5 from a small area. I noticed first, when I changed the brightness to higher and when I changed back the light was still there.

    Personally I would take it to the Apple Store cause the iPhone is still under warranty. You should try your carrier first if your not near an Apple Store and then go from there based on what help or lack of help they provide.
    Best of luck.

  • Does your iphone 5 white leak light?

    Ok so I was reading some posts that says that the iPhone 5 white leaks light on the right had side by the power button so I went to a dark room to see if mine did this to and low and behold it does, I'm so very disappointed and ****** off, I'm afraid to even go get the swapped out because the swapped phone could have the same issue.

    Wow I can't believe they didn't help u, I'm going today to take Genius Bar to hopefully get it replaced, this is a defect and they have to replace it for you, have u tried calling apple care? I did and they were going to ship me a replacement by mail but as soon as they said that they have to put a hold on my credit card for the cost of the phone I was like no thanks, they wanted to put a charge of $800 and then would put the money back into my account once they received the damaged phone so I said I didn't feel comfortable and would go to the Genius Bar.  How do I show  the genius guy that it leaks light when u can only see it in the dark?  I'm debating if I should actually get mine mailed cause at least I can't test it out in a dark room.  I hope you get ur issue resolved and keep me posted on what happened:)

  • Does the iPhone 5 'light leak' affect function?

    I just recently received my white iPhone 5, and I have a small light leak near the power button along the bezel. Does this affect the function of the phone, such as the screen brightness? And Would Verizon replace it?

    There may be a possibility it could affect the function but not likely. I would call Apple and report it though as they may replace it, Verizon would send you straight to Apple. Being that this is still such a new product they like to capture new products with hardware problems.

  • Has anyone found a solution for iPhone 5 data leak issues?

    Up until about a week ago I was using a 3GS and the data leak issues seemed to be fixed with the newest iOS 6 update. However, I recently got an iPhone 5 and I've noticed it uses around 1 MB per hour no matter what I'm actually doing on the phone. I actually went to sleep last night, turning of cellular data AND wifi and it STILL used about 4 MB of data!! What is up with this?? I am a pretty conservative user of data when not on wifi, but I'm only 2 days in to my bill cycle and already on pace to go over my 2 GB limit by the end of the month. Please help! I do not want to switch my plan and play more! I am on AT&T by the way.

    Have you tried these basic troubleshooting steps?
    Restart / Reset
    http://support.apple.com/en-us/HT201559
    Restore from backup
    Restore as new
    http://support.apple.com/en-us/HT201252
    If no joy, make an appointment with the Apple genius bar for an evaluation.

  • Can an iphone 3g battery leak of explode on overcharge?

    It just happened to 2 of then handsets in my home. One sony ericsson w350i and other nokia 1100. They were left to overcharge a couple of times and then the battery just stopped working. Upon observation the whole battery had swollen up, without any external leaks. I was wondering if something like this can happen with the iPhone 3g or is the firmware smart enough to make it stop charging on full charge?
    I also bought an app called sleep cycle which requires iPhone to be running overnight without screen lock and is recommends users to keep it plugged in to the charger so that it can stay up to sound the intended wake up alarm. Is this bad for the battery?
    Neerav

    I hope thats the same case with the MacBooks as well. Recently I had to get the battery replaced. I would keep it plugged in all the time and never re calibrated in 4 months! Now, I just drain it onces a week or 10 days and intend to calibrate it once a month.

  • Memory leak issue in iPhone app

    We developed a little program to display PDF's on the iPhone, but it's crashing after scrolling through xx number of pages with low memory error. The app runs fine in the simulator but crashes on the original iphone. I ran the memory leak debugger tool from xcode and got the following:
    http://picasaweb.google.com/momopi/MiscCollection#5384555524546579922
    (click on magnify glass tool to zoom in)
    Weird part is when I run the same on iphone simulator I only get 2 small memory leak warnings (128 bytes each), but on the iphone I get a lot more warnings and it crashes.
    Has anyone seen anything like this?

    Perhaps you don't have any meaningful leaks. Your program could simply consume too much memory. It has been many years since keeping a small memory footprint was important. Now that Apple has thrown embedded programming to the masses, everyone has forgotten about that.

  • Iphone 5s had white light leaks on lcd after unlocked with touch id

    My iphone 5s had white light leaks on lcd after unlocked with touch id. It's a bit confusing because if I unlock with passcode, there's no white light leaks. Does anyone have the same issue? What should I do?

    Title: Burst of White Light on iPhone 5S and iPhone 6
    Description:
    On unlocking the device with Touch ID a burst of white light is produced from the Top Left/Right corners of the screen.
    It happens when more than two folders are created i.e three/four folders each having some applications and the phone is locked while on the same screen.
    If no folder or maximum two folders are created then no such burst is produced when unlocking with Touch ID.
    Steps to reproduce:
    1. Configure Touch ID
    2. Use Black/Dark wallpaper on Home & Lock Screen.
    3. Create minimum four folders either on the home screen or the second having some applications in each.
    4. Being on Home Screen lock the phone.
    5. Unlock with Touch ID and a Burst of White Light will appear on Top Left/Right Corner.
    6. Now move/drag two of the folders to the other second page.
    7. Go back to Home Screen and lock the phone.
    8. Unlock with Touch ID and there is no Burst of White Light.
                        OR
    Repeat step 1 and 2 as listed above.
    1. Go to the second screen (after home screen) and create three or four folders with applications in it.
    2. Lock the iPhone while on the same screen.
    3. Unlock with Touch ID and there is a Burst of White Light.
    4. Now drag or remove the folders with only two left.
    5. Lock the iPhone while on the same screen.
    6. Unlock with Touch ID and there is no Burst of White Light.
    NOTE: If iPhone is LOCKED and UNLOCKED when on the screen with no folders NO WHITE BURST is there.
    Problem Since:
    Burst of White Light when apps added to a folder and unlocked with Touch ID. This is noticed since the update iOS 7.0.6 [11B651]
    Devices:
    The burst of light on iPhone 5s is easily recognized but on iPhone 6 its for a fraction of a second. Not checked on iPhone 6+.

  • Hi, after updating my iphone since 2 weeks back now i am facing a battery problem i charce fully my iphone and by the end of the day my iphone shuts down it needs to be charged again and if i didi some calles it leaks after few hours. Please adivse me.

    Hi, after updating my iphone since 2 weeks back now i am facing a battery problem i charce fully my iphone and by the end of the day my iphone shuts down it needs to be charged again and if i didi some calles it leaks after few hours. Please adivse me what to do.

    I final piece for me in the jigsaw following on from this
    http://www.care4pcs.co.uk/2012/10/how-to-be-happy-gmail-user-on-iphone-or.html 
    is to turn off wifi when you do not need it. When I leave the house I turn off wifi, because the majority of the times when my iPhone has got very hot and crashed is when I am away from home. I suspect that if the iPhone is in the vicinity of public wifi (wheather secure or not secure) it will try and connect, even if you have 'automatically join known networks' set to off. This is easy of course if you have an unlimited data contract for your iPhone. I may be wrong, but it is working for me. It makes sense for me because it is another way of reducing the work the processor (and battery) has to do and therefore reduces the chance of overheating.
    Having said that, I never had this problem with my iPhone 4. I now have a 4S.
    Try it. Hope it works for you.

  • Light leak iphone 5

    Dear all iPhone 5 users!
    I am very happy I bought the iPhone 5 on launch day. To be precise I got the white 32 GB version. Just after 2 days I started to notice that there was light leaking between the sleep button and the display. I have read some articles on the net and it seems only white iPhone 5’s are having this problem. You might think it’s a cosmetic flaw… but I am worried. It means there is a ‘gap’ between the unibody and the display. A gap means it’s also susceptible for moisture and damp (i.e. keeping device in pants).
    I went to the apple store (Amsterdam) and the didn’t have any new iPhone 5’s in stock so I got a iPhone 5 replacement unit that looked like refurbished unit. The service was excellent but when I got home the leak was also present in this swapped device. It seems like it’s a wide spread issue.
    Anybody have this problem?
    Thanks,
    D

    Hi all,
    Just to update you guys. I have been back to Apple. They recognised the problem and replaced my iPhone 5 with a brand new one. I had a white 32gb and now a black 32. The light leak is gone and I am very happy with the black iPhone. The service apple gives is topnoch!!!

Maybe you are looking for

  • Selecting, reading and sum of billing quantity for last 12 months in transformation end routine

    Hi experts, i have requirement to write end routine to read a DSO for last 12 months sales quantity for each month and sum value pass to keyfigure not interested using bex variable, while data loading from source to target dso in end routine i am try

  • How Do I Use the API to Abbreviate?

    How do I use the ACE API to limit the output field length and properly abbreviate the output field? Using the pwace command-line application, I get abbreviated output that looks like this for a 30 byte field: nnnnn GEORGE WASHNGTN MMRL HWY However, w

  • Possible Problem for US N95 User Upgrading to Firm...

    On July 19, 2007 the new firmware version 12.0.013 for Nokia N95 became available through Nokia Software Updater for US product coded N95s. I installed it and only within 1-2 hours my phone messed up. It is now almost unusable. I am trying to figure

  • How to create countdown timer with sound

    Any ideas on how to create a minute and seconds countdown timer that would play a sound and then redirect you to another page?

  • Transfer Forecast to R/3

    Hi all, When trying to transfer forecast to R/3 from Demand Planning, I am getting a successful transfer message. but Independent requirements are not showing up in R/3. I have created a activity and schedules a background job for the transfer. Are t