Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: index out of range during push #618

Closed
cgogolin opened this issue Apr 8, 2016 · 5 comments · Fixed by #619
Closed

panic: runtime error: index out of range during push #618

cgogolin opened this issue Apr 8, 2016 · 5 comments · Fixed by #619
Assignees
Labels

Comments

@cgogolin
Copy link

cgogolin commented Apr 8, 2016

I just tried to push a large number of files to my Drive with the version available via

go get -u github.com/odeke-em/drive/drive-google

and get a panic: runtime error: index out of range error.

[...]
+ ./library/some.pdf
Addition count 2135 src: 2.58GB
Proceed with the changes? [Y/n]:Y
0 / 2772573420 [---------------------------------------------------------------------------------------------------------------------------------------------]   0.00%
panic: runtime error: index out of range
[...]

I am attaching the full output.

Pulling my current Drive worked flawlessly.

Maybe it is relevant that ./library is a symbolic link to a directory on the same partition but outside of the "working copy" of drive?

@odeke-em
Copy link
Owner

odeke-em commented Apr 8, 2016

Hello there @cgogolin, thank you for reporting this and welcome to drive.

If you don't mind, an actual drive version would be helpful and perhaps a git log | head -n 3 insde $GOPATH/src/github.com/odeke-em/drive would do. Thanks for the stack trace!

@cgogolin
Copy link
Author

cgogolin commented Apr 8, 2016

Here you are:

~/drive$ drive-google version
drive version: 0.3.5
Commit Hash: <CURRENT_COMMIT>
Go Version: <GO_VERSION>
OS: <OS_INFO>
BuildTime: 
~/.config/go/src/github.com/odeke-em/drive$ git log | head -n 3
commit 7c654c944f21a58ce090d6d752e4a42bc576c809
Author: Emmanuel Odeke <[email protected]>
Date:   Thu Apr 7 00:38:24 2016 -0700

@odeke-em
Copy link
Owner

odeke-em commented Apr 8, 2016

Awesome! Thank you @cgogolin. I couldn't catch sleep so I've dug into it and discovered the bug came from PR #616. I was led there due to the output of your manifest ie
lib/* instead of the usual /lib/* which makes sense for those panics because path splitting is dependant upon the root '/' first existing and then searching on from then on.
PR coming up in a few.

@odeke-em odeke-em added the bug label Apr 8, 2016
@odeke-em odeke-em self-assigned this Apr 8, 2016
odeke-em added a commit that referenced this issue Apr 8, 2016
Keep track of the local vs remote base since we are no longer
only pushing from a single location on disk/local.
Also ensure that all paths in a push/changelist-resolve are
separator prefixed since searching for remote files always
starts with '/' as was the old style. Passing in say 'lib/f1'
is invalid since the search starts from '/' so must be '/lib/f1'.

Fixes #618
Updates #616
Updates #612
@odeke-em
Copy link
Owner

odeke-em commented Apr 8, 2016

Hello again @cgogolin, this issue was auto-closed by PR #619. Please get the latest from master as I'll be going to try to sleep for a few, before a long day during which I won't have time during the day to merge the PR. Thank you for the report and for the patience. Let me know how it goes.

@cgogolin
Copy link
Author

cgogolin commented Apr 8, 2016

Wow! I wish developers would always respond like that!
I am now at

~/.config/go/src/github.com/odeke-em/drive$ git log | head -n 3
commit 24c1ff64ec2d48ca75fb1a5341c7b7076a315048
Author: Emmanuel Odeke <[email protected]>
Date:   Fri Apr 8 06:15:50 2016 -0700

and pull seems to work smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants