Understanding ISO mp4 m4a Metadata - ios

I am unable to find a specification to understand the metadata from an m4a file.
This is not being copied across with AVAssetExportSession and I wanted to manually read and write this data to my exported file.
This is what I see in the debugger
AVMetadataFormatISOUserData;
2014-10-22 16:19:33.496 Mobile Magnet[189:15972] 1835365473,
<AVMutableMetadataItem: 0x17e7de00, identifier=uiso/meta, keySpace=uiso, key class =
__NSCFNumber, key=meta, commonKey=(null), extendedLanguageTag=(null),
dataType=com.apple.metadata.datatype.raw-data, time={INVALID}, duration={INVALID}, extras={
dataType = 0;
dataTypeNamespace = "com.apple.quicktime.udta";
}, value=<00000000 00000022 68646c72 00000000 00000000 6d646972 6170706c 00000000 00000000 00000000 0166696c 73740000 00bc2d2d 2d2d0000 001c6d65 616e0000 0000636f 6d2e6170 706c652e 6954756e 65730000 00146e61 6d650000 00006954 756e534d 50420000 00846461 74610000 00010000 00002030 30303030 30303020 30303030 30383430 20303030 30303144 30203030 30303030 30303030 39413131 46302030 30303030 30303020 30303030 30303030 20303030 30303030 30203030 30303030 30302030 30303030 30303020 30303030 30303030 20303030 30303030 30203030 30303030 30300000 00a22d2d 2d2d0000 001c6d65 616e0000 0000636f 6d2e6170 706c652e 6954756e 65730000 00146e61 6d650000 00006954 756e4e4f 524d0000 006a6461 74610000 00010000 00002030 30303031 32424620 30303030 31343139 20303030 30364533 36203030 30303830 32302030 30303241 31363120 30303033 34364432 20303030 30383230 42203030 30303831 36392030 30303244 38383720 30303033 30434335>>
},

This
}, value=<00000000 00000022 68646c72 00000000 00000000 6d646972 6170706c 00000000
looks like the name to an Atom (or block) in an MP4 container. I've seen those 5th through 12th bytes in a file that I made with Yamb and on the AtomicParsley page.

Related

ESP8266 BearSSL MQTT Exception when connecting

