Bug 314671 - Okteta segfaults on loading with an special osd file
Summary: Okteta segfaults on loading with an special osd file
Status: RESOLVED FIXED
Alias: None
Product: okteta
Classification: Applications
Component: Structures Tool (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Richardson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 13:12 UTC by Alexander Varnin
Modified: 2013-02-09 21:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
osd and desktop file (10.00 KB, application/x-gzip)
2013-02-08 13:12 UTC, Alexander Varnin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Varnin 2013-02-08 13:12:23 UTC
Created attachment 77014 [details]
osd and desktop file

Using version from last SVN (r1337142).
osd file attached
Comment 1 Alex Richardson 2013-02-09 15:10:45 UTC
SVN commit 1338865 by arichardson:

structures: fix null pointer dereference


 M  +5 -2      osdparser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1338865
Comment 2 Alex Richardson 2013-02-09 15:13:36 UTC
SVN commit 1338873 by arichardson:

structures: fix null pointer dereference

Forward port of 1338865


 M  +5 -2      datainformationfactory.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1338873
Comment 3 Alex Richardson 2013-02-09 15:18:56 UTC
The problem was that the element you are looking for doesn't exist, and the check for that case was buggy.

Arithmetic expressions for array lengths are supported, however you must use a JavaScript funtion.
E.g. <array name="convert" length="function() { return this.parent.parent.convert_data_size.value -16; }">
or <array name="convert" length="function(root) { return root.convert_data_size.value - 16; }">

I am currently writing documentation, the current state can be seen here:
http://userbase.kde.org/User:AlexanderRichardson/Structure_Definitions
Comment 4 Alexander Varnin 2013-02-09 21:48:40 UTC
Thanks for your help and bugfixing!