Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect / contentsOfDirectoryAtPath fail on Xcode10.2.1 (iOS 11/12) #28

Closed
fabiosoft opened this issue Jun 27, 2019 · 13 comments
Closed

Comments

@fabiosoft
Copy link

The method while connecting or trying to get contents listing (I assume because it's never reached), hangs...and after a very long timeout no completion is called and nothing is returned. If in my code a execute again it crashes on bindMemory method.

How can I solve? I need latest Xcode version to support iOS12.

I already updated to latest (2.0) git release
Tested on with Xcode 10.1 (AMSMB v1.7.0) everything works. I cannot test the latest due to swift 5.0 compatibility

@amosavian
Copy link
Owner

Please run tests on your computer. You must change server address and share name in tests.

@fabiosoft
Copy link
Author

fabiosoft commented Jun 28, 2019

You are free to not believe but tests pass but in a project it hangs and stop and no completion is ever called... I'm getting crazy....

Sometimes it crashes on this line in Context.swift

Schermata 2019-06-28 alle 17 03 16

@fabiosoft
Copy link
Author

Also...how is possibile that with the same code on Xcode10.1 works perfectly and with latest version all is broken?

@amosavian
Copy link
Owner

It's not about believing or not, I should be able to reproduce the exact issue in order to debug. Please create a sample project at least.

@fabiosoft
Copy link
Author

I prepared a sample and systematically every time timeout expires I get EXC_BAD_ACCESS
Let me know if there is a mistake or an issue

Thanks so much

sample_smb.zip

@fabiosoft
Copy link
Author

Any news?

@emilhornlund
Copy link

I have the same problem. However, the problem does not appear to be in listFolderContents but in listShares where the crash actually occurs, eventually after the timeout. It is not a huge problem as it only occurs in the simulator. At least in my case. When I have more time I will do more thorough testing.

@fabiosoft
Copy link
Author

@emilhornlund that's very interesting, what's your environment? Xcode/iOS version?

@emilhornlund
Copy link

macOS 10.14.5, Xcode 10.2.1, Simulator 12.2, iPhone 12.1.2

@fabiosoft
Copy link
Author

i'll try it out

@fabiosoft
Copy link
Author

fabiosoft commented Jul 5, 2019

@emilhornlund i have some updates:

  • Ok on macOS 10.14.3, Xcode 10.2.1, iPhone 12.3.1
  • Not working on macOS 10.14.5, Xcode 10.2.1, iPhone 12.x
  • On simulator only works if using Xcode 10.1 and AMSMB v 1.7.x, otherwise crash every timeout.

I tried samba server hosted on macOS 10.14, and 10.13 no difference.
I think something changes during build....but what? @amosavian do you have any ideas?

@fabiosoft fabiosoft mentioned this issue Jul 5, 2019
@amosavian
Copy link
Owner

Hi, I'm busy on deadlines right now. I shall investigate but it appears it is an issue in Swift runtime on specific version.
listShares has two versions internally. Would you mind check if _swift_listShares function works in tests or not? If it works, I can fallback to that implementation in these problematic versions.

@Stermop
Copy link

Stermop commented Aug 20, 2019

I have the same problem, crash happens in any possible situation, not just in simulator or specific macOS version. Is there a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants