29-04-2012 08:43 AM - edited 29-04-2012 09:08 AM
Exception
Message: A null value was found where an object instance was required.
Source: System
Stack Trace:
at (wrapper delegate-end-invoke) <Module>:end_invoke_int__this___IAsyncResult (System.IAsyncResult)
at System.Net.FtpDataStream.EndRead (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.FtpDataStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
at System.IO.Stream.CopyTo (System.IO.Stream destination, Int32 bufferSize) [0x00000] in <filename unknown>:0
==================================================
is it a bug ? i'm confused.. what's exactly happened ? it's happen everytime i downloading a large file > 100mb on PSVita (not simulator).. midway FTP response stream throws unknown exception
EDIT: is GC faulty ? it seems GC collect Stream object earlier than expected... ![]()
EDIT2: i'm not so adept in C# so i dunno how GC works ![]()
EDIT3: GC.KeepAlive() no effect
Solved! Go to Solution.
29-04-2012 06:53 PM - edited 29-04-2012 06:56 PM
29-04-2012 11:49 PM - edited 29-04-2012 11:54 PM
any size.. and besides i'm not copying all the file from server's content to memory.. i'm using 64K buffer.. and writing it to the file..
it's still throw exception even when im using read and write not copyto
EDIT: BTW it's inside BackgroundWorker DoWork procedure ![]()
here's the snippet:
CopyTo version:
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
FileStream fs = new FileStream(local_path,FileMode.Create);
responseStream.CopyTo(fs,65536);
Read Write Version:
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
FileStream fs = new FileStream(local_path,FileMode.Create);
byte[] buff = new byte[65536];
while((readed = responseStream.Read(buff,0,65536)) > 0){
fs.Write(buff,0,readed);
}
on 30-04-2012 12:37 AM
i started the wireshark and found out that PSVita FtpWebRequest and FtpWebResponse only sending request not getting any response code from server and while transfering file after sometime post QUIT command ???? it's weird.... while on PS Suite Simulator FtpWebRequest and FtpWebResponse behaving correctly... It seems bug on PSVita Mono Implementation.. ![]()
SOLUTION: fix the bugs.. another solution create ftplib from scratch my own.. ![]()
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870