Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

qr_draw_png.mm file gives EXE_bad access error

Posted on 2013-05-14
1
Medium Priority
?
498 Views
Last Modified: 2013-06-28
-I have problem while creating qrcode  image from my data.
-I have application to read and write qrcode of data. When i am entering data to my application it will generate qrcode.
-while creating qrcode image some times it crash application and gives Thread 1:
-EXC_BAD_ACCESS on the following code.
Code.txt
0
Comment
Question by:rigelnet
1 Comment
 
LVL 31

Accepted Solution

by:
serialband earned 1000 total points
ID: 39191376
I found this

http://stackoverflow.com/questions/3332621/exc-bad-access-while-calling-malloc-function
Which points to this
http://developer.apple.com/mac/library/qa/qa2004/qa1367.html

This kind of problem is usually the result of over-releasing an object. It can be very confusing, since the failure tends to occur well after the mistake is made. The crash can also occur while the program is deep in framework code, often with none of your own code visible in the stack.

Memory management is tricky.  I assume this is just a fragment of your code and you're calling malloc and free elsewhere and that's causing a problem when you reach this point.  You may have released a pointer when it pointed to a different location in memory, or didn't allocate the correct amount in another part of your program.  I remember spending hours on debugging malloc & free.  Even well seasoned programmers will mess inadvertently mess this up.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When Apple released Swift last year, the aim was to introduce a new programming language for Cocoa and Cocoa Touch that was fast, easy and effective, like the name connotes. Apple succeeded. Swift is designed to couple with Objective-C program…
     Intro      In this article, I will show you how to parse a JSON in Swift using an open source library called SwiftyJSON (https://github.com/SwiftyJSON/SwiftyJSON). If you haven't heard of a JSON before, it stands for JavaScript Object Notation…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question