<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-10-03 20:10 GMT+02:00 Georgios Moschovitis via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">I implemented a simple RSS feed aggregator. I used code like...<div><br><div>let data = try! Data(contentsOf: feedURL)</div></div><div><br></div><div>or</div><div><br></div><div>let session = URLSession(configuration: URLSessionConfiguration.<wbr>default)</div><div>let task = session.dataTask(with: url, completionHandler: completionHandler)<br>task.resume()</div><div><br></div><div>...to fetch the data.</div><div><br></div><div>While my application worked perfectly when running on macOS, when I tried to run</div><div>it on Ubuntu it started crashing <i>randomly</i> with errors like...</div><div><br></div><div>*** Error in `bin/….': double free or corruption (fasttop): 0x00007f3880000ff0 ***<br>Aborted</div><div><br></div><div>or</div><div><br></div><div>Illegal instruction</div><div><br></div><div>etc.</div></div></blockquote><div><br></div><div><br></div><div>I haven't seen it myself but I've heard from colleagues that we ran into the same issues on Android. Foundation depends on libcurl (on Linux at least?), so we're just going to make our own basic libcurl wrapper that looks and acts like URLSession until the Foundation one works.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>When I switched to KituraRequest (in place of URLSession), the application started</div><div>running correctly on Ubuntu as well.</div></div></blockquote><div><br></div><div>KituraRequest uses libcurl too, but its dependency tree is too complex for us to use on Android.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>Are there any issues with the implementation of Foundation for Linux?</div></div></blockquote><div><br></div><div>tldr; Pretty sure, yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>-g.</div></font></span><div><br></div><div><br></div><div>PS: I am using swift 4.0</div><div><br></div></div><br>______________________________<wbr>_________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">-g</div></div>