Skip to content

MEGA65_FTP: hanging when uploading single file on full storage card #232

@nobruinfo

Description

@nobruinfo

Test Environment (required)

  • Tools Platform: (Linux, MacOS, Windows)
  • Tools Version: (m65 -h) 20250718.15-develo-731f9ce
  • MEGA65 Platform: (DevKit, MEGA65, NexysA7, xemu)
  • ROM Release: (i.e. 920XXX) 920417
  • Core Commit: (7 digit hex number, press MEGA-TAB) not shown when in Xemu

Describe the bug

This happens on the real machine and in Xemu but is much easier to reproduce in Xemu. Its storage card image file can be made full much quicker.
If I try tu put upload a single file that is bigger than the last contiguous sequence of available clusters the routine unsigned int find_contiguous_clusters(unsigned int total_clusters) never comes to an end. Adding printf statements within this method proofs it is counting up the variable start_cluster until it rolls over. The surrounding while (1) needs an additional error handler to rage quit the tool entirely.

To Reproduce
Steps to reproduce the behavior:

  1. Fill the storage card (image) until less than 200MB remain available.
  2. put HYPER3.BIN from the Intro Disk collection which is more than the remaining space.
  3. Find the last output HYPER3.BIN does not yet exist on the file system -- searching for empty directory slot to create it in.
  4. After that mega65_ftp rest unconscious, [Ctrl][c] will help quitting.

Expected behavior
An error message should be thrown and the tool ended.

Screenshots
N/A.

Additional context
N/A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    newNew report, not classified yet

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions