Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #64 [BUG] Crash and reboot after second time gcode preview. #84

Merged

Conversation

Nazar78
Copy link

@Nazar78 Nazar78 commented Oct 30, 2023

Fixes [BUG] Crash and reboot after second time gcode preview.
modified: Marlin/Configuration.h
modified: Marlin/src/lcd/e3v2/proui/custom_gcodes.cpp
modified: Marlin/src/lcd/e3v2/proui/dwin.cpp
renamed: Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.cpp -> Marlin/src/lcd/e3v2/proui/gcode_preview.cpp
modified: Marlin/src/lcd/e3v2/proui/gcode_preview.h
deleted: Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.h
modified: configurations/Andrew427/Configuration.h
modified: configurations/BTT-SKR_Mini_E3_V2/ConfigurationMM.h
modified: configurations/BTT-SKR_Mini_E3_V2/ConfigurationUBL.h
modified: configurations/BTT-SKR_Mini_E3_V3/ConfigurationMM.h
modified: configurations/BTT-SKR_Mini_E3_V3/ConfigurationUBL.h
modified: configurations/Creality Ender/BLT/Configuration.h
modified: configurations/Creality Ender/Default-NP/Configuration.h
modified: configurations/Creality Ender/MM/Configuration.h
modified: configurations/Creality Ender/UBL/Configuration.h
modified: configurations/Voxelab Aquila 427/BLT/Configuration.h
modified: configurations/Voxelab Aquila 427/Default-NP/Configuration.h
modified: configurations/Voxelab Aquila 427/MM/Configuration.h
modified: configurations/Voxelab Aquila 427/UBL/Configuration.h
modified: configurations/Voxelab Aquila/BLT/Configuration.h
modified: configurations/Voxelab Aquila/BLT/ConfigurationPro.h
modified: configurations/Voxelab Aquila/Default-NP/Configuration.h
modified: configurations/Voxelab Aquila/MM/Configuration.h
modified: configurations/Voxelab Aquila/UBL/Configuration.h
modified: configurations/Voxelab Aquila/UBL/ConfigurationPro.h
modified: configurations/Voxelab Aquila/X3/Configuration.h

modified:   Marlin/Configuration.h
modified:   Marlin/src/lcd/e3v2/proui/custom_gcodes.cpp
modified:   Marlin/src/lcd/e3v2/proui/dwin.cpp
renamed:    Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.cpp -> Marlin/src/lcd/e3v2/proui/gcode_preview.cpp
modified:   Marlin/src/lcd/e3v2/proui/gcode_preview.h
deleted:    Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.h
modified:   configurations/Andrew427/Configuration.h
modified:   configurations/BTT-SKR_Mini_E3_V2/ConfigurationMM.h
modified:   configurations/BTT-SKR_Mini_E3_V2/ConfigurationUBL.h
modified:   configurations/BTT-SKR_Mini_E3_V3/ConfigurationMM.h
modified:   configurations/BTT-SKR_Mini_E3_V3/ConfigurationUBL.h
modified:   configurations/Creality Ender/BLT/Configuration.h
modified:   configurations/Creality Ender/Default-NP/Configuration.h
modified:   configurations/Creality Ender/MM/Configuration.h
modified:   configurations/Creality Ender/UBL/Configuration.h
modified:   configurations/Voxelab Aquila 427/BLT/Configuration.h
modified:   configurations/Voxelab Aquila 427/Default-NP/Configuration.h
modified:   configurations/Voxelab Aquila 427/MM/Configuration.h
modified:   configurations/Voxelab Aquila 427/UBL/Configuration.h
modified:   configurations/Voxelab Aquila/BLT/Configuration.h
modified:   configurations/Voxelab Aquila/BLT/ConfigurationPro.h
modified:   configurations/Voxelab Aquila/Default-NP/Configuration.h
modified:   configurations/Voxelab Aquila/MM/Configuration.h
modified:   configurations/Voxelab Aquila/UBL/Configuration.h
modified:   configurations/Voxelab Aquila/UBL/ConfigurationPro.h
modified:   configurations/Voxelab Aquila/X3/Configuration.h
@Nazar78 Nazar78 marked this pull request as ready for review October 30, 2023 19:53
@Nazar78 Nazar78 marked this pull request as draft October 30, 2023 20:03
modified:   Marlin/Configuration.h
modified:   Marlin/src/lcd/e3v2/proui/custom_gcodes.cpp
modified:   Marlin/src/lcd/e3v2/proui/dwin.cpp
renamed:    Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.cpp -> Marlin/src/lcd/e3v2/proui/gcode_preview.cpp
modified:   Marlin/src/lcd/e3v2/proui/gcode_preview.h
deleted:    Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.h
modified:   configurations/Andrew427/Configuration.h
modified:   configurations/BTT-SKR_Mini_E3_V2/ConfigurationMM.h
modified:   configurations/BTT-SKR_Mini_E3_V2/ConfigurationUBL.h
modified:   configurations/BTT-SKR_Mini_E3_V3/ConfigurationMM.h
modified:   configurations/BTT-SKR_Mini_E3_V3/ConfigurationUBL.h
modified:   configurations/Creality Ender/BLT/Configuration.h
modified:   configurations/Creality Ender/Default-NP/Configuration.h
modified:   configurations/Creality Ender/MM/Configuration.h
modified:   configurations/Creality Ender/UBL/Configuration.h
modified:   configurations/Voxelab Aquila 427/BLT/Configuration.h
modified:   configurations/Voxelab Aquila 427/Default-NP/Configuration.h
modified:   configurations/Voxelab Aquila 427/MM/Configuration.h
modified:   configurations/Voxelab Aquila 427/UBL/Configuration.h
modified:   configurations/Voxelab Aquila/BLT/Configuration.h
modified:   configurations/Voxelab Aquila/BLT/ConfigurationPro.h
modified:   configurations/Voxelab Aquila/Default-NP/Configuration.h
modified:   configurations/Voxelab Aquila/MM/Configuration.h
modified:   configurations/Voxelab Aquila/UBL/Configuration.h
modified:   configurations/Voxelab Aquila/UBL/ConfigurationPro.h
modified:   configurations/Voxelab Aquila/X3/Configuration.h
…8/MRiscoCProUI into thumbnail-preview"