I am trying to connect to HiveMQ MQTT Broker from my ESP8266, 2 months ago, this code works fine, but now, when I implement more features, the code run with a lot of Exceptions. Sometimes, Exception (28), I'm newbie in this fields and don't know the way to handle it, thanks for your helps.
RAM and Flash:
Exception:
Sometimes:
My Code:
void setup()
{
BearSSL::WiFiClientSecure *bear = setSSLCertificate();
PSclient = new PubSubClient(*bear);
MQTT_ADDRESS = cEEPROM.getMqttAddress();
MQTT_PORT = cEEPROM.getMqttPort();
PSclient->setServer(MQTT_ADDRESS.c_str(), MQTT_PORT);
PSclient->setBufferSize(512);
PSclient->setCallback(myCallback);
}
void loop()
{
wifiConfig.configWifiAP(ENV_SSID_AP, ENV_PASS_AP);
if (!PSclient->connected())
{
reconnect();
}
else
{
PSclient->loop();
}
}
}
void reconnect()
{
while ((!PSclient->connected()) && tryConnectPS <= 5)
{
setDateTime();
String MQTT_ACCOUNT = cEEPROM.getMqttAccount();
String MQTT_USERNAME = cEEPROM.getMqttUsername();
String MQTT_PASSWORD = cEEPROM.getMqttPassword();
Serial.print("Try to connect to MQTT... ");
if (PSclient->connect(MQTT_ACCOUNT.c_str(), MQTT_USERNAME.c_str(), MQTT_PASSWORD.c_str()))
{
Serial.print("Connected state:");
Serial.println(PSclient->state());
String MQTT_TOPIC = cEEPROM.getMqttTopic();
boolean result = PSclient->subscribe(MQTT_TOPIC.c_str());
Serial.print("Tinh trang subscribe topic: ");
Serial.println(result);
tryConnectPS = 0;
DeviceService::turnReadyLedOn();
return;
}
else
{
Serial.print("Failed,rc = ");
Serial.println(PSclient->state());
Serial.println("Try again in 2 seconds ... ");
delay(1000);
tryConnectPS++;
}
}
}
BearSSL::WiFiClientSecure *setSSLCertificate()
{
LittleFS.begin();
int numCerts = certStore.initCertStore(LittleFS, PSTR("/certs.idx"), PSTR("/certs.ar"));
Serial.printf("So chung chi CA : %d\n", numCerts);
if (numCerts == 0)
{
Serial.printf("KHONG TIM THAY CHUNG CHI NAO");
}
BearSSL::WiFiClientSecure *bear = new BearSSL::WiFiClientSecure();
bear->setCertStore(&certStore);
return bear;
}
Full exception:
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Exception (28):
epc1=0x40205f0d epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
stack>>>
ctx: bearssl
sp: 3fff3690 end: 3fff3a80 offset: 0190
3fff3820: 3ffe8cc1 3fffbd6c 3fffb7f4 40205ef4
3fff3830: 4021bb04 00000000 000003e8 4021ad84
3fff3840: 00000000 00000000 00000000 40213640
3fff3850: 00000000 00000000 3fff116c 4021bb04
3fff3860: 00000000 000003e8 3ad6faec 00000000
3fff3870: 00000000 00000000 40213640 00000000
3fff3880: 00000000 3fff116c bd2fdbf6 925dd89d
3fff3890: c6b3dd59 2f7b7dde 0c3e3fec bc6117ef
3fff38a0: 572033bf f8302d1e 0001d90a 0000056f
3fff38b0: 928b6852 b5d6e5dc d07ddae3 3fffa404
3fff38c0: 3fffa428 3fffae04 000003dd 4023efe6
3fff38d0: 4026ed46 eb148196 203ddbd5 d3597ea7
3fff38e0: f958f8e2 cd48b85b 164f5cfe 551efe29
3fff38f0: 11c8af23 7cea8db0 2f179093 09a2acfd
3fff3900: f03f4647 ffb7b0e9 32684d28 1e5e67d6
3fff3910: 4026f0a7 00000000 00000b80 00000000
3fff3920: 3fffa41c 3fffac04 3fffa4d4 0000001a
3fff3930: 3fffa434 3fffa430 c818691e 0a857cc3
3fff3940: 56789534 54be83d2 466dbc59 1ce0b490
3fff3950: 3416a5e4 0b8510a4 5d8f434c 59ff5645
3fff3960: 3fff6072 0000002a 3fff6072 00000683
3fff3970: 3fff5ad4 3fff52d4 3fff5ab8 4023f682
3fff3980: 3fff5adc 3fff52d4 3fff5ab8 40239cb0
3fff3990: 402083e4 3fff52d4 3ffffdf0 00000004
3fff39a0: 4026d679 00000005 00000000 fffffffe
3fff39b0: 00000000 3fffc6fc 00000000 3fff4b3c
3fff39c0: 0000f811 00000000 3fff11d8 00000030
3fff39d0: deadbeef deadbeef 4026da73 deadbeef
3fff39e0: 3fff5ad8 3fff5b5c 3fff5ad4 deadbeef
3fff39f0: deadbeef 3fff52b8 0000001a 3fff5db8
3fff3a00: 0000001a deadbeef deadbeef deadbeef
3fff3a10: deadbeef deadbeef deadbeef 3fff5dd4
3fff3a20: 000005c2 3fff5cd4 3fff52d4 40237e44
3fff3a30: 3fff5ab8 deadbeef deadbeef deadbeef
3fff3a40: 00000250 00000005 deadbeef 3fff11d8
3fff3a50: 00000000 00000000 3fff52d4 40238439
3fff3a60: 00000100 deadbeef deadbeef deadbeef
3fff3a70: deadbeef 00000000 3fff4b3c 402093b8
ctx: cont
sp: 3ffffde0 end: 3fffffc0 offset: 0000
3ffffde0: 00000000 00000000 00003a98 40208400
3ffffdf0: 000005c2 6e00c440 c4c69916 284c5820
3ffffe00: 00000008 00000001 000024a9 00000000
3ffffe10: 40238f4c 40238f9c 3fff52d4 4023858a
3ffffe20: 3fff57d4 3fff4d44 3fff52d4 3fff4d44
3ffffe30: 00000000 00000001 3fff4b3c 40208453
3ffffe40: 00000000 00000001 3fff4b3c 40208643
3ffffe50: 40105b5d 3fff135c 3fff135c 000000c9
3ffffe60: 00000000 00000000 000022b3 4021733a
3ffffe70: 00000000 3fff4b3c 3fff4cd4 4020746e
3ffffe80: 3fff5194 00000010 3fffff5c 3fff45f4
3ffffe90: 000022b3 3fff4d44 3fff4b3c 3fff45f4
3ffffea0: 000022b3 3fff4d44 3fff4b3c 402086e5
3ffffeb0: 4021bbac 9e5c4936 4021bbac 9e5c4936
3ffffec0: 00000000 3fff4c94 3fff4cbc 4021a08a
3ffffed0: 00000000 3fff4c94 3fff4cbc 4020b3e8
3ffffee0: 3ffe88ec 3fff135c 00000005 000000a4
3ffffef0: 00000000 3fffff74 00000000 00000000
3fffff00: 00000001 3ffe88d2 3fff11a0 40214c34
3fffff10: 40214c28 3ffe88d2 3fff11a0 3fff0f30
3fffff20: 3fff0c48 3fff0d44 3fff11a0 4020b5d0
3fffff30: 00000000 00000000 00000001 402150d0
3fffff40: 3fff0c48 3fff0d44 3fff11a0 4020575a
3fffff50: 3fff0f30 00000001 3fff0c54 3fff4cbc
3fffff60: 000f000f 8a003837 3fff4c94 0012001f
3fffff70: 8a003439 36384d53 4a4b3252 0a003439
3fffff80: 3fffdad0 3fff0d44 3fff0c3c 3fff12f4
3fffff90: 3fffdad0 00000000 3fff0d44 40205b09
3fffffa0: 3fffdad0 00000000 3fff12e0 40216d40
3fffffb0: feefeffe feefeffe 3ffe8650 40100dd9
<<<stack<<<
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
I expect to a successful and stable connection to MQTT Broker

Mtdoops cannot save the full panic log

