Menu

#40 Paste a number of bytes causing a crash

closed-fixed
7
2009-05-29
2009-04-28
No

I have one instance of FRHED open. Copy 4096 Bytes. I open another instance with another file. I paste to position 0 of the file. I want to insert the new bytes at the top of the file.

This crashes frhed.

Discussion

  • Kimmo Varis

    Kimmo Varis - 2009-04-28

    I tested this few times with Frhed 1.4.2 and 1.5.2 and didn't see the crash. Does it crash for you with every file you try to do the paste, or perhaps with only some file(s)?

     
  • Anonymous

    Anonymous - 2009-04-28

    Always with the same file. Both files have nearly 4MB.
    But now I have a repro that crashes always.
    Copy 4096 from File 1 from Byte 00x0, replace first 512 Bytes in File 2 (select from byte 0x0 next 0x200 and paste the 0x1000 Bytes).
    Crash.

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-03
    • priority: 5 --> 7
    • assigned_to: nobody --> kimmov
     
  • Kimmo Varis

    Kimmo Varis - 2009-05-03

    Thanks for details, now I got the crash too. Looking at it...

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-04

    I found another (simpler) way to reproduce this crash: just select few lines of bytes of the file, so that the selection length is greater than first offset. Then copy the bytes and paste back with default dialog values.

    At least it looks like the same crash. I'm inspecting this with debugger...

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-04

    Patch also good for 1.4 branch

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-04

    The bug was that code copying bytes in new place when creating a space for new bytes didn't calculate amount of bytes to copy correctly.

    Attached a patch (Fix_crash_copying_bytes.patch) that is good for the 1.4 stable branch also.

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-04

    Committed the fix to SVN trunk:
    Completed: At revision: 621

    Will be in next alpha release.

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-04
    • status: open --> open-fixed
     
  • Kimmo Varis

    Kimmo Varis - 2009-05-29

    Closing as fixed. I'm planning to do next stable release (1.6.0) in few weeks so I won't add this patch to 1.4 branch.

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-29
    • status: open-fixed --> closed-fixed
     
MongoDB Logo MongoDB