Bug 288289 - [fiximprove]: Exceptions during project build
Summary: [fiximprove]: Exceptions during project build
Status: ASSIGNED
Alias: None
Product: MTJ (Archived)
Classification: Tools
Component: Project Builder (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P1 major with 4 votes (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact:
URL: http://www.eclipse.org/forums/index.p...
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2009-09-01 13:35 EDT by Andrey Krivtsun CLA
Modified: 2013-12-15 23:48 EST (History)
4 users (show)

See Also:


Attachments
Errors exported from Error Log view (5.98 KB, application/x-octet-stream)
2009-09-01 13:35 EDT, Andrey Krivtsun CLA
no flags Details
Simple project on which exceptions appear (17.31 KB, application/zip)
2009-09-01 17:28 EDT, Andrey Krivtsun CLA
no flags Details
Problem workspace from my last comment (497.32 KB, application/x-octet-stream)
2009-09-03 07:30 EDT, Andrey Krivtsun CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Krivtsun CLA 2009-09-01 13:35:34 EDT
Created attachment 146214 [details]
Errors exported from Error Log view

Overview:

From time to time, I get strange and annoying errors during simply build my
project source (see attached file). 

Steps to Reproduce: 

    1) Set Project->Build Automatically on
    2) Make some changes in java file
    3) Press Ctrl-Shift-S 

Additional Information: 

If I Clean all project and Rebuild it this helps for some time.
Comment 1 David Marques CLA 2009-09-01 16:17:50 EDT
Hi Andrey,

Please attach a test project so we can reproduce the issue you are describing!

Best Regards,

David Marques

(In reply to comment #0)
> Created an attachment (id=146214) [details]
> Errors exported from Error Log view
> 
> Overview:
> 
> From time to time, I get strange and annoying errors during simply build my
> project source (see attached file). 
> 
> Steps to Reproduce: 
> 
>     1) Set Project->Build Automatically on
>     2) Make some changes in java file
>     3) Press Ctrl-Shift-S 
> 
> Additional Information: 
> 
> If I Clean all project and Rebuild it this helps for some time.
Comment 2 Andrey Krivtsun CLA 2009-09-01 17:28:04 EDT
Created attachment 146235 [details]
Simple project on which exceptions appear
Comment 3 David Marques CLA 2009-09-02 06:40:19 EDT
Hi Andrey,

