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

BAD_EXEC error in xCode 7.1 and ios 9.1 #4

Closed
srolesen opened this issue Oct 26, 2015 · 14 comments
Closed

BAD_EXEC error in xCode 7.1 and ios 9.1 #4

srolesen opened this issue Oct 26, 2015 · 14 comments

Comments

@srolesen
Copy link

after update to xCode 7.1 i'm getting the error:
Thread 1: EXC_BAD_ACCESS (code=1,adress=0x91)
on the line:
let lines : [String] = includeQuotedStringInFields(Fields:string.splitOnNewLine().filter{(includeElement: String) -> Bool in
...
i'm not really sure how to debug it, used to work a treat in xcode 7 :)

@Daniel1of1
Copy link
Owner

thanks for this - looking into it now

@srolesen
Copy link
Author

thanks!
let me know if you need any more info

@Daniel1of1
Copy link
Owner

@srolesen could you attach the csv that is causing this by any chance? Or perhaps if you have a test project? I'm not able to reproduce this error with my Xcode 7.1

@srolesen
Copy link
Author

sure, but to drop csv.txt files here I need write permission to this repo ?
BTW i'm calling CSwiftV like:

        let csv = CSwiftV(String: datastring as! String)
        rows = csv.rows

@Daniel1of1
Copy link
Owner

As long as you're sure datastring can be cast to a String :)

I would suggest doing this:

let string = datastring as! String
let csv = CSwiftV(String: string)
rows = cv.rows

Can you try that. I think you may get the bad access on the first line. I suspect there is a problem with what you are casting to String

@srolesen
Copy link
Author

I'm still getting the same error after your suggestion, debugger shows EXC_BAD
happens in line 30 CSwiftV.Swift same as before.

I'll paste content of CSV file printed to console in message after this, if that is helpful

@Daniel1of1
Copy link
Owner

yes please 👍

@srolesen
Copy link
Author

Optional(Tavler,føringsveje,Lysinstallation,Jording og Potentialeudligning,Kraftinstallationer,Nød og PanikBelysning,IT installation,Tilledninger

"Kontrol af opstilling, fastgørelse, fri plads.",Kontrol af placering og højde i henhold til tegninger,Kontrol af korrekte armaturtyper og korrekte afskærmninger,Kontrol af kabeltyper og dimensionering,Kontrol af materialevalg,Kontrol af korrekt placering i forhold til flugtveje og flugtdøre,Kontrol af kabelføring i korrekt spor,Kontrol af kabeltyper med hensyn til varmebestandighed og mekanisk styrke

Kontrol af indføring og montering af til og afgange.,"Kontrol af overfladebehandling, dimensioner og antallet af spor",Kontrol af armaturets korrekte placering i henhold til tegninger,Kontrol af hoved og potentialudlignings forbindelser til metallisk udsatte dele,"Kontrol af betjeningsorganer, hvad angår betjeningsvenlighed",Kontrol af grafik på armaturer,Kontrol af hele IT-installationen. Målerapporter,Kontrol af ledningsføring over nedhængte lofter til armaturer

Kontrol af sikringsstørelser.,"Kontrol af fastgørelse til bygningsdele, afstand mellem bæringer",Kontrol af at armaturet har tilstrækkelige varmeafledningsforhold,Kontrol af opmærkning af jordledere,"Kontrol af sikkerhedsafbryder og deres placering, hvad angår betjening",Kontrol af brændetid og opladetid for armaturer med lokal batteriforsyning,Kontrol af lyslederinstallationen. Målerapporter,Kontrol af ledningslængde og aflastning ved indføring i materiel og komponenter

"Kontrol af opmærkning, tilhørsforhold.",Placering i forhold til tilgængelighed,Kontrol af korrekt lyskildetype og farvegengivelse,,Kontrol af ledningers overbelastningsbeskyttelse,,,

"Kontrol af opmærkning, max. ampere.","Kontrol af lyd, brand og vandtætte gennemføringer",Kontrol af korrekt placering af synlige installationer i henhold til tegninger,,Kontrol af solid fastgørelse og placering medhensyn til service og betjening,,,

Kontrol af fasefølge,Kontrol af bøjningsradius og skarpe kanter,Kontrol af gruppefordeling på lysinstallationer,,Kontrol af alle installationer specielt med hensyn til sikkerhedsfunktioner,,,

Kontrol af isolationsmodstand,,Kontrol af lysinstallationer i fælles adgangsveje er fordelt på min. to faser,,Måling af fasefølge ved alle 3 fasede installationer inden permanent tilslutning,,,

"Kontrol af gennemgående forbindelse, beskyttelsesleder og udligningsforbindelse",,,,,,,

Kontrol af beskyttelse med fejlstrømsafbryder,,,,,,,

Kontrol af kabelmærker og opmærkning af jordledere.,,,,,,,

Kontrol af indstillingsværdier for beskyttelse og overvågningsudstyr.,,,,,,,

Afprøvning af den tilhørende installation.,,,,,,,)

@Daniel1of1
Copy link
Owner

awesome thanks so this is the dataString?

@srolesen
Copy link
Author

yeah
I think its UTF8 (google docs csv)

@Daniel1of1
Copy link
Owner

I'm afraid I'm still unable to reproduce. This is how I am attempting to reproduce: https://gist.github.com/Daniel1of1/e96ddb0f37bf26e7c7f6

If you don't have any sensitive data in it, I'd be happy to take a look at the project. Is it on github?

@srolesen
Copy link
Author

thank you for your gist!
I will ask if I can share project and try I can understand this problem better while I get permission.

@srolesen
Copy link
Author

Thank you for all your help!!!
It turns out that the datastring I passed to CSwiftV was not getting passed to CSwiftV at all!!!!
it doesn't really make sense that it would not get passed, when I print it out from just above where I call CSwiftV I get the string, when I print it out from CSwiftV i get nothing!
When I do the exact same thing in a test project I get the string in CSwiftV as expected.
So the bug was never a CSwiftV problem but an xCode problem, I had allready tried "clean" the project, but after:
window -> product -> [clean derived data]
everything magically works again!!!!!
Thank you again for helping me understand where the problem was 👍

@Daniel1of1
Copy link
Owner

Great to hear 👍 I'll close the issue. Thanks for the feedback.

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

2 participants