Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334938 - gconf tool throws errors during file save
Summary: gconf tool throws errors during file save
Status: CLOSED FIXED
Alias: None
Product: RTSC
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sasha Slijepcevic CLA
QA Contact:
URL:
Whiteboard: target:3.20.08
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 14:35 EST by Amit Mookerjee CLA
Modified: 2011-06-20 14:35 EDT (History)
2 users (show)

See Also:


Attachments
config.Shell control flow (29.62 KB, image/png)
2011-01-25 15:54 EST, Sasha Slijepcevic CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Mookerjee CLA 2011-01-20 14:35:09 EST
Steps to reproduce problem
--------------------------
1. Install ccs4.20 and XDCtools 3.20.05 release
2. Create a BIOS5 project 
3. Open up gconf by doubleclicking the "tcf" file
4. Make some changes to the config script and press the save button
5. Make some more changes and press save. The second time around gconf puts up the
following error message in a dialog - CScriptPane::XScriptPaneEventSink::Save failed. The file cannot be saved in gconf.

Note that this problem goes away when XDCtools 3.20.04.68 is used.

Take a look at http://e2e.ti.com/support/embedded/f/355/p/87640/309675.aspx#309675
for the forum post on this issue.
Comment 1 Sasha Slijepcevic CLA 2011-01-25 15:54:04 EST
Created attachment 187575 [details]
config.Shell control flow
Comment 2 Sasha Slijepcevic CLA 2011-01-25 17:20:50 EST
The bug is caused by an unclosed file handle in config.Shell. A handle opened in processLoad was not closed in evaluateLoad, as it should be following the pattern established in processFile and evaluateReader.
The attached image shows the Shell architecture. GConf calls into Shell through TCF. TCF is passing the line 'load(<scriptName>);' to processLine, which then gets evaluated in processLoad->evaluateLoad, where the bug gets exposed.

The same problem can be demonstrated in Tconf, if it's run interactively from the command line. When the Tconf from 3.20.06 release is used, the following command will capture a handle to hello.tcf, and the saving of changes to hello.tcf in a text editor will be disabled even after the command returns:
js> utils.load("hello.tcf");
js>

Only when the user exits Tconf, saving hello.tcf in an editor will work.

With a fix implemented, after utils.load is invoked, hello.tcf can be saved in an editor even before the user exits Tconf.
Comment 3 Sasha Slijepcevic CLA 2011-01-25 18:00:04 EST
- fixed in xdcutils-f05
Comment 4 Karl Wechsler CLA 2011-01-31 13:13:07 EST
verify pass.

I reproduced (again to be sure) with 3.20.07.xy release and see the problem.

I installed 3.20.08.87_eng and did multiple modify/save cycles and I no longer get this exception.

verify pass.
Comment 5 Dave Russo CLA 2011-06-20 14:35:29 EDT
Shipped in XDCtools 3.20.08