I add a mtd partition (512kb) to save panic log by mtdoops on an arm based embedded devices(kernel v4.4).
I trigger the panic using "echo c > /proc/sysrq-trigger".
After the device reboot observe the kernel panic logs in the Oops partition by "strings", but the panic log seems to be truncated(limit in 2kb?).
How to change the limit of mtdoops?
# strings /dev/mtd22
]<4>[ 99.089308] r3 : 00000001 r2 : 00000000 r1 : ef717364 r0 : 00000063
<4>[ 99.095905] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
<4>[ 99.102416] Control: 10c5787d Table: 6652c06a DAC: 00000055
<0>[ 99.109618] Process ash (pid: 234, stack limit = 0xee672210)
<0>[ 99.115350] Stack: (0xee673ec8 to 0xee674000)
<0>[ 99.121077] 3ec0: 00000002 ee80b200 00000001 00000000 c0301d24 c058a8dc
<0>[ 99.125336] 3ee0: c058a8a0 c0421b98 00000002 c0421b28 ee673f88 b675fbf0 c0301d24 c03df2ec
<0>[ 99.133495] 3f00: 00000000 000006c0 00000000 00000000 00000000 ee673f18 be461b48 0000000b
<0>[ 99.141656] 3f20: eeab0218 0000000a eeab0240 00080000 ee673f60 ee7531f8 00000001 e4b70780
<0>[ 99.149816] 3f40: ef046998 c0355734 00000002 00000002 e4b70780 ee673f88 b675fbf0 c03df9c0
<0>[ 99.157975] 3f60: e4b70780 b675fbf0 00000002 e4b70780 e4b70780 b675fbf0 00000002 c0301d24
<0>[ 99.166134] 3f80: ee672000 c03e009c 00000000 00000000 00000002 00000000 00000000 00000000
<0>[ 99.174294] 3fa0: 00000004 c0301b80 00000000 00000000 00000001 b675fbf0 00000002 00000000
<0>[ 99.182455] 3fc0: 00000000 00000000 00000000 00000004 00000002 be4619cc 00000020 7f087b44
<0>[ 99.190615] 3fe0: be461958 be461944 b67b66ac b67b5b78 60000010 00000001 00000000 00000000
<4>[ 99.198784] [<c058a480>] (sysrq_handle_crash) from [<c058a7dc>] (__handle_sysrq+0x88/0x124)
<4>[ 99.206940] [<c058a7dc>] (__handle_sysrq) from [<c058a8dc>] (write_sysrq_trigger+0x3c/0x4c)
<4>[ 99.215102] [<c058a8dc>] (write_sysrq_trigger) from [<c0421b98>] (proc_reg_write+0x70/0x84)
<4>[ 99.223435] [<c0421b98>] (proc_reg_write) from [<c03df2ec>] (__vfs_write+0x1c/0xd0)
<4>[ 99.231763] [<c03df2ec>] (__vfs_write) from [<c03df9c0>] (vfs_write+0xa8/0x130)
<4>[ 99.239401] [<c03df9c0>] (vfs_write) from [<c03e009c>] (SyS_write+0x40/0x80)
<4>[ 99.246695] [<c03e009c>] (SyS_write) from [<c0301b80>] (ret_fast_syscall+0x0/0x34)
<0>[ 99.253986] Code: e3a03001 e5823000 f57ff04e e3a02000 (e5c23000)
<4>[ 99.268628]
UBI#
UBI#
UBI#
#
#
# strings /dev/mtd22 | wc -c
2057
#
#

Kafka stream window aggregation almost working

