Skip to content

[BUG] HAS_GCODE_PREVIEW thumbnail preview not working #26169

@classicrocker883

Description

@classicrocker883

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

with HAS_GCODE_PREVIEW it doesn't popup to show the thumbnail of the model preview.

also, this is the 2nd part to the issue, when it was working, it only allowed selecting 1 or 2 previews at a time before freezing/rebooting.

this is especially prevalent with 256K memory max. so im certain it has to do with the cache being stored and not cleared properly after going back to the menu.

Bug Timeline

No response

Expected behavior

suppose to show a popup with a 3D rendering image of the gcode image.
asking to confirm to print or cancel.

Actual behavior

just goes straight to print, no popup to preview and ask to confirm or cancel

Steps to Reproduce

  1. Enable DWIN_LCD_PROUI
  2. make sure HAS_GCODE_PREVIEW is enabled
  3. flash onto board
  4. go to Print menu
  5. select file with known preview image

Version of Marlin Firmware

current bugfix

Printer model

No response

Electronics

No response

Add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Marlin-Configs.zip

when I was able to have this working, there was also an issue when selecting the thumbnail preview file again.

basically anytime you go to select another or the same gcode file with preview, it would freeze/crash then reboot automatically.

a way around this was to after seeing the thumbnail - go to another file that did not have one or simply go back to another folder directory. once there it basically refreshes itself and you can select another file to preview.

I noticed that files which had larger thumbnail "cache" or whatever you want to call it - whatever was being written to the FLASH memory - or wherever its store (SRAM?) - you could only select these files once or twice in a row before it freezes/reboots.

files with smaller image sizes (which also load the preview faster) can be loaded several times 3 or 4 in a row before the issue happens.

if there is a way to clear the cache or memory after you "Cancel"/ not confirm the file to print, inorder to view another file, that would fix that issue.

i've tried a few things like

   { fileprop.thumbsize = 0; Preview_Invalidate(); delete[] fileprop.thumbdata; fileprop.clear(); card.closefile(); return }

ect... dont know where to go from there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions