senojsitruc / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
0 stars 0 forks source link

Runtime errors with proxy classes built using ARC (build 224, /branch/stephane) #170

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have included the wsdl that created the proxy classes
2. I used "/branches/stephane" build 224 to run the CLI and build the proxy 
classes
3. I created a project, used ARC, the prescribed linker and compiler flags and 
received the errors. 

What is the expected output? A clean build. 

What do you see instead?

Once I do a "build"  , I see 
"Semantic Issue"
PerformSelector names a selector which retains the object
 I have 4 such errors with the proxies built by this particular wsdl (See attached files)

What version of the product are you using? On what operating system?
The proxies were built with r224 (/branches/stephane)
MACOS 10.7.2
XCode 4.2

Please provide any additional information below.

I've also included a screen shot from XCODE to further illustrate the problem

NOTE: I also built a set of proxies using the general release of wsdl2objc, a 
non-ARC project, and it worked fine.

Original issue reported on code.google.com by vdipre...@gmail.com on 8 Feb 2012 at 3:49

Attachments:

GoogleCodeExporter commented 9 years ago
I have exactly the same problem :)

Original comment by abarr...@gmail.com on 8 Mar 2012 at 5:47

GoogleCodeExporter commented 9 years ago
Same issue here! Please help!

Original comment by dord...@gmail.com on 12 Mar 2012 at 12:24

GoogleCodeExporter commented 9 years ago
Is there an easy way to fix this? maybe edit it out?

Original comment by Shaha...@gmail.com on 23 Mar 2012 at 6:17

GoogleCodeExporter commented 9 years ago
I found a workaround, at least temporarily. Unfortunately I couldn't get the 
ARC capabilities to work in wsdl2objc so here's what I did:

1. Check out the Xcode Users Guide.. Find the section under "Modernization", 
"Automatic Reference Counting"
2. Inside X-Code edit->refactor->convert to Objective-c ARC
3. After the conversion there were still a few autoreleases that had to get 
commented out. (not hundreds like before)
4. Look closely at your responses. I wasn't getting any return values. I 
checked closer using the debugger and had to do the following in about 3 places

// DisplayCaseServiceSoap11BindingResponse *__weak response;     // vjd  *** 
NASTY *** will not return any values. Change to line below
    DisplayCaseServiceSoap11BindingResponse *response;  

I know this is unpleasant stuff, but it seems to do the trick. I would much 
rather see the wsdl2objc utility take on the burden. I'm sure it will at some 
point..

Good luck!

Vinnie

Original comment by vdipre...@gmail.com on 23 Mar 2012 at 7:09

GoogleCodeExporter commented 9 years ago
what about this workaround?

In Targets->Build Phases-> Compile Sources
For all the wsdl2objc sources add: -fno-obcj-arc

Clean & build again.

That'll will remove the need for that branch - and will give you ARC in your 
project

Original comment by Shaha...@gmail.com on 23 Mar 2012 at 7:11

GoogleCodeExporter commented 9 years ago
That actually sounds better than what I did. I'll give it a try. -- Vinnie

Original comment by vdipre...@gmail.com on 23 Mar 2012 at 7:21

GoogleCodeExporter commented 9 years ago
Please post if find any issues (memory leaks especially) with the no-objc-arc 
workaround.
Thanks :)

Original comment by Shaha...@gmail.com on 23 Mar 2012 at 7:24

GoogleCodeExporter commented 9 years ago
Is there a better solution for this? I mean this actually disables ARC on 
WSDL2OBJC generated code. I think there should be a replacement for this code 
also..

Original comment by plat...@gmail.com on 17 Apr 2012 at 8:32

GoogleCodeExporter commented 9 years ago
Check my comment (#5) - this is how I work currently - it's actually pretty 
easy to do - and there's no hassel.

Even if you update the generated WSDL code - just overwrite the files.

Original comment by Shaha...@gmail.com on 17 Apr 2012 at 3:45

GoogleCodeExporter commented 9 years ago
I did try that solution.. But the thing is I still got performselector error

Original comment by plat...@gmail.com on 17 Apr 2012 at 5:45

GoogleCodeExporter commented 9 years ago
you need to use the wsdl2objc 0.7-pre1 to generate the WSDL

and then add "-fno-objc-arc" to all the m files in the generated WSDL folder 
once you include to the project.

Original comment by Shaha...@gmail.com on 17 Apr 2012 at 6:36

GoogleCodeExporter commented 9 years ago
Hm I'm getting the same issue with Xcode 4.3.2 in an ARC project after 
compiling the stephane branch and generating my proxy classes.

So the solution is to not use the branch and simply use -fno-objc-arc on the 
proxy classes when compiling in your project?

Original comment by trup...@gmail.com on 20 Apr 2012 at 3:22

GoogleCodeExporter commented 9 years ago
K the -fno-objc-arc flag on just the proxy classes seems to have gotten me past 
it. Here's hoping it still works as it should though.

Original comment by trup...@gmail.com on 20 Apr 2012 at 3:30

GoogleCodeExporter commented 9 years ago
I can say from experience it works (the SOAP actually works).
what I havent tested for is if there no memory leaks due to the no-objc-arc.

Original comment by Shaha...@gmail.com on 20 Apr 2012 at 3:34