I have fixed the bug regarding the jmunit exclusion paths (https://bugs.eclipse.org/bugs/show_bug.cgi?id=288165). It will be available on our next nightly build.

Regarding the issue with the exceptions you are getting i could not reproduce the issue with the project you attached.

Best Regards,

David Marques

(In reply to comment #2)
> Created an attachment (id=146235) [details]
> Simple project on which exceptions appear
Comment 4 Andrey Krivtsun CLA 2009-09-02 07:25:07 EDT
(In reply to comment #3)

> Regarding the issue with the exceptions you are getting i could not reproduce
> the issue with the project you attached.

Hi David,

I'll explore problem in depth later and I'll try to provide more info about it.
Pls, don't close this bug.
Comment 5 Andrey Krivtsun CLA 2009-09-03 06:35:58 EDT
Here is steps for problems reproducing
1. Open new workspace
2. File->New->Other->Java ME->Midlet Project 
3. Set "Test" as project name
4. Set WTK2.5.2_1 as SDK and select DefaultColorPhone
5. Press "Finish"
6. For new project New->Other->Java ME Midlet
7. Set "BugDemo" as midlet name
8. Set "Create midlet using a template" and select "Display Manager Template"
9. Press "Finish"
10. Press space anywhere in file BugDemo.java and press Ctrl+Shift+S. All compiled fine.
11. Select "Mobile Tools for Java" for this project Test and select "Enable JMUnit"
12. Press space anywhere in file BugDemo.java and press Ctrl+Shift+S. "Problem Occured" dlg appears with text "'Build workspace' has encountered problem. Errors occured during the build."
In Error Log view are
"de.schlichtherle.io.ArchiveFileSystem$ArchiveReadOnlyException: Archive file is read-only!"
and 
"java.io.FileNotFoundException: de.schlichtherle.io.ArchiveFileSystem$ArchiveReadOnlyException: Archive file is read-only!
at de.schlichtherle.io.ArchiveController.createOutputStream(ArchiveController.java:579)
at de.schlichtherle.io.FileOutputStream.createOutputStream(FileOutputStream.java:164)
at de.schlichtherle.io.FileOutputStream.<init>(FileOutputStream.java:124)
at org.eclipse.mtj.internal.core.build.packaging.PackageBuilder.createManifestFile(Unknown Source)
at org.eclipse.mtj.internal.core.build.packaging.PackageBuilder.updatePackage(Unknown Source)
at org.eclipse.mtj.internal.core.build.packaging.PackageBuilder.doBuild(Unknown Source)
at org.eclipse.mtj.internal.core.build.MTJIncrementalProjectBuilder.build(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: de.schlichtherle.io.ArchiveFileSystem$ArchiveReadOnlyException: Archive file is read-only!
at de.schlichtherle.io.ArchiveFileSystem$LinkDelta.<init>(ArchiveFileSystem.java:487)
at de.schlichtherle.io.ArchiveFileSystem$LinkDelta.<init>(ArchiveFileSystem.java:478)
at de.schlichtherle.io.ArchiveFileSystem.link(ArchiveFileSystem.java:469)
at de.schlichtherle.io.ArchiveFileSystem.link(ArchiveFileSystem.java:403)
at de.schlichtherle.io.ArchiveController.createOutputStream0(ArchiveController.java:620)
at de.schlichtherle.io.ArchiveController.createOutputStream(ArchiveController.java:570)
... 18 more"
Comment 6 Andrey Krivtsun CLA 2009-09-03 07:30:43 EDT
Created attachment 146374 [details]
Problem workspace from my last comment
Comment 7 Gorkem Ercan CLA 2010-02-26 11:00:34 EST
I have tried to duplicate this with the provided workspace but no luck... I have also noticed failures related to zip file deletions  and writes are happening sporadically and seems to be timing related. I think the zip file accesses from the MTJ's builders needs to be investigated further.
Comment 8 Craig Setera CLA 2010-05-02 21:03:47 EDT
I came across a comment in another forum that mentioned that sharing an archive reference between threads could lead to strange problems like this.  I wonder if there is a concurrency issue somewhere in here?  There was also some mention of not needing to use both update and umount calls.
Comment 9 Bernardo CLA 2010-09-21 14:14:13 EDT
(In reply to comment #0)
> Created an attachment (id=146214) [details]
> Errors exported from Error Log view
> Overview:
> From time to time, I get strange and annoying errors during simply build my
> project source (see attached file). 
> Steps to Reproduce: 
>     1) Set Project->Build Automatically on
>     2) Make some changes in java file
>     3) Press Ctrl-Shift-S 
> Additional Information: 
> If I Clean all project and Rebuild it this helps for some time.

In my case it's related to my Kaspersky + XP, because launching or building requires me to "pause protection" for about 2 seconds. If I don't, the building pauses at 35% until crash. In this case, I have to Clean (Build Automatically=OFF) many times as necessary until the de.schlichtherle exception stop. After cleaning, restarting eclipse gets the project to work again.
Comment 10 Gorkem Ercan CLA 2010-09-22 04:33:33 EDT
Thanks Bernardo, this is very helpful input.

Andrey do you have some anti-virus software on as well?
Comment 11 Pranav Gothadiya CLA 2013-12-15 23:48:10 EST
I tried to reproduce this but I simple could not. 
Issue still reproducible? If not, lets close this issue.
Comment 12 Pranav Gothadiya CLA 2013-12-15 23:48:58 EST
I tried to reproduce this but I simple could not. 
Issue still reproducible? If not, lets close this issue.