Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Losing 1/2 my data in System.Collections.Queues ..

Losing 1/2 my data in System.Collections.Queues ..

Scheduled Pinned Locked Moved Visual Basic
data-structureshelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    inyoursadachine
    wrote on last edited by
    #1

    Hi, I have a byte array of data that I store in to a Queue for processing reasons. But for some strange reason half of the data I put in the Queue (exactly the last half, actually, everytime!) dequeue as nulls (0x00). The sample output below shows the problem I'm having. The first two lines are a hex dump of my "input" byte array. The next line, "CreateQueue() done" tells me that the Queue was create and has the same size as the byte array (as it should). But in my double check you can see how the last 16 bytes are all null. Anybody know what's going on? Thx, Matt ----------------------------------------------------------------- 0000: ad 00 14 00 04 02 00 00 0a 4f 70 65 6e 53 65 72 0010: 76 65 72 05 00 00 00 fd 00 00 00 00 00 00 00 00 CreateQueue() done. matt=32, queue count=32 double check: 0000: ad 00 14 00 04 02 00 00 0a 4f 70 65 6e 53 65 72 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Here's the code that populates the Queue from the byte array: foreach(byte b in Pdu.Payload) { m_qPayload.Enqueue((byte)b); }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups