Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Crash when dearchiving Symbol objects #85

Closed
felixyz opened this Issue · 15 comments

4 participants

@felixyz

This gist illustrates the issue:
https://gist.github.com/felixyz/4949199
(Causes crash on RM 1.35)

In short, archiving and dearchiving instances of Symbol can cause a crash if the original context has gone out of scope. The issue doesn't seem to affect other classes (at least not String or Fixnum).

@felixyz

The crash is still present in RubyMotion 2.5. I've updated the gist with a crashlog.

@colinta
Owner

This gist has been removed... is the bug still present? Please reopen if so.

@colinta colinta closed this
@felixyz

@colinta I fixed the URL. I can't reopen, but please do and check whether this is still a problem in latest RM.

@colinta colinta reopened this
@colinta
Owner

Thanks!

@colinta
Owner

Yup there's definitely something fishy here:

(lldb) bt
* thread #1: tid = 0x1e67e, 0x001d2c1a libobjc.A.dylib`class_getSuperclass + 10, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x89004b3d)
  * frame #0: 0x001d2c1a libobjc.A.dylib`class_getSuperclass + 10
    frame #1: 0x000252dd foo`rb_objc_set_type + 109
    frame #2: 0x0000b842 foo`vm_rhash_store + 370
    frame #3: 0x0000c30c foo`rb_scope__crash__(self=0x09231640) + 348 at app_delegate.rb:13
    frame #4: 0x0000c77b foo`__unnamed_12 + 27
    frame #5: 0x01575de7 Foundation`__NSFireTimer + 97
    frame #6: ...
    frame #14: 0x00002cdc foo`main(argc=1, argv=0xbfffa280) + 156 at main.mm:15
(lldb) f 3
frame #3: 0x0000c30c foo`rb_scope__crash__(self=0x09231640) + 348 at app_delegate.rb:13
   10       # data = {"x" => "biff", "y" => "bam", "z" => "pow"}  # This does not crash
   11       # data = {1 => "biff", 2 => "bam", 3 => "pow"}  # Neither does this
-> 13       data = {x: "biff", y: "bam", z: "pow"} # But this does!
   15       @stuff << NSKeyedArchiver.archivedDataWithRootObject(data)
   16       puts "...crash"
@colinta
Owner

Actually, it crashes when it tries to create the hash, which is even stranger, I think!

@colinta
Owner

I'm filing this with motion support (this is a runtime issue, not a problem with the rake build system)

@colinta colinta closed this
@felixyz

Thanks for looking at it - too bad I reported in the wrong place (although I did tweet at @lrz when I discovered the bug).

@colinta
Owner
@jamonholmgren

@felixyz are we related?? Have never met another Holmgren in the development world.

@colinta
Owner

Haha @jamonholmgren I looked up his profile to see if he was also in the Northwest! :smiley:

@felixyz

@jamonholmgren Heh... Perhaps some distant (or not so distant) ancestor? I'm from Sweden. I assume your family is from here. Any idea wherefrom?

@Watson1978
Owner

This should be fixed with upcoming release http://hipbyte.myjetbrains.com/youtrack/issue/RM-510

@jamonholmgren

@felixyz We are probably distantly related! About 6 generations back, a Holmgren (swede) moved to Norway (Hammerfest area, waayyyy north). From there it was all Norwegians, but the Swedish name stuck. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.