This reverts commit eea7a70, reversing
changes made to 7989e21.
@Nazar78 Nazar78 marked this pull request as ready for review October 30, 2023 20:49
@classicrocker883
Copy link
Owner

so thats it then? basically instead of using the private proui library gcode_preview we now use the "NOPRO" one (used in Marlin source code) and that is the fix?

one thing I can suggest to change, is fileprop.
either we can change all the fileprop like in dwin.cpp - fileprop.isConfig
to fileprop_nopro

or change fileprop_nopro back to just fileprop.
however, wouldn't that conflict with the proui lib with that already named??

if so, perhaps then we could change all instances of HAS_GCODE_PREVIEW to something like GCODE_PREVIEW so this doesnt conflict with the PROUI_EX lib of the same name.

@Nazar78
Copy link
Author

Nazar78 commented Nov 1, 2023

so thats it then? basically instead of using the private proui library gcode_preview we now use the "NOPRO" one (used in Marlin source code) and that is the fix?

Yup². It's a mix use of both private libs (still needed) and nopro (for those major portion we can't change in the private libs).

one thing I can suggest to change, is fileprop. either we can change all the fileprop like in dwin.cpp - fileprop.isConfig to fileprop_nopro

or change fileprop_nopro back to just fileprop. however, wouldn't that conflict with the proui lib with that already named??

fileprop is already been used by the private libs, so fileprop_nopro is just a new out-of-library reference which you can rename to just anything like fileprop_nolib.

if so, perhaps then we could change all instances of HAS_GCODE_PREVIEW to something like GCODE_PREVIEW so this doesnt conflict with the PROUI_EX lib of the same name.

There's no conflict, as you can see I've actually replaced the gcode_preview_nopro.cpp with gcode_preview.cpp and dereference gcode_preview.h (but still needed in dwin.cpp, think for the laser module), thus changing all the HAS_GCODE_PREVIEW_NOPRO to HAS_GCODE_PREVIEW.

classicrocker883 and others added 4 commits November 2, 2023 05:15
Revert back `fileprop` struct, moved to .h header file, rename functions
Update **dwin.cpp** #include, rename and omit in `Goto_ConfirmToPrint()`
Delete `file_header.h`, changed references to `gcode_preview.h`
Update Config files so `HAS_GCODE_PREVIEW` can be used in NoPro ver.
@classicrocker883 classicrocker883 merged commit db2ba64 into classicrocker883:2023-October Nov 8, 2023
@classicrocker883
Copy link
Owner

I changed things so Gcode Preview can work without PROUI_EX (ProUI extended features) enabled, for -NoPro versions.

not sure what a couple functions did, in the original file_header.h, but I basically transferred that over to gcode_preview.h, and commented those out, however I do not know if they are needed with the Laser function.

if you can let me know how everything works, or any changes. but so far it is working great. thank you for the fix!!

@classicrocker883 classicrocker883 added the already fixed Issue has been addressed label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
already fixed Issue has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Crash and reboot after second time gcode preview
2 participants