I'm getting an access violation after uploading a file.
The stack trace is coming from:
System.Classes.TCollection.Add
CloudBase.TcloudItems.Add
CloudDropBox.TadvDropBox.UploadInt
CloudDropBox.TadvDropBox.Upload
var
CompanyFolder: TCloudItem;
BackupFolder: TDropBoxItem;
UploadedFile: TDropBoxItem;
begin
Screen.Cursor := crHourGlass;
advdropbox1.GetDriveInfo;
Screen.Cursor := crDefault;
BackupFolder := AdvDropBox1.GetFolderInfo('MY_BACKUPS');
if BackupFolder = nil then begin
CompanyFolder := AdvDropBox1.CreateFolder(nil,'MY_BACKUPS'); // Root Level
end
else begin
CompanyFolder := BackupFolder;
end;
if BackupFolder <> nil then
BackupFolder.Free;
BackupFolder := AdvDropBox1.GetFolderInfo('MY_BACKUPS/THIS_BACKUPS');
if BackupFolder = nil then begin
AdvDropBox1.CreateFolder(CompanyFolder,'THIS_BACKUPS'); // Root Level
BackupFolder := AdvDropBox1.GetFolderInfo('MY_BACKUPS/THIS_BACKUPS');
end;
if BackupFolder <> nil then begin
ProgressBar1.Position := 0;
ProgressBar1.Visible := true;
IsUploading := true;
try
UploadedFile := nil;
UploadedFile := AdvDropBox1.Upload(BackupFolder, 'P:\StorageDemo\Debug\Win32\CloudStorageDemo.exe'); //Access violation post upload
if UploadedFile<>nil then
showMessage('Uploaded');
finally
IsUploading := false;
ProgressBar1.Visible := false;
ProgressLabel.Caption := '';
end;
end;
if BackupFolder <> nil then
BackupFolder.Free;
CompanyFolder := nil;
Screen.Cursor := crHourGlass;
advdropbox1.GetDriveInfo;
Screen.Cursor := crDefault;
end;
I get the same thing using C++. I ended up using an undocumented Upload function that takes a string representing the folder name/path for the first argument and the file name/path for the second argument. They need to fix this!
Here's the thread I posted:
http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=3584&title=tdropboxitem-c-issue
Thanks! Tried the alternate call as you pointed out and that works.
Definitely need to check into this. It's strange that the demo works fine, but this code doesn't. Unless there's some issues with dependencies with the ListView, which I'm not using.
I'm also waiting for XE6 version of CloudPack. Surprised they haven't released that yet.
Although we could not directly reproduce a problem, we've applied an improvement for a possible AV. Coming update will have this improvement and will hopefully address your issue.
Great. Hopefully the update will be soon. I'm held up on my XE6 conversion because Cloudpack hasn't been released for XE6.
We aim for a release this week.
Bruno Fierens2014-06-03 13:57:56