Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone EXC\u访问错误\u连接_Iphone_Nsurlconnection_Exc Bad Access_Nszombie - Fatal编程技术网

Iphone EXC\u访问错误\u连接

Iphone EXC\u访问错误\u连接,iphone,nsurlconnection,exc-bad-access,nszombie,Iphone,Nsurlconnection,Exc Bad Access,Nszombie,当我执行函数的最后一行(webData)时,我获得了一个EXC\u BAD\u访问权限 我尽量不发布任何东西,因为我在网上看到的是,它几乎总是一个记忆的东西 当我调试代码时(NSZombieEnabled=YES)我得到的是: [Session started at 2010-05-31 15:56:13 +0200.] GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar 5 04:43:10 UTC 2010) Copyri

当我执行函数的最后一行(webData)时,我获得了一个
EXC\u BAD\u访问权限

我尽量不发布任何东西,因为我在网上看到的是,它几乎总是一个记忆的东西

当我调试代码时(NSZombieEnabled=YES)
我得到的是:

[Session started at 2010-05-31 15:56:13 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar  5 04:43:10 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 19856.
test(19856) malloc: recording malloc stacks to disk using standard recorder
test(19856) malloc: enabling scribbling to detect mods to free blocks
test(19856) malloc: process 19832 no longer exists, stack logs deleted from /tmp/stack-logs.19832.test.w9Ek4L.index
test(19856) malloc: stack logs being written into /tmp/stack-logs.19856.test.URRpQF.index
Program received signal:  “EXC_BAD_ACCESS”.

有人有线索吗?

error
变量的定义中有一个错误。你应该使用

NSError *error;
而不是

NSError **error; // There is a '*' too much here
然后,当您将其传递给发送同步请求:返回响应:错误:时,您应该使用
&error
传递其地址:

[NSURLConnection sendSynchronousRequest:theRequest
                      returningResponse:&response
                                  error:&error];

error
变量的定义中存在错误。你应该使用

NSError *error;
而不是

NSError **error; // There is a '*' too much here
然后,当您将其传递给发送同步请求:返回响应:错误:时,您应该使用
&error
传递其地址:

[NSURLConnection sendSynchronousRequest:theRequest
                      returningResponse:&response
                                  error:&error];

“N错误**错误”似乎有一个*太多了。此外,当将错误传递给“发送同步”pas时,将其作为&error存储错误地址。使用一系列断点,您可以准确确定导致执行的行。>他“NSError**error”似乎有一个*太多。同样,当将错误传递给“发送同步”pas时,将其作为&错误来存储错误地址。很好,瑞奇,我只是没看到。真是个笨蛋。非常感谢!!“N错误**错误”似乎有一个*太多了。此外,当将错误传递给“发送同步”pas时,将其作为&error存储错误地址。使用一系列断点,您可以准确确定导致执行的行。>他“NSError**error”似乎有一个*太多。同样,当将错误传递给“发送同步”pas时,将其作为&错误来存储错误地址。很好,瑞奇,我只是没看到。真是个笨蛋。非常感谢!!