Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000725Taste[All Projects] OpenGeodepublic2017-12-06 18:432018-03-10 13:25
Reportershd01 
Assigned Tomaxime 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Summary0000725:

ASN.1 compiler failed - unhashable type 'dict'

Description

If my DataView contains a value assignment of a sequence of CHOICE types, OpenGEODE gives an ASN.1 compiler failure error when opening a SDL process.

My ASN.1 is as follows:

TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;

TASTE-Boolean ::= BOOLEAN

T-Object ::= CHOICE {
objectType1 T-UInt8,
objectType2 T-UInt32
}

T-ObjectList ::= SEQUENCE (SIZE(1..8)) OF T-Object

c-MyObjectList T-ObjectList ::= {
objectType1 : 234,
objectType2 : 23456
}

END

The OpenGeode output is shown in the attached screen dump.

The ASN.1 compiles successfully with asn1.exe and generates C files.

TagsNo tags attached.
Attached Filespng file icon og_bug1.png [^] (237,030 bytes) 2017-12-06 18:43

- Relationships

-  Notes
(0003160)
maxime (administrator)
2017-12-06 19:05

Reproduced. Looking into it.

(0003161)
maxime (administrator)
2017-12-06 20:06

The bug is in the Python backend of the asn1 parser.

I fixed it in the ASN1SCC repo (https://github.com/ttsiodras/asn1scc/commit/4833a4a2d721a67c2c2156e1f15c06b28caff144 [^]), but this will not be immediately available in TASTE.

I suggest to apply the patch manually for the time being. It's just two characters to change in this file:

/home/taste/tool-inst/share/asn1scc/python.stg

Line 237:

Print_SeqOfValue(arrsValues) ::= <<{$arrsValues; separator=", "$}>>

Replace the curly brackets with simple parenthesis:

Print_SeqOfValue(arrsValues) ::= <<($arrsValues; separator=", "$)>>

This should be sufficient to make it work without any other change in your system. Please confirm.

(0003162)
shd01 (reporter)
2017-12-06 20:18

Super speedy! Thanks very much, will apply the patch manually tonight.

(0003163)
shd01 (reporter)
2017-12-06 23:25

Yes, it works now :)


- Issue History
Date Modified Username Field Change
2017-12-06 18:43 shd01 New Issue
2017-12-06 18:43 shd01 Status

new => assigned

2017-12-06 18:43 shd01 Assigned To

=> maxime

2017-12-06 18:43 shd01 File Added: og_bug1.png
2017-12-06 19:05 maxime Note Added: 0003160
2017-12-06 19:05 maxime Status

assigned => confirmed

2017-12-06 20:06 maxime Note Added: 0003161
2017-12-06 20:18 shd01 Note Added: 0003162
2017-12-06 23:25 shd01 Note Added: 0003163
2017-12-11 10:53 maxime Status

confirmed => resolved

2017-12-11 10:53 maxime Resolution

open => fixed

2018-03-10 13:25 maxime Status

resolved => closed



Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker