CEGUI Logo
This issue tracker is now in read-only mode. We migrated all our old bug reports to our bitbucket issue tracker
Please use our new issue tracker to report bugs. You can easily find all mantis tickets on our new issue tracker by selecting the appropriate bitbucket repo (CEGUI/CEED/Silly) and searching for the mantis ticket ID number.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000697CEED[All Projects] Generalpublic2012-01-09 13:392012-01-11 17:16
ReporterKulik 
Assigned ToKulik 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Versionsnapshot6 
Target Versionsnapshot7Fixed in Versionsnapshot7 
Summary0000697: Saving layouts with no root widget raises an exception if compatibility layers are used
Description    Exception message: no element found: line 1, column 0

    Traceback:
      File "C:\Users\Martin Preisler\Devel\CEED\ceed\mainwindow.py", line 1259, in slot_saveAll

      File "C:\Users\Martin Preisler\Devel\CEED\ceed\editors\__init__.py", line 419, in save

      File "C:\Users\Martin Preisler\Devel\CEED\ceed\editors\layout\__init__.py", line 141, in saveAs

      File "C:\Users\Martin Preisler\Devel\CEED\ceed\editors\__init__.py", line 554, in saveAs

      File "C:\Users\Martin Preisler\Devel\CEED\ceed\editors\__init__.py", line 367, in saveAs

      File "C:\Users\Martin Preisler\Devel\CEED\ceed\compatibility\__init__.py", line 164, in transform

      File "C:\Users\Martin Preisler\Devel\CEED\ceed\compatibility\layout\cegui.py", line 325, in transform

      File "C:\Python27\lib\xml\etree\ElementTree.py", line 1283, in XML

      File "C:\Python27\lib\xml\etree\ElementTree.py", line 1636, in close

      File "C:\Python27\lib\xml\etree\ElementTree.py", line 1488, in _raiseerror


    CEED revision: Unknown
    CEED version: snapshot6
    HW architecture: ('32bit', 'WindowsPE')
    HW type: AMD64
    HW processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
    OS type: Windows
    OS release: 7
    OS version: 6.1.7601
    OS Windows: ('7', '6.1.7601', 'SP1', u'Multiprocessor Free')
    SW Python: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
    SW PySide: 1.0.9
    SW Qt: 4.7.4
    SW OpenGL: 3.0.2a1
    SW PyCEGUI: 0.8.9090

--
by Mars_999, thanks for the report!
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000834)
Kulik (administrator)
2012-01-09 13:41

I think we should warn the user with a dialog that the resulting layout will definitely be invalid in CEGUI's eyes. We should just write an empty file if user chooses to proceed (not using compatibility layers at all).
(0000835)
Kulik (administrator)
2012-01-09 13:48
edited on: 2012-01-09 13:49

Setting this to general category since it probably applies to all editors, not just layout. New file is always <= 2 bytes long and using compat layers on that is likely to fail.

(0000836)
Kulik (administrator)
2012-01-09 13:52

14:48 < CrazyEddie> how about "You can not save a layout without a root
                    element, a DefaultWindow root will now be created": "OK" /
                    "Cancel"

Probably more pragmatic, I am inclined to do this instead of just a warning. A good rule would be to never allow invalid data to be created with the editor.
(0000837)
pav (developer)
2012-01-10 11:14

I haven't looked at this part of the code but shouldn't an empty layout file have the following (at least)?

<?xml version="1.0" ?>
<GUILayout version="4">
</GuiLayout>

This doesn't solve the issue but I think it's related.

Last, the prompt dialog should have a Cancel button and a "Create DefaultWindow" (or "Create root" or "Create") button, not just "OK". See mainwindow.py, slot_newFileDialog()
(0000838)
Kulik (administrator)
2012-01-11 17:03

pav: You are right but CEED doesn't recognize that as "empty" layout. So in the end I will have to go with "". Trying to load your layout results in CEGUI bitching about it ;-) It's an invalid layout still...
(0000839)
Kulik (administrator)
2012-01-11 17:15

In the end I just pop a dialog saying that CEED won't save and user should add a root widget. Adding the option to add a root widget automatically is IMO not worth it (time investment vs benefit).

Fixed with b316106b50b0

- Issue History
Date Modified Username Field Change
2012-01-09 13:39 Kulik New Issue
2012-01-09 13:40 Kulik Assigned To => Kulik
2012-01-09 13:40 Kulik Status new => assigned
2012-01-09 13:41 Kulik Note Added: 0000834
2012-01-09 13:48 Kulik Note Added: 0000835
2012-01-09 13:48 Kulik Category (No Category) => General
2012-01-09 13:49 Kulik Note Edited: 0000835 View Revisions
2012-01-09 13:52 Kulik Note Added: 0000836
2012-01-10 11:14 pav Note Added: 0000837
2012-01-11 17:03 Kulik Note Added: 0000838
2012-01-11 17:15 Kulik Note Added: 0000839
2012-01-11 17:16 Kulik Status assigned => resolved
2012-01-11 17:16 Kulik Resolution open => fixed
2012-01-11 17:16 Kulik Fixed in Version 0.8.3 => snapshot7
Get Crazy Eddies GUI System at SourceForge.net. Fast, secure and Free Open Source software downloads


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker