segmentation fault (while parsing xml?)

Bug #1187489 reported by Ethan Furman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

I'm attempting to convert a 6.x module to 7.0.

BEFORE
=======
2013-06-04 16:00:33,819 25325 INFO Falcon openerp.modules.loading: module cmms: loading view/incident_view.xml
2013-06-04 16:00:33,822 25325 WARNING Falcon openerp.addons.base.ir.ir_ui_view: Setting the `type` field is deprecated in the `ir.ui.view` model.
2013-06-04 16:00:33,829 25325 WARNING Falcon openerp.addons.base.ir.ir_ui_view: Setting the `type` field is deprecated in the `ir.ui.view` model.
2013-06-04 16:00:33,835 25325 ERROR Falcon openerp.addons.base.ir.ir_ui_view: <string>:2:0:ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element form has extra content: group
2013-06-04 16:00:33,836 25325 ERROR Falcon openerp.tools.convert: Parse error in /usr/lib/pymodules/python2.7/openerp/addons/cmms/view/incident_view.xml:52:
<record id="cmms_incident-view" model="ir.ui.view">
            <field name="name">cmms.incident.form</field>
            <field name="model">cmms.incident</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Incident">
                    <group colspan="4" col="4">
                        <group colspan="4" col="2">
                            <separator string="Incident description" colspan="4"/>
                            <field name="name" select="1"/>
                            <field name="date"/>
                            <field name="priority"/>
                        </group>
                        <group colspan="1" col="2">
                            <separator string="Incident state" colspan="2"/>
                            <field name="user_id" select="1"/>
                            <field name="state"/>
                        </group>
                        <group colspan="1" col="2">
                            <field name="active" select="1"/>
                        </group>
                    </group>
                    <separator colspan="4" string="References"/>
                    <field colspan="4" name="ref"/>
                    <br/>
                    <notebook colspan="4">
                        <page string="General">
                            <field name="equipment_id" colspan="1"/>
                        </page>
                        <page string="History">
                            <field colspan="4" mode="tree,form" name="archiving3_ids" nolabel="1">
                                <form string="Follow-up history">
                                    <field name="name" colspan="4" select="1"/>
                                    <field name="user_id" select="1"/>
                                    <field name="date" select="1"/>
                                    <label string="Description"/>
                                    <field name="description" nolabel="1" colspan="4" select="1"/>
                                </form>
                                <tree string="Follow-up history">
                                    <field name="name" select="1"/>
                                    <field name="user_id" select="1"/>
                                    <field name="date" select="1"/>
                                    <field name="description" select="1"/>
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 814, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 963, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_view.py", line 103, in create
    return super(osv.osv, self).create(cr, uid, values, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4470, in create
    self._validate(cr, user, [id_new], context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 1544, in _validate
    raise except_orm('ValidateError', '\n'.join(error_msgs))
except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')

AFTER
=====

2013-06-04 16:29:34,525 25546 INFO ? openerp: OpenERP version 7.0-20130411-160032
2013-06-04 16:29:34,525 25546 INFO ? openerp: addons paths: /usr/lib/pymodules/python2.7/openerp/addons
2013-06-04 16:29:34,526 25546 INFO ? openerp: database hostname: localhost
2013-06-04 16:29:34,526 25546 INFO ? openerp: database port: 5432
2013-06-04 16:29:34,526 25546 INFO ? openerp: database user: openerp
2013-06-04 16:29:34,840 25546 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.17` detected
2013-06-04 16:29:35,085 25546 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
2013-06-04 16:29:35,086 25546 INFO ? openerp: OpenERP server is running, waiting for connections...
.
.
.
2013-06-04 16:29:39,970 25546 WARNING Falcon openerp.addons.base.ir.ir_ui_view: Setting the `type` field is deprecated in the `ir.ui.view` model.
2013-06-04 16:29:39,977 25546 WARNING Falcon openerp.addons.base.ir.ir_ui_view: Setting the `type` field is deprecated in the `ir.ui.view` model.
Segmentation fault

DIFFERENCE
==========

In incident_view.py I commented out the <form> tags, and new get a segmentation fault.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

TRy <form string="Incident" version="7.0">

Revision history for this message
Ethan Furman (ethan-stoneleaf) wrote : Re: [Bug 1187489] Re: segmentation fault (while parsing xml?)

On 06/06/2013 09:36 AM, Serpent Consulting Services wrote:
>
> TRy <form string="Incident" version="7.0">

Thanks for the reply, I already got it working by removing the

     mode="tree,form"

from the <field> entries.

My main concern was being able to segfault Python, and I didn't know where else to post the problem.

--
~Ethan~

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.