`
158067568
  • 浏览: 327088 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

core data 添加对象,过度release bug 总结。

阅读更多

core data 添加对象,过度release bug 总结。

现象:

在订阅按钮按下后,发生崩溃,系统给出提示:exc_bad_access。
debug代码,在添加到core data代码行之前和之后,添加断点,debug均能通过。
但是打过订阅方法执行完后报错。

原因分析:

追查添加到core data行中的内容,发现在得到core data对象中,使用了一个方法叫做newSubscribeDataEntity.该方法的作用是从core data中返回一个空的实体(自己理解的),该方法应该是autorelease,但是所在函数名用了new,造成了只有勿以为该方式是new出来的,然后对ta进行了手动的release。造成了exc_bad_access。

"debug代码,在添加到core data代码行之前和之后,添加断点,debug均能通过。" 一开始以为能够通过,所以觉得并不是添加到core data行出现的问题。目前个人觉得造成该原因可能是由于,core data与操作是在其自己独立的线程中完成,并且应该是相对main函数,有一定的延时机制。

解决方法:

1.删除手动release行代码。
2.应该修改newSubscribeDataEntity对象名称。如果不是返回以new、alloc、retain、copy实例化的对象,不要使用这些单词开头的名称。

PS:nszombie 使用 (xcode 4.xx)

edit schema -->run xx.app --> Diagnostics --> Enable Zombie Objects

分享到:
评论

相关推荐

    BURNINTEST--硬件检测工具

    - Two 2D Video memory test crash bug workarounds implemented. Crashes in (i) DirectX DirectShow and (ii) ATI atiumdag.dll library. - A hang on startup has been corrected. A 2 minute timeout has been...

    FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持D4-XE5

    - fixed bug with Unicode in TfrxMemoView appeared in previous release - improved MAPI interface in TfrxExportMail export - fixed some problems with allpication styles XE2/XE3 - improved compatibility ...

    rabbitmq-server-windows-3.6.12.zip

    RabbitMQ 3.6.12 is a maintenance release. Upgrades and Compatibility See the "Upgrading clusters" section of the documentation for general documentation on upgrades. This release has no other known...

    unigui0.83.5.820

    - 0000678: Core bug: Setting Align property at runtime - 0000677: Hiding or showing controls doesn't apply alignment/anchoring correctly - 0000675: Setting position of a UniTrackbar at run time - ...

    oracle primavera unifier 21.12 新特征功能清单

    Unifier 20.12 - 21.12 Release Feature Overview Feature Release Bluebeam Integration Business Processes and the Document Manager can now integrate with the Bluebeam document review and markup platform...

    a project model for the FreeBSD Project.7z

    Ports is the collection of meta-data that is needed to make software packages build correctly on FreeBSD. An example of a port is the port for the web-browser Mozilla. It contains information about ...

    NativeXml-master

    * Core End-Of-Line style is LF, defaults CR-LF, LF and CR for Windows, Linux, Mac respectively ! Fixed EOL bug in source (thx Christian) * TsdChardata.GetCoreValue and .GetPlatformValue Version 4.02...

    eac3to V3.17

    * fixed: audio delay was incorrect when 1st m2ts part contained no audio data * fixed: very small WAV files were not detected correctly * fixed: "eac3to source.eac3 dest.dts -core" crashed v3.12 * ...

    k7 SRIO参考例程

    8. Core Release History 9. Legal Disclaimer ================================================================================ 1. INTRODUCTION For the most recent updates to the IP installation ...

    JPEG2000 C语言源代码全集

    quite a bit faster than it did in the first release of version 2.2. * Made provision for compiling under versions of GCC prior to version 3.0. To use this, you should define GCC_VERSION_LESS_THAN_3....

    Bochs - The cross platform IA-32 (x86) emulator

    - Include win64 native binary in the release. - Fixed failures on big endian hosts. - BIOS: Support for up to 2M ROM BIOS images. - GUI: select mouse capture toggle method in .bochsrc. - Ported most...

    jclazz-1.2.2

    字节码文件反编译器jclazz 1.2.2 Release -------------------- Release Date: 30 April, 2009 This is the release of jclazz version 1.2.2. 1. About jclazz is a crossplatform powerful Java bytecode ...

    qtcreator4.4.1.zip

    D'RELATIVE_LIBEXEC_PATH="../libexec/qtcreator"' -D'RELATIVE_DATA_PATH="../share/qtcreator"' -D'RELATIVE_DOC_PATH="../share/doc/qtcreator"' -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_...

    SpringMVC-Neo4j

    5.0.4.RELEASE org.neo4j neo4j 3.3.5 org.neo4j neo4j-ogm-embedded-driver 3.0.3 (jar包倒错,各种bug) 如果要发布项目还要导入以下的jar包 com.fasterxml.jackson.core jackson-databind 2.9.4 2.配置嵌入式...

    BobBuilder_app

    Even faster Key/Value store nosql embedded database engine utilizing the new MGIndex data structure with MurMur2 Hashing and WAH Bitmap indexes for duplicates. See Also More like this More by this...

    EurekaLog_7.5.0.0_Enterprise

    1)....Fixed: Added workaround for codegen bug in Delphi 7 (possibly - other), bug manifests itself as wrong date-time in reports or integer overflows 2)....Fixed: Some MAPI DLLs may not be loaded ...

    TMS Pack for FireMonkey2.3.0.1

    based on the core concepts of the FireMonkey framework: made up of styles, fully cross-platform, scalable and compatible with FireMonkey抯 effects, rotation, livebindings. Release 2.3.0.1: -------...

    Delphi7.1 Update

    Delphi 7.1 Update Release Notes=======================================================This file contains important supplemental and late-breakinginformation that may not appear in the main ...

    微软内部资料-SQL性能优化2

    To reserve or commit memory and unintentionally not release it when it is no longer being used. A process can leak resources such as process memory, pool memory, user and GDI objects, handles, threads...

    javacv-platform-1.3.3-src

    // Preload the opencv_objdetect module to work around a known bug. Loader.load(opencv_objdetect.class); // We can "cast" Pointer objects by instantiating a new object of the desired class. ...

Global site tag (gtag.js) - Google Analytics