realm / realm-swift

Realm is a mobile database: a replacement for Core Data & SQLite
https://realm.io
Apache License 2.0
16.32k stars 2.15k forks source link

crash after upgrade from 0.92.3 #2341

Closed pengj closed 9 years ago

pengj commented 9 years ago

Hi,

After upgrade from 0.92.3 (RealmSwift) to 0.92.4 or 0.94.0, app crashed at the same place when call let realm = Realm()

This crash occurs only when running on the devices. (No crashes occur on the simulators iOS 8.4)

Environment:

iOS 8.1.3 iPhone 5 Xcode 6.4 RealmSwift (0.92.4 to 0.94.0)

There is no output, only (lldb)

object_swift_and_slack
segiddins commented 9 years ago

@pengj are you sure it's not an exception being thrown, with a message? If not, having a project we can run would make investigating much easier, thanks!

Armenm commented 9 years ago

I also have crash on launch with version 0.94.0 Link to the crash http://crashes.to/s/ab443d71878

segiddins commented 9 years ago

@Armenm that crash looks like https://github.com/realm/realm-cocoa/issues/2332, and does not look like @pengj's crash.

Armenm commented 9 years ago

Thanks @segiddins for quick reply. Will comment there. Maybe it will help to fix the bug.

pengj commented 9 years ago

@segiddins There is no exception message being thrown when app crashed, the screenshot shows the moment when app crashed. I try to make a simple project to reproduce the error, but I can't reproduce it.

pengj commented 9 years ago

@segiddins When I configure the app build as release, there is no crash.

if build in debug, the crashed happen here:

@objc private class func indexedPropertiesForClass(type: AnyClass) -> NSArray? {
        if let type = type as? Object.Type {  <---- with error: `EXC_BAD_ACCESS(code=1, address = 0xc)`
            return type.indexedProperties() as NSArray?
        }
        return nil
    }
segiddins commented 9 years ago

@pengj in that case, since it's actually the swift standard library crashing and not Realm, and since you can't reproduce it, I'm going to close this issue for now. Feel free to re-open it if you see this happening again!

pengj commented 9 years ago

@segiddins see my updated comments

segiddins commented 9 years ago

Can you share the project with us so we can investigate? Thanks!

pengj commented 9 years ago

@segiddins I sent you a email with my project. Thanks for your help.

segiddins commented 9 years ago

@pengj I can't reproduce this on the iPad Mini 2 I have at hand. Are there any specific steps I need to take in order to see the error?

pengj commented 9 years ago

@segiddins the app crash when test in iPhone5 with iOS 8.1.3, it works for iPad air with iOS 8.4.

segiddins commented 9 years ago

@pengj I don't have an iOS 8.1.3 device around, but it worked fine on a 32 bit iPod touch running 8.3.

pengj commented 9 years ago

@segiddins I will close the issue for now. The crash only happens on iPhone 5 with iOS 8.1.3 as far as I can see, works well for simulator with iOS 8.1. If the build is configure as release rather than debug, it also works well. Let's wait if other developers have the same problem when update. Thanks for your help.