trenskow / AirFloat

Implementation of AirPlay audio (AirTunes) for iOS.
509 stars 112 forks source link

App crashes at splash screen #6

Open elseym opened 11 years ago

elseym commented 11 years ago

On iPhone 5, iOS 6.1, the app starts, after 1 second displays what I believe to be a splash screen, then crashes.

robinfdx commented 11 years ago

I have the same problem with my iPod Touch 2G iOS 4.2.1. But it's ok in my iPhone 5 iOS 6.1.

davhelm commented 11 years ago

Same here, wasn't working for iPod Touch 2g iOS 4.2.1. Current version installed from the APT repo crashes after the initial splash screen. Looks like the minimum iOS requirement for this app is 4.3 at the moment.

@elseym I'm not sure why it would not work on your iOS 6.1 iPhone 5, it seems like the latest build was intended specifically to work on that device. If you could share a crash dump from the app then that might shed some light on the subject.

Long-winded explanation:

The crash report for the app, as originally installed from APT repo, contained the following. Dyld Error Message: Symbol not found: __dispatch_queue_attr_concurrent Referenced from: /Applications/AirFloat.app/AirFloat Expected in: /usr/lib/libSystem.B.dylib in /Applications/AirFloat.app/AirFloat Dyld Version: 179.7

__dispatch_queue_attr_concurrent wasn't introduced until iOS 4.3.

Had to download the source repo, made sure minimum iOS was 4.2 and armv6 was target arch, and built in Xcode 4.4.

Got it to run on my iOS 4.2.1 iPod 2G, where show the attract screens while it waits for a connection, but the app would crash when I would tell iTunes to connect to it as an AirPlay speaker device.

Turns out WebConnection.cpp uses memmem() which isn't introduced until OSX 10.7/iOS 4.3 (https://github.com/Apple-FOSS-Mirror/Libc/blob/master/include/string.h#L167).

Found a workaround for that too...not pretty and not fit for distribution, but at least it's working -- listening to Slayer right now.

trenskow commented 11 years ago

I can confirm, that a lot of people are complaining that it does not work on iPod Touch 2G and below. I will see if I can find such an iPod, and then test it out.

trenskow commented 11 years ago

@davhelm Sorry for my blunt answer earlier today. Was in a hurry, and didn't realize you actually made it work. Thanks for all the info! I will be updating the repo with the changes very soon!

davhelm commented 11 years ago

@trenskow oh no offense taken, didn't read it that way at all. Would be happy to provide you with a packaged form of what I have, if you'd like.

davhelm commented 11 years ago

Looks like your commit 0fbb32e641 in dev from 2 days ago took care of the memmem issue on iOS 4.2. I had downloaded from master 3 days ago and was still working on that pull when I posted.

Based on that, no source code changes necessary for the project to run on iOS 4.2, just modification to the arch and iphoneos_deployment_target variables in the Xcode projects and built. Running fine on my Touch 2G device. I pushed my changes to a fork, but they're pretty minor now.

cvdwl commented 11 years ago

Is there a chance the Cydia version will be fixed for iOS 4.2, or is that left as an exercise for the student?

trenskow commented 11 years ago

@cvdwl It will be fixed on Cydia.

@davhelm Could you eventually sent a pull request on the dev branch?

cvdwl commented 11 years ago

Thanks!

This (also ShairPort) is precisely the app I've been seeking for quite some time. As an aside, it works brilliantly on my 1G iPad. I'll assume a build for the archaic touch 1G is out of the question, but keeping the 2G still useful is a nice bonus.

davhelm commented 11 years ago

@trenskow sure, I'll take care of that now.

I'd like to read up on building armv6 and armv7 binaries in the same app, so those of us stuck on 4.2 can benefit, but those running the later devices can still benefit from armv7 optimizations. Right now my xcodeproject changes make the build armv6 only, which should still work but isn't optimal.

dahjelle commented 11 years ago

Looking forward to the update on Cydia so I can run this on my iPod Touch 2G. Thanks for your work!

