INX: hidden parameter inside a notebook page triggers crash

Bug #1089814 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
jazzynico

Bug Description

INX files support hidden parameters (not shown in the GUI) using the attribute 'gui-hidden' for <param>.

Example:
<param gui-hidden="true" name="hidden_opt" type="boolean">true</param>

This works fine as long as the parameter is defined in the root level of <inkscape-extension>, but causes Inkscape to crash when creating the dialog based on the INX file if is is inside a notebook page:

  <param name="tab" type="notebook">
    <!-- tab1 -->
    <page name="first_tab" _gui-text="First">
      <!-- hidden param doesn't work here -->
      <param gui-hidden="true" name="hidden_inside_tab_opt" type="boolean">false</param>
      <!-- normal param is ok -->
      <param name="instructions" type="description" xml:space="preserve">Text on first tab.</param>
    </page>

None of Inkscape's own extensions tries to use a hidden parameter this way. I only came across this while working on a custom extension where I would have liked to group hidden parameters with visible parameters per tab (code-wise this is not strictly necessary, but it may help keep an INX file better "organized").

Crash (current trunk r11952 on OS X 10.7.4):
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00000001037003eb in Gtk::Box::pack_start ()

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

attaching archive with two extensions demonstrating the reported issue.

description: updated
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape trunk revision 11951.

Since gui-hidden is a valid attribute (even in a tab), we can consider it a bug.
Importance lowered (in accordance with http://wiki.inkscape.org/wiki/index.php/Bug_management#Bug_importance) compared to a usual crash.

Changed in inkscape:
importance: Wishlist → Medium
status: New → Triaged
jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.49
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested (very quickly) on Windows XP, Inkscape trunk revision 11951.
The demo file from comment #2 now works as expected.
No regression found so far, but since it is just a missing test on the existence of the widget (NULL when gui-hidden is set), the risk is quite low.

Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 11956.

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

@JazzyNico - thx :) (it tested ok on OS X too - sorry for the delayed response!)

<off-topic>Would you mind to triage bug #1086296? IMHO it is mostly to blame for objects stranded in 'root' - besides the keyboard focus issue with the layers dialog…</off-topic>

jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
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.