infinitered / ProMotion-menu

RubyMotion gem allowing you to easily setup a facebook or Path style hidden slide menu easily with the ProMotion gem.
74 stars 29 forks source link

unrecognized runtime type #18

Closed markrickert closed 10 years ago

markrickert commented 10 years ago

I'm starting with a fairly clean app.

Put the gem into my Gemfile, ran rake pod:install and then rake and I get this:

2014-01-13 18:43:51.051 ruby[96154:d0f] unrecognized runtime type `{PKRevealController=#@@@@@@@@@@@@@@@@@@@@@@@@iii@@{CGSize=ff}{CGSize=ff}@@?i@{?=b2b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1}}' (TypeError)
2014-01-13 18:43:51.054 ruby[96154:d0f] *** Terminating app due to uncaught exception 'TypeError', reason: 'unrecognized runtime type `{PKRevealController=#@@@@@@@@@@@@@@@@@@@@@@@@iii@@{CGSize=ff}{CGSize=ff}@@?i@{?=b2b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1}}' (TypeError)
'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x957c36b1 __raiseError + 193
    1   libobjc.A.dylib                     0x97d28091 objc_exception_throw + 162
    2   ruby                                0x0014530a rb_vm_raise_current_exception + 506
    3   ruby                                0x001453bf rb_vm_raise + 175
    4   ruby                                0x0002c721 rb_exc_raise + 17
    5   ruby                                0x00028ea2 rb_raise + 146
    6   ruby                                0x0011c9ac _ZN13RoxorCompiler12convert_typeEPKc + 732
    7   ruby                                0x0012136e _ZN13RoxorCompiler12compile_stubEPKcbii + 3070
    8   ruby                                0x00166149 _ZN16RoxorAOTCompiler20compile_static_stubsEv + 2777
    9   ruby                                0x0016bf20 _ZN16RoxorAOTCompiler23compile_static_bs_filesEv + 160
    10  ruby                                0x0011992d _ZN16RoxorAOTCompiler21compile_init_functionERSt6vectorIPN4llvm8FunctionESaIS3_EE + 5757
    11  ruby                                0x00146cf7 rb_vm_aot_compile + 487
    12  ruby                                0x00093090 ruby_process_options + 416
    13  ruby                                0x000e6c69 main + 137
    14  ruby                                0x00002a35 start + 53
)

I also tried manually including the PKRevealController in my Rakefile and doing a rake clean:all but to no avail.

Thoughts?

jamonholmgren commented 10 years ago

Mark, I spun up a blank PM project and added the gem and am not getting an error.

https://github.com/jamonholmgren/pmsm_issue_18

markrickert commented 10 years ago

Cyclical error report here: http://hipbyte.myjetbrains.com/youtrack/issue/RM-361

jamonholmgren commented 10 years ago

If you clone my demo app, does it cause a problem on your machine Mark?

markrickert commented 10 years ago

I'm trying to debug and narrow it down to what is causing the issue... if i copy my gemfile and rakefile over, it happens.

markrickert commented 10 years ago

I'm glad i got this new MBPro... running bundle install && rake clean:all && rake pod:install && rake takes a toll on the processor!

markrickert commented 10 years ago

OK... I've got it. add:

gem 'formotion'

to the Gemfile. BOOM. Reproducible.

WTF? Why would formotion cause this error in a DIFFERENT vendored objective-c library?

Any ideas, @clayallsopp ?

clayallsopp commented 10 years ago

Most definitely appears to be a RubyMotion bug

alloy commented 10 years ago

What @clayallsopp said (which is why we already have the ticket tracking it). One thing you can do, as a workaround, is to manually fix the BridgeSupport metadata that’s generated for PKRevealController.

macfanatic commented 10 years ago

Hey @markrickert - was there a new release of RM that fixes this issue? If so just wanted to make a note of what version of RM you should be using (or higher) and close this. Thanks!

markrickert commented 10 years ago

Not yet. I switched to a fork (and branched it) that uses ECSlidingViewController but it's iOS 7 only, so not sure if you want to switch the main repository or not.

I forked from this one: https://github.com/josch1710/promotion_slide_menu/tree/ECSlidingViewController and here's the fork I'm successfully using in my app: https://github.com/markrickert/promotion_slide_menu/tree/ECSlidingViewController

GantMan commented 10 years ago

Temporary fix, edit the PKRevealController.h

Find the three lines that look like this: typedef enum : NSUInteger And make them look like this: typedef enum // : NSUInteger Commenting out the forced typedef name, makes it compile correctly.