Moin,
mal wieder ich mit merkwürdigen Problemen. Ich benutz ein einem Programm eine NSURLConnection. Funktioniert auch für existente Dateien wunderbar.
Erfolgt jetzt eine Anfrage für eine nicht existente Datei (also mit Status 404 im Falle von HTTP) nibbelt mir das ganze sang- und klanglos ab:
#0 0x907eff20 in CFRunLoopWakeUp ()
#1 0x9298ed18 in -[NSURLConnection(NSURLConnectionInternal) _postCallback:] ()
#2 0x92991250 in -[NSURLConnection(NSURLConnectionInternal) _postDidReceiveResponseCallback] ()
#3 0x92992104 in -[NSConnectionHTTPURLProtocol performStreamRead:] ()
#4 0x9298c80c in readStreamCallback2 ()
#5 0x90829eb4 in _CFStreamSignalEventSynch ()
#6 0x907dd584 in __CFRunLoopDoSources0 ()
#7 0x907dc9fc in __CFRunLoopRun ()
#8 0x907dc47c in CFRunLoopRunSpecific ()
#9 0x9298669c in +[NSURLConnection(NSURLConnectionInternal) _resourceLoadLoop:] ()
#10 0x9295f194 in forkThreadForFunction ()
#11 0x9002b508 in _pthread_body ()
Das "witzige" ist daß
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
nicht aufgerufen wird.
Ich hab schon Folgendes probiert:
	
		
			
		
		
	
	
			Alles anzeigen
		
								
			
Aber -- da kommt er leider nie hin.
Wie gesagt, für existente Dateien funktioniert das wunderbar. -- Hat jemand eine Idee?
									
									
								mal wieder ich mit merkwürdigen Problemen. Ich benutz ein einem Programm eine NSURLConnection. Funktioniert auch für existente Dateien wunderbar.
Erfolgt jetzt eine Anfrage für eine nicht existente Datei (also mit Status 404 im Falle von HTTP) nibbelt mir das ganze sang- und klanglos ab:
#0 0x907eff20 in CFRunLoopWakeUp ()
#1 0x9298ed18 in -[NSURLConnection(NSURLConnectionInternal) _postCallback:] ()
#2 0x92991250 in -[NSURLConnection(NSURLConnectionInternal) _postDidReceiveResponseCallback] ()
#3 0x92992104 in -[NSConnectionHTTPURLProtocol performStreamRead:] ()
#4 0x9298c80c in readStreamCallback2 ()
#5 0x90829eb4 in _CFStreamSignalEventSynch ()
#6 0x907dd584 in __CFRunLoopDoSources0 ()
#7 0x907dc9fc in __CFRunLoopRun ()
#8 0x907dc47c in CFRunLoopRunSpecific ()
#9 0x9298669c in +[NSURLConnection(NSURLConnectionInternal) _resourceLoadLoop:] ()
#10 0x9295f194 in forkThreadForFunction ()
#11 0x9002b508 in _pthread_body ()
Das "witzige" ist daß
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
nicht aufgerufen wird.
Ich hab schon Folgendes probiert:
Quellcode
Aber -- da kommt er leider nie hin.
Wie gesagt, für existente Dateien funktioniert das wunderbar. -- Hat jemand eine Idee?
if (!exit(-1)) fprintf(stderr, "exit call failed. Program will continue\n");
									
 
									