Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322707

Summary: LargeObjectException when synchronizing with EGit
Product: [Technology] EGit Reporter: Marc-André Laperle <malaperle>
Component: CoreAssignee: Dariusz Luksza <dariusz.luksza>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: caniszczyk, dariusz.luksza
Version: 0.9.0   
Target Milestone: 0.9.0-M3   
Hardware: All   
OS: All   
Whiteboard:

Description Marc-André Laperle CLA 2010-08-14 13:26:57 EDT
JGit 0.9.0.201008122250
EGit 0.9.0.201008122253

I try synchronizing a branch with EGit but I always get an exception coming from JGit. My biggest file is 3.2MB.

Call stack:

org.eclipse.jgit.errors.LargeObjectException: 19097d955bd44780cf00e04153dd712bf2e84183
	at org.eclipse.jgit.storage.file.UnpackedObject$LargeObject.getCachedBytes(UnpackedObject.java:365)
	at org.eclipse.jgit.lib.ObjectLoader.getBytes(ObjectLoader.java:107)
	at org.eclipse.egit.core.synchronize.GitBlobResourceVariant.<init>(GitBlobResourceVariant.java:49)
	at org.eclipse.egit.core.synchronize.GitFolderResourceVariant.getMembers(GitFolderResourceVariant.java:88)
	at org.eclipse.egit.core.synchronize.GitResourceVariantTree.fetchMembers(GitResourceVariantTree.java:106)
	at org.eclipse.team.core.variants.AbstractResourceVariantTree.mergedMembers(AbstractResourceVariantTree.java:196)
	at org.eclipse.team.core.variants.AbstractResourceVariantTree.collectChanges(AbstractResourceVariantTree.java:173)
....
Comment 1 Marc-André Laperle CLA 2010-08-14 14:02:34 EDT
Changing to Egit. It looks like ObjectLoader.getBytes shouldn't be called when dealing with a large object. Files bigger than 1MB are LargeObject which always throws a LargeFileException when getBytes->getCachedBytes is called.

UnpackedObject.open:

if (size < wc.getStreamFileThreshold() || path == null) {
    ...
    return new ObjectLoader.SmallObject(type, data);
}
return new LargeObject(type, size, path, id, wc.db);
Comment 2 Dariusz Luksza CLA 2010-08-16 15:20:05 EDT
This patch set should fix this issue:
http://egit.eclipse.org/r/1317

btw. To have it clear, it isn't part of my GSoC project, my adventure with Summer of Code ends about 20min ago ;). Right now I'm a regular contributor ;)
Comment 3 Chris Aniszczyk CLA 2010-08-16 16:28:55 EDT
Fixed with 6ef63719a7e8c53b7627da17248398226f158b77.

Marc-Andre, can you try tomorrow's nightly build and let me know if everything is OK for you.
Comment 4 Marc-André Laperle CLA 2010-08-17 01:29:43 EDT
(In reply to comment #3)
> Fixed with 6ef63719a7e8c53b7627da17248398226f158b77.
> 
> Marc-Andre, can you try tomorrow's nightly build and let me know if everything
> is OK for you.

I think it fixed the problem (hudson #429), thank you!

(In reply to comment #2)
> btw. To have it clear, it isn't part of my GSoC project, my adventure with
> Summer of Code ends about 20min ago ;). Right now I'm a regular contributor ;)

Thanks for the prompt fix! I hope you continue to contribute, you seem talented :)
Comment 5 Dariusz Luksza CLA 2010-08-17 03:02:49 EDT
(In reply to comment #4)
> Thanks for the prompt fix! I hope you continue to contribute, you seem talented
> :)

Yes, I'll continue my contribution ;)