Bug 314671

Summary: Okteta segfaults on loading with an special osd file
Product: okteta Reporter: Alexander Varnin <fenixk19>
Component: Structures ToolAssignee: Alex Richardson <arichardson.kde>
Status: RESOLVED FIXED    
Severity: normal CC: kossebau
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: osd and desktop file

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!