Menu

#16 chkdsk reports an error message if there is no directory

freedos12
open
nobody
5
2025-12-12
2008-12-23
No

chkdsk - latest version - reports an error message on a diskette if there is no directory on the diskette. This was reported several times to Imre but still no change.

Discussion

  • Nobody/Anonymous

    http://www.freedos.org/bugzilla/cgi-bin/show_bug.cgi?id=1954

    provides a more detailed and more useful summary ;-) In particular:

    Fritz gets the error "Assertion failed: size, file bitfield.c, line 34".
    This means that something tried to allocate a zero-sized bitfield.

    This could happen at various places:

    - CompressFastTreeMap / ConvertTreeMaps, if population count is 0

    ...

    after some experimentation we found out that not
    checking A: is the problem... Chkdsk fails because
    the test diskette of Fritz has no subdirectories
    on it. This is a bug in handling of empty TreeMaps.

    I believe the problem is in ConvertTreeMaps when
    newlen stay 0 when collecting all subdirectories?
    After all, the error message MEANS that something
    tried to create a zero sized bit field. On the
    other hand, CompressFastTreeMap may also need
    modifications to deal with no field or an empty
    field being returned by ConvertTreeMaps then?

    Or would that be no problem here? It seems that we
    can handle a NULL FastTreeMap already anyway ;-)

    Thanks for fixing in any case :-)

     
  • Nobody/Anonymous

    Fixed this.

    Ironically taking out the assert would make the program run without problems. Seems that when I took a new version of the library this problem snuck in.

     
  • Kenneth Davis

    Kenneth Davis - 2010-08-28
    • labels: --> Disk Utilities
     
  • Jim Hall

    Jim Hall - 2019-10-04
    • summary: chkdsk --> chkdsk reports an error message if there is no directory
    • Group: --> freedos12
     
  • Jim Hall

    Jim Hall - 2019-10-04

    (updated title to be more accurate/searachable)

     
  • fritz.mueller

    fritz.mueller - 2024-07-31

    Assertion failed: size, file bitfield.c, line 34 was fixed with chkdsk 0.9.2
    But there is still a message:
    Assertion failed: 0, file blkcache.c, line 322 when running chkdsk /r
    This message only appears when using a real diskette drive and starting FD from virtualbox (maybe others too), but NOT if i use an image of this diskette.

     

    Last edit: fritz.mueller 2024-07-31
  • fritz.mueller

    fritz.mueller - 2025-12-12

    I just ran a test on a real (working) diskette and had no problems. So I kept it as it was.

    AI said that a fix would be to set "assert(0);" in blkcache.c, line 322 to "rem".

     

Log in to post a comment.