Project

General

Profile

Actions

Support Request #4008

closed

EBPRODUCTSUPPORT-1226 Different behavior of the ADTF File Lib between Windows and Linux

Added by hidden almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Customer:
ELEKTROBIT
Department:
SUPPORT
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Platform:
Ubuntu 16.04 64bit, Windows 7 64bit
Topic:
FileLibrary::Reader
FAQ Links:

Description

Support Anfrage:

das Verhalten beim Iterieren über die Stream Properties ist nicht stabil zwischen Windows und Linux (innerhalb eines Systems schon, also bei mehrfachen ausführen auf Windows oder Linux). Ich erhalte in Linux eine komplette umsortierte Liste.
Ist das so gewollt? Für meine Anwendung ist das kein Problem, allerdings ist es unerwartet.

Ausgabe unter Windows:

[Dump ] - Stream: Motor
id: 1
item/sample count:1461
timestamp (first, nano seconds): 45071342000
timestamp (last, nano seconds): 59715166000
metatype: adtf2/legacy
stream property count: 3
- Stream property name: major
value: 768
type: tInt32
- Stream property name: sub
value: 0
type: tInt32
- Stream property name: flags
value: 0
type: tInt32

Ausgabe unter Linux:

[Dump ] - Stream: Motor
id: 1
item/sample count: 1461
timestamp (first, nano seconds): 45071342000
timestamp (last, nano seconds): 59715166000
metatype: adtf2/legacy
stream property count: 3
- Stream property name: sub
value: 0
type: tInt32
- Stream property name: flags
value: 0
type: tInt32
- Stream property name: major
value: 768
type: tInt32

Lösung:

class DefaultStreamType: public PropertyStreamType, public StreamType
{
    ...
    private:
    ...
        std::unordered_map<std::string, std::pair<std::string, std::string>> _properties;
};

Da dürfte wohl die Implementierung der unordered_map unter MSVC einfach anders hashen und sortieren als die des GCC. Das ist eben eine unordered_map, weil die Reihenfolge bei Properties keine Rolle spielt.

Actions #1

Updated by hidden almost 6 years ago

  • Project changed from Public Support to 7
  • Description updated (diff)
  • Status changed from New to In Progress
  • Topic set to FileLibrary::Reader
  • Customer set to ELEKTROBIT
  • Department set to SUPPORT
  • Affected Products ADTF File Library 0.2.1 (BETA) added
Actions #2

Updated by hidden almost 6 years ago

class DefaultStreamType: public PropertyStreamType, public StreamType
{
    ...
    private:
    ...
        std::unordered_map<std::string, std::pair<std::string, std::string>> _properties;
};

da dürfte wohl die Implementierung der unordered_map unter MSVC einfach anders hashen und sortieren als die des GCC. Das ist eben eine unordered_map, weil die Reihenfolge bei Properties keine Rolle spielt.

Grüße,

Martin

Actions #3

Updated by hidden almost 6 years ago

  • Status changed from In Progress to Customer Feedback Required
Actions #5

Updated by hidden almost 6 years ago

  • Subject changed from EBPRODUCTSUPPORT-1226 Unterschiedliches Verhalten der ADTF File Lib zwischen Win und Linux to EBPRODUCTSUPPORT-1226 Different behavior of the ADTF File Lib between Win and Linux
  • Description updated (diff)
  • Status changed from Customer Feedback Required to To Be Closed
  • Resolution set to Solved Issue
  • Platform Ubuntu 16.04 64bit, Windows 7 64bit added

Antwort von EB (Email Header war nicht gesetzt)

Danke für die Info, kann zu...

Lg Flo

Actions #6

Updated by hidden almost 6 years ago

  • Subject changed from EBPRODUCTSUPPORT-1226 Different behavior of the ADTF File Lib between Win and Linux to EBPRODUCTSUPPORT-1226 Different behavior of the ADTF File Lib between Windows and Linux
  • Status changed from To Be Closed to Closed
Actions #7

Updated by hidden almost 6 years ago

  • Project changed from 7 to Public Support
  • Private changed from Yes to No
Actions

Also available in: Atom PDF