I need to aggregate some sensor data and I'm experimenting with windowed aggregation for a PoC/study project.
After researching here and there and a lot of attempts, I came up with the following code, which seems to be working.
I get in fact the peeks showing the expected results and I can also see the deserialisation/serialisation of the SensorData object happening through the stream.
And I can see the final result in the output topic.
Here is the problem though: after the first result is written in the output topic, the stream crashes and it crashes earlier or later depending on the length of the commitMs.
Any idea? Am I doing something wrong here?
I am using a landoop/fast-data-dev docker image to test this.
long commitMs = TBD;
Properties config = new Properties();
config.put(StreamsConfig.APPLICATION_ID_CONFIG, "sensor-data-stream-analyzer");
config.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "kafka-cluster1:9092");
config.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
config.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());
config.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass());
config.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, commitMs);
config.put(StreamsConfig.DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG, WallclockTimestampExtractor.class);
final Serializer<SensorReport> jsonSerializer = new MyJsonSerializer();
final Deserializer<SensorReport> jsonDeserializer = new MyJsonDeserializer(SensorReport.class);
final Serde<SensorReport> jsonSerde = Serdes.serdeFrom(jsonSerializer, jsonDeserializer);
final Serde<String> stringSerde = Serdes.String();
final Serde<Long> longSerde = Serdes.Long();
StreamsBuilder builder = new StreamsBuilder();
KStream<String, SensorReport> stream =
builder.stream(inputTopic, Consumed.with(stringSerde, jsonSerde));
stream
.peek((k,v)-> System.out.println("1|k: " + k + "v: " + v.toString()))
.map((key, sensorReport) -> {
double[] fakeLatLon = new double[]{10,10};
return KeyValue.pair(String.format("%f %f", fakeLatLon[0], fakeLatLon[1]), sensorReport);
})
.peek((k,v)-> System.out.println("2|k: " + k + "v: " + v.toString()))
.groupByKey(Serialized.with(stringSerde, jsonSerde))
.windowedBy(TimeWindows.of(10000L).until(10000L))
.count()
.toStream((k, v) -> String.format("%d %s", k.window().start(), k.key()))
.peek((k,v)-> System.out.println("3|k: " + k + "v: " + v.toString()))
.map((k,v) -> KeyValue.pair(k, v.toString()))
.to(outputTopic, Produced.with(stringSerde, stringSerde));
KafkaStreams run = new KafkaStreams(builder.build(), getConfig());
run.start();
And this is the relevant part of the stack trace:
Stack: [0x00007faacee5f000,0x00007faacef5fad0], sp=0x00007faacef5b3b8, free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x0000000000149aa6
C [librocksdbjni6827723631295059350.so+0x3dc5b8]
C [librocksdbjni6827723631295059350.so+0x3e13b5] rocksdb::ParseColumnFamilyOption(std::string const&, std::string const&, rocksdb::ColumnFamilyOptions*, bool)+0xc95
C [librocksdbjni6827723631295059350.so+0x3e2282] rocksdb::GetColumnFamilyOptionsFromMapInternal(rocksdb::ColumnFamilyOptions const&, std::unordered_map<std::string, std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, rocksdb::ColumnFamilyOptions*, bool, std::vector<std::string, std::allocator<std::string> >*, bool)+0x582
C [librocksdbjni6827723631295059350.so+0x3e2480] rocksdb::GetColumnFamilyOptionsFromMap(rocksdb::ColumnFamilyOptions const&, std::unordered_map<std::string, std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, rocksdb::ColumnFamilyOptions*, bool, bool)+0x20
C [librocksdbjni6827723631295059350.so+0x3e8d5e] rocksdb::RocksDBOptionsParser::EndSection(rocksdb::OptionSection, std::string const&, std::string const&, std::unordered_map<std::string, std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, bool)+0x5ee
C [librocksdbjni6827723631295059350.so+0x3e97ac] rocksdb::RocksDBOptionsParser::Parse(std::string const&, rocksdb::Env*, bool)+0x5fc
C [librocksdbjni6827723631295059350.so+0x3ea8df] rocksdb::RocksDBOptionsParser::VerifyRocksDBOptionsFromFile(rocksdb::DBOptions const&, std::vector<std::string, std::allocator<std::string> > const&, std::vector<rocksdb::ColumnFamilyOptions, std::allocator<rocksdb::ColumnFamilyOptions> > const&, std::string const&, rocksdb::Env*, rocksdb::OptionsSanityCheckLevel, bool)+0x7f
C [librocksdbjni6827723631295059350.so+0x3ec7a3] rocksdb::PersistRocksDBOptions(rocksdb::DBOptions const&, std::vector<std::string, std::allocator<std::string> > const&, std::vector<rocksdb::ColumnFamilyOptions, std::allocator<rocksdb::ColumnFamilyOptions> > const&, std::string const&, rocksdb::Env*)+0x1013
C [librocksdbjni6827723631295059350.so+0x2e8540] rocksdb::DBImpl::WriteOptionsFile(bool, bool)+0x960
C [librocksdbjni6827723631295059350.so+0x315e68] rocksdb::DB::Open(rocksdb::DBOptions const&, std::string const&, std::vector<rocksdb::ColumnFamilyDescriptor, std::allocator<rocksdb::ColumnFamilyDescriptor> > const&, std::vector<rocksdb::ColumnFamilyHandle*, std::allocator<rocksdb::ColumnFamilyHandle*> >*, rocksdb::DB**)+0x16c8
C [librocksdbjni6827723631295059350.so+0x316937] rocksdb::DB::Open(rocksdb::Options const&, std::string const&, rocksdb::DB**)+0x177
C [librocksdbjni6827723631295059350.so+0x28240a] std::_Function_handler<rocksdb::Status (rocksdb::Options const&, std::string const&, rocksdb::DB**), rocksdb::Status (*)(rocksdb::Options const&, std::string const&, rocksdb::DB**)>::_M_invoke(std::_Any_data const&, rocksdb::Options const&, std::string const&, rocksdb::DB**)+0x1a
C [librocksdbjni6827723631295059350.so+0x27b2ae] rocksdb_open_helper(JNIEnv_*, long, _jstring*, std::function<rocksdb::Status (rocksdb::Options const&, std::string const&, rocksdb::DB**)>)+0x7e
C [librocksdbjni6827723631295059350.so+0x27b3ee] Java_org_rocksdb_RocksDB_open__JLjava_lang_String_2+0x3e
j org.rocksdb.RocksDB.open(JLjava/lang/String;)J+0
j org.rocksdb.RocksDB.open(Lorg/rocksdb/Options;Ljava/lang/String;)Lorg/rocksdb/RocksDB;+9
j org.apache.kafka.streams.state.internals.RocksDBStore.openDB(Ljava/io/File;Lorg/rocksdb/Options;I)Lorg/rocksdb/RocksDB;+25
j org.apache.kafka.streams.state.internals.RocksDBStore.openDB(Lorg/apache/kafka/streams/processor/ProcessorContext;)V+282
j org.apache.kafka.streams.state.internals.Segment.openDB(Lorg/apache/kafka/streams/processor/ProcessorContext;)V+2
j org.apache.kafka.streams.state.internals.Segments.getOrCreateSegment(JLorg/apache/kafka/streams/processor/ProcessorContext;)Lorg/apache/kafka/streams/state/internals/Segment;+102
j org.apache.kafka.streams.state.internals.RocksDBSegmentedBytesStore.put(Lorg/apache/kafka/common/utils/Bytes;[B)V+27
j org.apache.kafka.streams.state.internals.RocksDBWindowStore.put(Ljava/lang/Object;Ljava/lang/Object;J)V+29
j org.apache.kafka.streams.state.internals.ChangeLoggingWindowBytesStore.put(Lorg/apache/kafka/common/utils/Bytes;[BJ)V+7
j org.apache.kafka.streams.state.internals.ChangeLoggingWindowBytesStore.put(Ljava/lang/Object;Ljava/lang/Object;J)V+10
j org.apache.kafka.streams.state.internals.CachingWindowStore$1.apply(Ljava/util/List;)V+117
j org.apache.kafka.streams.state.internals.NamedCache.flush(Lorg/apache/kafka/streams/state/internals/NamedCache$LRUNode;)V+356
j org.apache.kafka.streams.state.internals.NamedCache.flush()V+2
j org.apache.kafka.streams.state.internals.ThreadCache.flush(Ljava/lang/String;)V+22
j org.apache.kafka.streams.state.internals.CachingWindowStore.flush()V+8
j org.apache.kafka.streams.state.internals.MeteredWindowStore.flush()V+14
j org.apache.kafka.streams.processor.internals.ProcessorStateManager.flush()V+77
j org.apache.kafka.streams.processor.internals.AbstractTask.flushState()V+4
j org.apache.kafka.streams.processor.internals.StreamTask.flushState()V+12
j org.apache.kafka.streams.processor.internals.StreamTask.commit(Z)V+22
j org.apache.kafka.streams.processor.internals.StreamTask.commit()V+2
j org.apache.kafka.streams.processor.internals.AssignedTasks$1.apply(Lorg/apache/kafka/streams/processor/internals/Task;)V+1
j org.apache.kafka.streams.processor.internals.AssignedTasks.applyToRunningTasks(Lorg/apache/kafka/streams/processor/internals/TaskAction;)V+35
j org.apache.kafka.streams.processor.internals.AssignedTasks.commit()I+5
j org.apache.kafka.streams.processor.internals.TaskManager.commitAll()I+4
j org.apache.kafka.streams.processor.internals.StreamThread.maybeCommit(J)V+96
j org.apache.kafka.streams.processor.internals.StreamThread.runOnce(J)J+280
j org.apache.kafka.streams.processor.internals.StreamThread.runLoop()V+33
j org.apache.kafka.streams.processor.internals.StreamThread.run()V+36
v ~StubRoutines::call_stub
V [libjvm.so+0x41ab0a]
C 0x0000560ba0323140
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0000560ba02c2000 JavaThread "kafka-coordinator-heartbeat-thread | sensor-data-stream-analyzer" daemon [_thread_blocked, id=2505, stack(0x00007faacec5d000,0x00007faaced5dad0)]
0x0000560ba027b800 JavaThread "DestroyJavaVM" [_thread_blocked, id=2487, stack(0x00007faae7a89000,0x00007faae7b89ad0)]
0x0000560ba0325000 JavaThread "sensor-data-stream-analyzer-150fc5f9-aed6-4774-9520-a0599d8566a1-CleanupThread" daemon [_thread_blocked, id=2504, stack(0x00007faaced5e000,0x00007faacee5ead0)]
=>0x0000560ba0322000 JavaThread "sensor-data-stream-analyzer-150fc5f9-aed6-4774-9520-a0599d8566a1-StreamThread-1" [_thread_in_native, id=2503, stack(0x00007faacee5f000,0x00007faacef5fad0)]
0x0000560ba02a6800 JavaThread "kafka-producer-network-thread | sensor-data-stream-analyzer-150fc5f9-aed6-4774-9520-a0599d8566a1-StreamThread-1-producer" daemon [_thread_in_native, id=2502, stack(0x00007faacef60000,0x00007faacf060ad0)]
0x0000560ba0191800 JavaThread "kafka-admin-client-thread | sensor-data-stream-analyzer-150fc5f9-aed6-4774-9520-a0599d8566a1-admin" daemon [_thread_in_native, id=2501, stack(0x00007faacf261000,0x00007faacf361ad0)]
0x0000560b9fb20800 JavaThread "Service Thread" daemon [_thread_blocked, id=2499, stack(0x00007faad29ed000,0x00007faad2aedad0)]
0x0000560b9faef800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=2498, stack(0x00007faad2aef000,0x00007faad2befad0)]
0x0000560b9faa1000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=2497, stack(0x00007faad2bf1000,0x00007faad2cf1ad0)]
0x0000560b9fa94000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=2496, stack(0x00007faad2cf3000,0x00007faad2df3ad0)]
0x0000560b9fa91800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2495, stack(0x00007faad2df4000,0x00007faad2ef4ad0)]
0x0000560b9fa64800 JavaThread "Finalizer" daemon [_thread_blocked, id=2494, stack(0x00007faad2ef5000,0x00007faad2ff5ad0)]
0x0000560b9fa5a000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2493, stack(0x00007faad2ff6000,0x00007faad30f6ad0)]
Internal exceptions (10 events):
Event: 1.360 Thread 0x0000560b9f909000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x00000000e2109468) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp, line 613]
Event: 1.715 Thread 0x0000560ba0191800 Exception <a 'java/lang/NoSuchMethodError': java.lang.Object.lambda$identity$2(Ljava/lang/Object;)Ljava/lang/Object;> (0x00000000e1213bd0) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/interpreter/lin
Event: 1.949 Thread 0x0000560ba0322000 Implicit null exception at 0x00007faad8cd8235 to 0x00007faad8cd85dd
Event: 3.059 Thread 0x0000560ba0322000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e1c1e250) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 3.074 Thread 0x0000560ba0322000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e1c7b6e8) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 3.076 Thread 0x0000560ba0322000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e1c854a8) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 3.077 Thread 0x0000560ba0322000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e1c8e7e8) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 3.079 Thread 0x0000560ba0322000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e1c98678) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 3.080 Thread 0x0000560ba0322000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e1ca2470) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 12.177 Thread 0x0000560ba0322000 Exception <a 'sun/nio/fs/UnixException'> (0x00000000e145de70) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.11.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Dynamic libraries:
560b9f7b0000-560b9f7b1000 r--p 00000000 08:01 1189695 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java
560b9f7b1000-560b9f7b2000 r-xp 00001000 08:01 1189695 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java
560b9f7b2000-560b9f7b3000 r--p 00002000 08:01 1189695 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java
560b9f7b3000-560b9f7b4000 r--p 00002000 08:01 1189695 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java
560b9f7b4000-560b9f7b5000 rw-p 00003000 08:01 1189695 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java
7faacdfd0000-7faace1f4000 r-xp 00000000 08:01 1317566 /usr/glibc-compat/lib/ld-2.27.so
7faace1f4000-7faace1f5000 r--p 00024000 08:01 1317566 /usr/glibc-compat/lib/ld-2.27.so
7faace1f5000-7faace1f6000 rw-p 00025000 08:01 1317566 /usr/glibc-compat/lib/ld-2.27.so
7faace1f7000-7faacea32000 r-xp 00000000 08:01 1320848 /tmp/librocksdbjni6827723631295059350.so
7faacea32000-7faacea50000 rw-p 0063b000 08:01 1320848 /tmp/librocksdbjni6827723631295059350.so
7faacf562000-7faacf569000 r--p 00000000 08:01 1311101 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnio.so
7faacf569000-7faacf571000 r-xp 00007000 08:01 1311101 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnio.so
7faacf571000-7faacf575000 r--p 0000f000 08:01 1311101 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnio.so
7faacf575000-7faacf576000 r--p 00012000 08:01 1311101 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnio.so
7faacf576000-7faacf577000 rw-p 00013000 08:01 1311101 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnio.so
7faad2578000-7faad257c000 r--p 00000000 08:01 1311100 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnet.so
7faad257c000-7faad258b000 r-xp 00004000 08:01 1311100 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnet.so
7faad258b000-7faad2590000 r--p 00013000 08:01 1311100 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnet.so
7faad2590000-7faad2591000 r--p 00017000 08:01 1311100 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnet.so
7faad2591000-7faad2592000 rw-p 00018000 08:01 1311100 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libnet.so
7faad2592000-7faad2596000 r--p 00000000 08:01 1311098 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libmanagement.so
7faad2596000-7faad2599000 r-xp 00004000 08:01 1311098 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libmanagement.so
7faad2599000-7faad259b000 r--p 00007000 08:01 1311098 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libmanagement.so
7faad259b000-7faad259c000 r--p 00008000 08:01 1311098 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libmanagement.so
7faad259c000-7faad259d000 rw-p 00009000 08:01 1311098 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libmanagement.so
7faad259d000-7faad25a1000 r--s 00058000 08:01 1189715 /usr/lib/jvm/java-1.8-openjdk/jre/lib/jsse.jar
7faad27a1000-7faad28eb000 r--s 01cb4000 00:51 8654897590 /kafka-dev/sensor-stream-analyzer-1.0-jar-with-dependencies.jar
7faad4156000-7faad4325000 r--s 01f54000 08:01 1189724 /usr/lib/jvm/java-1.8-openjdk/jre/lib/rt.jar
7faae7a30000-7faae7a33000 r--p 00000000 08:01 1311106 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libzip.so
7faae7a33000-7faae7a37000 r-xp 00003000 08:01 1311106 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libzip.so
7faae7a37000-7faae7a39000 r--p 00007000 08:01 1311106 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libzip.so
7faae7a39000-7faae7a3a000 r--p 00008000 08:01 1311106 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libzip.so
7faae7a3a000-7faae7a3b000 rw-p 00009000 08:01 1311106 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libzip.so
7faae7a3b000-7faae7a43000 rw-s 00000000 08:01 1320843 /tmp/hsperfdata_root/2486
7faae7a45000-7faae7a52000 r--p 00000000 08:01 1311090 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libjava.so
7faae7a52000-7faae7a6a000 r-xp 0000d000 08:01 1311090 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libjava.so
7faae7a6a000-7faae7a72000 r--p 00025000 08:01 1311090 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libjava.so
7faae7a72000-7faae7a73000 r--p 0002c000 08:01 1311090 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libjava.so
7faae7a73000-7faae7a74000 rw-p 0002d000 08:01 1311090 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libjava.so
7faae7a75000-7faae7a7a000 r--p 00000000 08:01 1311105 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libverify.so
7faae7a7a000-7faae7a81000 r-xp 00005000 08:01 1311105 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libverify.so
7faae7a81000-7faae7a84000 r--p 0000c000 08:01 1311105 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libverify.so
7faae7a84000-7faae7a86000 r--p 0000e000 08:01 1311105 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libverify.so
7faae7a86000-7faae7a87000 rw-p 00010000 08:01 1311105 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libverify.so
7faae7b8a000-7faae7b8d000 r--p 00000000 08:01 1189738 /usr/lib/libgcc_s.so.1
7faae7b8d000-7faae7b99000 r-xp 00003000 08:01 1189738 /usr/lib/libgcc_s.so.1
7faae7b99000-7faae7b9c000 r--p 0000f000 08:01 1189738 /usr/lib/libgcc_s.so.1
7faae7b9c000-7faae7b9d000 r--p 00011000 08:01 1189738 /usr/lib/libgcc_s.so.1
7faae7b9d000-7faae7b9e000 rw-p 00012000 08:01 1189738 /usr/lib/libgcc_s.so.1
7faae7b9e000-7faae7c3a000 r--p 00000000 08:01 1189800 /usr/lib/libstdc++.so.6.0.25
7faae7c3a000-7faae7ca8000 r-xp 0009c000 08:01 1189800 /usr/lib/libstdc++.so.6.0.25
7faae7ca8000-7faae7ce1000 r--p 0010a000 08:01 1189800 /usr/lib/libstdc++.so.6.0.25
7faae7ce1000-7faae7cef000 r--p 00142000 08:01 1189800 /usr/lib/libstdc++.so.6.0.25
7faae7cef000-7faae7cf0000 rw-p 00150000 08:01 1189800 /usr/lib/libstdc++.so.6.0.25
7faae7cf3000-7faae7ee7000 r--p 00000000 08:01 1311110 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libjvm.so
7faae7ee7000-7faae82f4000 r-xp 001f4000 08:01 1311110 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libjvm.so
7faae82f4000-7faae84b9000 r--p 00601000 08:01 1311110 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libjvm.so
7faae84b9000-7faae854f000 r--p 007c5000 08:01 1311110 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libjvm.so
7faae854f000-7faae8577000 rw-p 0085b000 08:01 1311110 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libjvm.so
7faae85a8000-7faae85ab000 r--p 00000000 08:01 1310764 /lib/libz.so.1.2.11
7faae85ab000-7faae85b9000 r-xp 00003000 08:01 1310764 /lib/libz.so.1.2.11
7faae85b9000-7faae85c0000 r--p 00011000 08:01 1310764 /lib/libz.so.1.2.11
7faae85c0000-7faae85c1000 r--p 00017000 08:01 1310764 /lib/libz.so.1.2.11
7faae85c1000-7faae85c2000 rw-p 00018000 08:01 1310764 /lib/libz.so.1.2.11
7faae85c2000-7faae85c4000 r--p 00000000 08:01 1311076 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/jli/libjli.so
7faae85c4000-7faae85cd000 r-xp 00002000 08:01 1311076 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/jli/libjli.so
7faae85cd000-7faae85d1000 r--p 0000b000 08:01 1311076 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/jli/libjli.so
7faae85d1000-7faae85d2000 r--p 0000e000 08:01 1311076 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/jli/libjli.so
7faae85d2000-7faae85d3000 rw-p 0000f000 08:01 1311076 /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/jli/libjli.so
7faae85d3000-7faae85ea000 r--p 00000000 08:01 1320878 /lib/ld-musl-x86_64.so.1
7faae85ea000-7faae862f000 r-xp 00017000 08:01 1320878 /lib/ld-musl-x86_64.so.1
7faae862f000-7faae8661000 r--p 0005c000 08:01 1320878 /lib/ld-musl-x86_64.so.1
7faae8661000-7faae8662000 r--p 0008d000 08:01 1320878 /lib/ld-musl-x86_64.so.1
7faae8662000-7faae8663000 rw-p 0008e000 08:01 1320878 /lib/ld-musl-x86_64.so.1
--------------- S Y S T E M ---------------
OS:NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.9.2
PRETTY_NAME="Alpine Linux v3.9"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
I solved my problem and I'm going to share my solution here for whoever ends up having this same problem.
Initially the stack trace line "C [librocksdbjni6827723631295059350.so+0x3e13b5] rocksdb::ParseColumnFamilyOption(std::string const&, std::string const&, rocksdb::ColumnFamilyOptions*, bool)+0xc95" led me to think it was a musl-libc vs glibc related issue as mentioned in the following two issue links:
https://github.com/facebook/rocksdb/issues/3848
https://github.com/facebook/rocksdb/pull/3143
In fact I use a landoop/fast-data-dev:latest docker image, which is Alpine based. But a quick look at the landoop/fast-data-dev, shows that the author dealt with the glibc:
https://github.com/Landoop/fast-data-dev/blob/master/Dockerfile
# glibc : alpine linux has an embedded libc which misses some functions that are
# needed by some apps (e.g jvm's rocksdb jni — HDFS connector, Lenses, etc),
# so we add glibc to make them work. Also now we can add en_US.UTF-8 locale.
# https://github.com/sgerrand/alpine-pkg-glibc
The crash went away by simply replacing the kafka-stream dependency in my pom.xml from
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>2.0.1</version>
</dependency>
to
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>2.2.0</version>
</dependency>