ghost commented 11 years ago

Hello! I was just wondering if there has been any progress with the update for iOS 4.2.1? Your app is great and i've been looking for this exact type of program ever since i got my iPad 2 years ago. Sorry to bug you with this but Im just very anxious to run this on my iPod touch 2G, any hint to where your progress is at or maybe the release of the update would be wonderful!

Thanks! and keep up the awesome work!

phriedrich commented 11 years ago

@davhelm Would you mind to share the built app? I've seen your repo, but couldn't get it working with current Xcode … Many thanks!

davhelm commented 11 years ago

I've uploaded a zip file of the last build of my fork to SourceForge, which can be downloaded from http://sourceforge.net/projects/airfloatdhfork/files/latest/download

The preferences screen won't work in this version because it is unsigned. All preferences are based at their defaults. If you can wait for trenskow to release an updated build to Cydia, I'd recommend doing so. That way, you won't have to bother with the mess of instructions I've just written...

You will need to be familiar with an ios-compatible file manager (I use iExplorer on Mac OS X so I can browse the root file system of my iOS devices). You will also need to be familiar with ssh for the final commands to make the app actually runnable.

Instructions:

  1. Uninstall any previous version of AirFloat you had through Cydia. I have no idea how a system would react if you did not uninstall first, so to be safe, do that.
  2. Unpack the ZIP file. There should only be an AirFloat.app bundle in it.
  3. Using your favorite file system manager of choice, copy the AirFloat.app bundle to the /Applications folder in your iOS system root.
  4. Open an SSH session to your iOS device (either on the device itself through something like MobileTerm, or over the network using your favorite ssh client).
  5. Execute the following commands: "cd /Applications/AirFloat.app" followed by "chmod 755 AirFloat"
  6. Exit your ssh session, and Respring, or restart your device.
  7. AirFloat should now be available on one of your home screens.
  8. To uninstall, simply use your iOS file system manager and delete the /Applications/AirFloat.app bundle.
phriedrich commented 11 years ago

It's working, great job! Many thanks!

(I just copied the AirFloat binary from inside the updated app-folder into the cydia installed app folder. Worked directly.)

Ilinus commented 11 years ago

is the program ment to run on 3g also? because i followed your installation steps and the app still crashes on startup screen... any advice? thank you!

davhelm commented 11 years ago

It should run on an iPhone 3G, assuming it's jailbroken and running iOS 4.2.1. The only things I would say with certainty that it will not run on are the original iPhone and the iPod Touch 1st gen, because they can't run iOS 4.2.1.

Only suggestion I can make, sight unseen, is to ensure the commands in step 5 are followed so that the binary inside the app is actually marked as executable. When I was first playing around with dropping the app directly onto my iOS device, the app would still crash at startup. Turned out the program I used to copy the app onto my device would not copy the mode of files, so things like the execute bit were lost.

According to phriedrich, you may be able to use the Cydia version and just replace the AirFloat binary itself (a single file inside the AirFloat.app bundle). Haven't tried that myself.

Depending on the program you use to copy the binary onto your device, you still may need to change the file's mode using chmod so that it's marked as executable.

davhelm commented 11 years ago

@Ilinus I should clarify, I was assuming you were asking about the build I posted for download above. If you're using the version available on Cydia right now, that does not run on iPhone 3G at the moment. A fix is being worked on.

Ilinus commented 11 years ago

thank you very much, up and running! it was a problem with step 5 as you mentioned, used iFile to set the rights.

davhelm commented 11 years ago

I've pushed a new version of the app to SourceForge based on changes by @trenskow in the new C branch.

You can download a build at http://sourceforge.net/projects/airfloatdhfork/files/AirFloat_c.zip/download if you'd like to try it on your own iOS devices. I've tested it on my iPod Touch 2G and 5G.

Instructions on "installing" the app on your device remain the same as https://github.com/trenskow/AirFloat/issues/6#issuecomment-15124247.

hunderpants commented 11 years ago

