sdrose65 / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

GDataGAuthRequest does not correctly manage GDataRequestException #502

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(Version: lastest trunk)

In some cases GDataRequestException.Response could be null. But the code of 
GDataGAuthRequest uses it without checking if was null. So I get a 
System.NullReferenceException.

Correction in the attached patch file.

   Fabrizio

Original issue reported on code.google.com by fht...@gmail.com on 14 May 2011 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch, it makes a lot of sense.
Is there a way to systematically trigger the error and reproduce this issue?

Original comment by ccherub...@google.com on 14 May 2011 at 4:30

GoogleCodeExporter commented 9 years ago
Some users found strange errors in GDocBackup (it uses the lib).
When I run GDocBAckup on OpenSuse + Mono there are problems with https 
certificates. Mono does not trust them. So the connection fails and a 
GDataRequestException (with Response = null because the connection fails during 
the open phase).
Details:  http://code.google.com/p/gdocbackup/issues/detail?id=53

Actually I have no few lines of code to reproduce that. Let me know if you need 
more details.

Original comment by fht...@gmail.com on 14 May 2011 at 7:54

GoogleCodeExporter commented 9 years ago
Thanks again for the patch, I committed a slight variation of it in rev. 1100

Original comment by ccherub...@google.com on 15 May 2011 at 12:49