Using range on AnyObject value

I'm working on a bluetooth project at the moment and after getting the value of the kCBAdvDataManufacturerData:
var data = advertisementData.value(forKey: "kCBAdvDataManufacturerData")
The values are hex values:
<00133377 08d704de ff03c200 00000000 00000000 00000000 00000000 00337701 416e746f 6e206465 20426f64 65000000 00000000 00000000>
what I know so far is that the value of kCBAdvDataManufacturerDatakey is an AnyObject
From the above value I need this:
00133377 08d704de ff03c200 00000000 00000000 00000000 00000000 00337701 416e746f 6e206465 20426f64 65000000 00000000 00000000
How can I get this value without converting it to a String? In other word is there a way to use something like Range on a AnyObject value without converting it to a String?

Unexpected rowpitch from WIC texture to DX11 texture

I am confused as to why I am getting 128 bytes for scan-lines/rowpitch rather than the 8 I am specifying. The BMP in question being loaded is 4 pixels, red top left, green top right, blue bottom left, yellow bottom right.
Code is as follows:
ID3D11Resource *g_pOverlay_Staging = nullptr;
IWICImagingFactory* WICFactory = nullptr;
IWICBitmapDecoder * WICBitmapDecoder = nullptr;
IWICBitmapFrameDecode * WICBitmapFrame = nullptr;
WICPixelFormatGUID pixelFormat;
HR(CoCreateInstance(CLSID_WICImagingFactory, nullptr, CLSCTX_INPROC_SERVER, __uuidof(IWICImagingFactory), (LPVOID*)&WICFactory));
HR(WICFactory->CreateDecoderFromFilename(L"province_map.bmp", nullptr, GENERIC_READ, WICDecodeMetadataCacheOnDemand, &WICBitmapDecoder));
HR(WICBitmapDecoder->GetFrame(0,&WICBitmapFrame));
HR(WICBitmapFrame->GetPixelFormat(&pixelFormat));
DXGI_FORMAT format;
if (pixelFormat == GUID_WICPixelFormat24bppBGR){
std::wostringstream outs2;
outs2 << "pixelformat = GUID_WICPixelFormat24bppBGR" << std::endl;
OutputDebugString(outs2.str().c_str());
format = DXGI_FORMAT_R8G8B8A8_UNORM;
}
IWICFormatConverter * FC = nullptr;
WICFactory->CreateFormatConverter(&FC);
HR(FC->Initialize(WICBitmapFrame, GUID_WICPixelFormat32bppRGBA, WICBitmapDitherTypeErrorDiffusion, 0, 0, WICBitmapPaletteTypeCustom));
std::unique_ptr<uint8_t[]> temp(new uint8_t[16]);
HR(FC->CopyPixels(0, 8, 16, temp.get()));
D3D11_TEXTURE2D_DESC desc;
desc.Width = 2;
desc.Height = 2;
desc.MipLevels = 1;
desc.ArraySize = 1;
desc.Format = format;
desc.SampleDesc.Count = 1;
desc.SampleDesc.Quality = 0;
desc.Usage = D3D11_USAGE_STAGING;
desc.BindFlags = 0;
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE | D3D11_CPU_ACCESS_READ;
desc.MiscFlags = 0;
D3D11_SUBRESOURCE_DATA initData;
initData.pSysMem = temp.get();
initData.SysMemPitch = 8;
initData.SysMemSlicePitch = 16;
ID3D11Texture2D* tex = nullptr;
HR(d3d11DeviceInterface->CreateTexture2D(&desc, &initData, &tex));
g_pOverlay_Staging = tex;
D3D11_MAPPED_SUBRESOURCE mapped_subresource;
HR(d3d11DeviceContextInterface->Map(g_pOverlay_Staging, 0, D3D11_MAP_READ_WRITE, 0, &mapped_subresource));
uint8_t * v = reinterpret_cast<uint8_t*>(mapped_subresource.pData);
unsigned int x = 0;
while (x < 256 ) {
std::bitset<8> one(v[x]);
std::bitset<8> two(v[x+1]);
std::bitset<8> three(v[x+2]);
std::bitset<8> four(v[x + 3]);
std::wostringstream outs1;
outs1 << "x[" << x << "] = " << one << " x[" << x + 1 << "] = " << two << " x[" << x + 2 << "] = " << three << " x[" << x + 3 << "] = " << four << std::endl;
OutputDebugString(outs1.str().c_str());
x += 4;
}
Output is:
pixelformat = GUID_WICPixelFormat24bppBGR
x[0] = 11111111 x[1] = 00000000 x[2] = 00000000 x[3] = 11111111
x[4] = 00000000 x[5] = 11111111 x[6] = 00000000 x[7] = 11111111
x[8] = 00000000 x[9] = 00000000 x[10] = 00000000 x[11] = 00000000
x[12] = 00000000 x[13] = 00000000 x[14] = 00000000 x[15] = 00000000
x[16] = 00000000 x[17] = 00000000 x[18] = 00000000 x[19] = 00000000
x[20] = 00000000 x[21] = 00000000 x[22] = 00000000 x[23] = 00000000
x[24] = 00000000 x[25] = 00000000 x[26] = 00000000 x[27] = 00000000
x[28] = 00000000 x[29] = 00000000 x[30] = 00000000 x[31] = 00000000
x[32] = 00000000 x[33] = 00000000 x[34] = 00000000 x[35] = 00000000
x[36] = 00000000 x[37] = 00000000 x[38] = 00000000 x[39] = 00000000
x[40] = 00000000 x[41] = 00000000 x[42] = 00000000 x[43] = 00000000
x[44] = 00000000 x[45] = 00000000 x[46] = 00000000 x[47] = 00000000
x[48] = 00000000 x[49] = 00000000 x[50] = 00000000 x[51] = 00000000
x[52] = 00000000 x[53] = 00000000 x[54] = 00000000 x[55] = 00000000
x[56] = 00000000 x[57] = 00000000 x[58] = 00000000 x[59] = 00000000
x[60] = 00000000 x[61] = 00000000 x[62] = 00000000 x[63] = 00000000
x[64] = 00000000 x[65] = 00000000 x[66] = 00000000 x[67] = 00000000
x[68] = 00000000 x[69] = 00000000 x[70] = 00000000 x[71] = 00000000
x[72] = 00000000 x[73] = 00000000 x[74] = 00000000 x[75] = 00000000
x[76] = 00000000 x[77] = 00000000 x[78] = 00000000 x[79] = 00000000
x[80] = 00000000 x[81] = 00000000 x[82] = 00000000 x[83] = 00000000
x[84] = 00000000 x[85] = 00000000 x[86] = 00000000 x[87] = 00000000
x[88] = 00000000 x[89] = 00000000 x[90] = 00000000 x[91] = 00000000
x[92] = 00000000 x[93] = 00000000 x[94] = 00000000 x[95] = 00000000
x[96] = 00000000 x[97] = 00000000 x[98] = 00000000 x[99] = 00000000
x[100] = 00000000 x[101] = 00000000 x[102] = 00000000 x[103] = 00000000
x[104] = 00000000 x[105] = 00000000 x[106] = 00000000 x[107] = 00000000
x[108] = 00000000 x[109] = 00000000 x[110] = 00000000 x[111] = 00000000
x[112] = 00000000 x[113] = 00000000 x[114] = 00000000 x[115] = 00000000
x[116] = 00000000 x[117] = 00000000 x[118] = 00000000 x[119] = 00000000
x[120] = 00000000 x[121] = 00000000 x[122] = 00000000 x[123] = 00000000
x[124] = 00000000 x[125] = 00000000 x[126] = 00000000 x[127] = 00000000
x[128] = 00000000 x[129] = 00000000 x[130] = 11111111 x[131] = 11111111
x[132] = 11111111 x[133] = 11111111 x[134] = 00000000 x[135] = 11111111
x[136] = 00000000 x[137] = 00000000 x[138] = 00000000 x[139] = 00000000
x[140] = 00000000 x[141] = 00000000 x[142] = 00000000 x[143] = 00000000
x[144] = 00000000 x[145] = 00000000 x[146] = 00000000 x[147] = 00000000
x[148] = 00000000 x[149] = 00000000 x[150] = 00000000 x[151] = 00000000
x[152] = 00000000 x[153] = 00000000 x[154] = 00000000 x[155] = 00000000
x[156] = 00000000 x[157] = 00000000 x[158] = 00000000 x[159] = 00000000
x[160] = 00000000 x[161] = 00000000 x[162] = 00000000 x[163] = 00000000
x[164] = 00000000 x[165] = 00000000 x[166] = 00000000 x[167] = 00000000
x[168] = 00000000 x[169] = 00000000 x[170] = 00000000 x[171] = 00000000
x[172] = 00000000 x[173] = 00000000 x[174] = 00000000 x[175] = 00000000
x[176] = 00000000 x[177] = 00000000 x[178] = 00000000 x[179] = 00000000
x[180] = 00000000 x[181] = 00000000 x[182] = 00000000 x[183] = 00000000
x[184] = 00000000 x[185] = 00000000 x[186] = 00000000 x[187] = 00000000
x[188] = 00000000 x[189] = 00000000 x[190] = 00000000 x[191] = 00000000
x[192] = 00000000 x[193] = 00000000 x[194] = 00000000 x[195] = 00000000
x[196] = 00000000 x[197] = 00000000 x[198] = 00000000 x[199] = 00000000
x[200] = 00000000 x[201] = 00000000 x[202] = 00000000 x[203] = 00000000
x[204] = 00000000 x[205] = 00000000 x[206] = 00000000 x[207] = 00000000
x[208] = 00000000 x[209] = 00000000 x[210] = 00000000 x[211] = 00000000
x[212] = 00000000 x[213] = 00000000 x[214] = 00000000 x[215] = 00000000
x[216] = 00000000 x[217] = 00000000 x[218] = 00000000 x[219] = 00000000
x[220] = 00000000 x[221] = 00000000 x[222] = 00000000 x[223] = 00000000
x[224] = 00000000 x[225] = 00000000 x[226] = 00000000 x[227] = 00000000
x[228] = 00000000 x[229] = 00000000 x[230] = 00000000 x[231] = 00000000
x[232] = 00000000 x[233] = 00000000 x[234] = 00000000 x[235] = 00000000
x[236] = 00000000 x[237] = 00000000 x[238] = 00000000 x[239] = 00000000
x[240] = 00000000 x[241] = 00000000 x[242] = 00000000 x[243] = 00000000
x[244] = 00000000 x[245] = 00000000 x[246] = 00000000 x[247] = 00000000
x[248] = 00000000 x[249] = 00000000 x[250] = 00000000 x[251] = 00000000
x[252] = 00000000 x[253] = 00000000 x[254] = 00000000 x[255] = 00000000
This is expected. After you've uploaded texture memory to the GPU, if you Map it back for read, there's no guarantee that it will come back with the same pitch that you uploaded it as. This is because on upload, the driver re-lays out memory in a way that's optimal for rendering. When you bring it back to the CPU, the driver efficiently converts it back to linear format, usually in a way that reflects various properties of the texture cache or page size.

Resources