I've been trying to find an airport express on craigslist and a friend referred me to this app. I had the same splash screen crash occur on an iPhone 3G. After installing the file found on Cydia (today April 9th, 2013). I found this post and followed @davhelm 's instructions and everything worked perfectly! Thanks for keeping this thread up to date!

robert1356 commented 11 years ago

@davhelm I installed this on a 3G running 4.2.1 and it works well - thanks for the updates.

Middlerig commented 11 years ago

@davhelm I loaded the Apr 6 download to my old iPhone 3. It runs and allows itunes to connect but I have only ever seen the album artwork and 2 bars or less of a tune before it distorts and stops working. Is the iPhone 3 too slow? it is using 4.2.1- thanks for the update anyway.

hunderpants commented 11 years ago

@Middlerig I had the same issue the first time it loaded, but it never happened again and has worked perfectly ever since. Even when boasting to my friends (that's always when things fail) I'm running iPhone 3G, 4.2.1 as well. I'm curious, when you installed Cydia, did you enable multi-tasking?

@davhelm I've been able to use the play/pause function from my phone. It works pretty well aside from issues with latency. Not sure if this was mentioned in the list of revisions.

Love this app.

Middlerig commented 11 years ago

@davhelm I've just tried it again and find that I get a bar of music then 15 or 20 seconds later another. Seems like a speed/buffering issue. No idea about multitasking in Cydia. I just let it install and I do not remember having to select any option. Is there a way of checking/changing the status now that it is installed?

Middlerig commented 11 years ago

@hunderpants I've just tried it again and find that I get a bar of music then 15 or 20 seconds later another. Seems like a speed/buffering issue. No idea about multitasking in Cydia. I just let it install and I do not remember having to select any option. Is there a way of checking/changing the status now that it is installed?

Jocala commented 11 years ago

No joy. I'm running an iPod 2G 4.2.1. I jailbroke with redsnow and requested multitasking. I had the splash screen crash, replaced the app with the zip above and the app starts. However, iTunes (OS X) won't connect to it. I get a "connecting to" progress bar that just spins, then goes away without message. Pity, this app is just what I need.

davhelm commented 11 years ago

@Middlerig iPhone 3G is basically the same hardware as the Touch 2G. I, too, have some stuttering once in a while. Seems to get worse if I have a lot of traffic on my WiFi network.

I have multitasking enabled right now, but I plan on disabling it soon. The iPhone 3G/iPod Touch 2G really don't handle it very well. I'm hoping that will help with the periodic stuttering I encounter.

For those unfamiliar with the process, http://www.iclarified.com/entry/index.php?enid=8915 has a fairly easy to follow process on enabling multitasking on a jailbroken device, and the same can be followed to disable it (just change step 11 to find the multitasking entry already in the plist file and uncheck it).

davhelm commented 11 years ago

@Jocala I have run into that as well, where it just tries connecting perpetually and never finishes. I found that to happen consistently if I wasn't already playing a track in iTunes. If I already had something playing and then try to connect, it works every time (except when my iPod Touch 2G flakes out, but I blame my weak hardware on that one).

Jocala commented 11 years ago

Thanks, davhelm. I gave this a try and it worked...once! After the first try even with a track playing the connect just timed out :( I re-jailbroke to enable multitasking and again to disable it, no change either way.

Middlerig commented 11 years ago

@davhelm Found something that could be of interest. After airfloat has connected and played its one bar and hung it seems that wifi has stopped. The phone has changed to cellular data. This could be the reason for only getting only a small burst of audio. Moreover if I disable cellular data totally airfloat never connects. Itunes can see it but it just never seems to start playing or show any artwork. iTunes however does not report a connection failure.

Middlerig commented 11 years ago

@davhelm Slight correction to what I said. Itunes wasn't playing at the time. When it is playing it will connect and play one bar. Wifi packs up and the iphone says "Cellular data is turned off" "turn on or use wifi to access data" Trying another access point it is stable but only plays one bar every 20 seconds or so.

peachtree1 commented 11 years ago

Joined just to say thx. I downloaded the new package and followed your instructions and was able to get it working on an iPhone3G running iOS4.2.1 (latest version as of this writing)

Jocala commented 11 years ago

Working well for me after a router reboot!

cvdwl commented 11 years ago

Finally got around to doing this. Worked perfectly, thanks!

trenskow commented 11 years ago

The iOS 4.2 version provided by @davhelm is now in Cydia. Thanks @davhelm!

davhelm commented 11 years ago

@trenskow very welcome, it was my pleasure. Thank you for writing this fantastic app!

trenskow commented 11 years ago

@davhelm I've updated the app (remark that c branch is now merged into dev). Can you test if it works properly on iOS 4.2? If so, I will submit to Cydia today. I don't have any 4.2 devices.

davhelm commented 11 years ago

@trenskow Just downloaded the dev branch and built. Worked perfectly on my iOS 4.2 device, so I'd say it's good to go.

trenskow commented 11 years ago

@davhelm Thanks! It has been submitted.

lcfrederico commented 11 years ago

Hi! It's crashing on my iPhone 3GS 5.1.1 but working flawless @ 4 5.1.1 & 4S 6.1.2. 1 - any clue about 3GS issue? 2 - Is there any chance (or workaround) to get this working background?

Thanks!!

Fred

davhelm commented 11 years ago

@lcfrederico hmm, interesting. Assuming these are all v1.3 installed from Cydia, your 3GS with 5.1.1 should be using the same code as the iphone 4 and 4S. I've only had the ipod 2G 4.2.1 and ipod 5G 6.1.2 to test with. Can you provide any crash logs?

trenskow commented 11 years ago

Hi all. I am looking into the situation. I don't have any crash logs. Can any of you provide this?

Middlerig commented 11 years ago

No crash on my 3G 4.2.1 just unable to play more than a note or two before the WiFi shuts off. Happy to send you any data off the phone if you tell me what and where.

regards Richard

----- Original Message ----- From: Kristian Trenskow To: trenskow/AirFloat Cc: Middlerig Sent: Monday, May 13, 2013 10:16 AM Subject: Re: [AirFloat] App crashes splash screen (#6)

Hi all. I am looking into the situation. I don't have any crash logs. Can any of you provide this?

— Reply to this email directly or view it on GitHub.

lcfrederico commented 11 years ago

Sure!

How can I do that?

Thanks!

Fred

Em 12/05/2013, às 16:53, davhelm notifications@github.com escreveu:

@lcfrederico hmm, interesting. Assuming these are all v1.3 installed from Cydia, your 3GS with 5.1.1 should be using the same code as the iphone 4 and 4S. I've only had the ipod 2G 4.2.1 and ipod 5G 6.1.2 to test with. Can you provide any crash logs?

— Reply to this email directly or view it on GitHub.

lcfrederico commented 11 years ago

And, how about make it working in background?

rcrider4 commented 11 years ago

I'm trying to install AirFloat onto an iPod Touch 4G on iOS 5.1.1, but it crashes the moment I open it. I have tried reinstalling, and removing and installing but it still just crashes the moment I open it. There are no crash logs in Crash Reporter for AirFloat, so I can't give you that. Is there another place to look for the crash log?

robert1356 commented 11 years ago

I just deleted the version I had installed from here (it was working) and installed the Cydia version. I'm on a 3G running 4.2.1. I get a blank screen, then it crashes. I can send you the crash logs or post them, just tell me how/where. The good news is that the crash is in exactly the same place every time. According to the crash log, it's a symbol not found "__dispatch_queue_attr_concurrent" expected in the lib libSystem.B.dylib

trenskow commented 11 years ago

Send it to trenskow@me.com . I am pretty much clueless on this one.

Thanks!

davhelm commented 11 years ago

@robert1356 That is odd, it sounds like the same issue I ran into from an earlier comment on https://github.com/trenskow/AirFloat/issues/6#issuecomment-13873147. Had you forced a respring between deleting the build from here and re-installing from Cydia?