RMPath and iOS5

49 views
Skip to first unread message

Mark Rabenhorst

unread,
Oct 14, 2011, 12:51:39 PM10/14/11
to route-me
Is anyone else having problems with the iPhone and setting up an
RMPath?

I am getting this crash log:

0 CoreFoundation 0x31b618bf __exceptionPreprocess +
163
1 libobjc.A.dylib 0x318d11e5 objc_exception_throw +
33
2 CoreFoundation 0x31b64acb -[NSObject
doesNotRecognizeSelector:] + 175
3 CoreFoundation 0x31b63945 ___forwarding___ + 301
4 CoreFoundation 0x31abe680 _CF_forwarding_prep_0 +
48
5 <App Name> 0x00082d65 -[RMPath initForMap:]
(RMPath.m:86)

The code in my App that causes the error is:

distancePath = [[RMPath alloc] initForMap:mapView];

Is there something wrong with the way RMPath inits?

Thanks a lot for any help!
-Mark

shenstech

unread,
Oct 14, 2011, 2:55:14 PM10/14/11
to route-me
Have you tried using the initWithContents method instead for your
RMPath allocation? I haven't worked with route-me for a few months,
but went back and checked out my previous project and that's what I
had used. I can't say for sure, but I'm pretty sure you can just
request the contents from the mapview, via [myMapView mapContents].
It's worth a shot!

On Oct 14, 12:51 pm, Mark Rabenhorst

Mark Rabenhorst

unread,
Oct 14, 2011, 3:22:36 PM10/14/11
to route-...@googlegroups.com
Yeah, I did tried that as well - no joy. When I have the debugger running, "aContent" in initWithContents: isn't nil but it "appears not to point to a valid object". However, the transfer of information from "aContent" to the RMPath's "mapContents" variable appears to work just fine. In fact, I used NSLog() to print out "minZoom" from "aContent" and it responded just fine. The problem is that the error doesn't come up when I use XCode to debug it. It only comes up when the device runs it independently (Yey Apple...).

I also had a problem last night with RMMarker. When I removed RMMarker from the markerManager, the retain count on RMMarker went down 2 points in an iOS5 simulator. I tried it again 1 moment later in the iOS 4.3 simulator and the retain count only goes down 1 point. 

Something really fishy is going on... and it smells like Crappie.

-Mark

From: shenstech [mailto:shen...@saucontech.com]
To: route-me [mailto:route-...@googlegroups.com]
Sent: Fri, 14 Oct 2011 14:55:14 -0400
Subject: [route-me] Re: RMPath and iOS5
--
You received this message because you are subscribed to the Google Groups "route-me" group.
To post to this group, send email to route-...@googlegroups.com.
To unsubscribe from this group, send email to route-me-map...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/route-me-map?hl=en.

Randall Carver

unread,
Oct 23, 2011, 9:11:27 AM10/23/11
to route-...@googlegroups.com
RMPath and initForMap are working fine for me on os5 (and all the betas leading up to the release).   I haven't updated my route-me source in a couple of weeks, and I haven't checked the commits, but what you're doing looks fine.  

Only diff from you is that I'm subclassing RMPath, but I'm not touching the init code and it shouldn't matter.

-- Randy

Mark Rabenhorst

unread,
Oct 31, 2011, 9:36:44 PM10/31/11
to route-me
My apologies for not posting this sooner...

Apparently the problem wasn't with RMPath at all. It was the fact that
I didn't reference my map object before I made a path for it.
Apparently, using Interface builder to create the map causes some
problems with iOS5. You have to indicate to the program that you are
indeed going to use the class or else things go nuts. So I just added
this: [RMMapView class]; to the first line of my code and everything
worked.

-Mark

On Oct 23, 9:11 am, Randall Carver <randall.paul.car...@gmail.com>
wrote:

Andrew Johnson

unread,
Oct 31, 2011, 9:37:36 PM10/31/11
to route-...@googlegroups.com
Interface Builder is the devil. We have never used it.


Andrew Johnson
Co-founder




--
You received this message because you are subscribed to the Google Groups "route-me" group.

Mark Rabenhorst

unread,
Oct 31, 2011, 11:03:00 PM10/31/11
to route-me
So I am finding out. I will probably go back and remove that one of
these days. The only thing I have found more frustrating than IB is
screen orientation.
Reply all
Reply to author
Forward
0 new messages