Lab: exporting the environment cubemap crashes when no object is displayed
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia da gr_opengl_dump_envmap, usando l’asserzione in bmpman.cpp come percorso di chiamata fallito, poi traccia dove ENVMAP viene creata e cancellata. Decidi quale dei comportamenti proposti è previsto per l’export prima che esista una environment map. Il completamento deve essere verificato sia senza un oggetto visualizzato sia dopo la selezione di una nave, momento in cui l’export continua a scrivere envmaps/<mission>.png.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
In the Lab, exporting the environment cubemap crashes the game if you haven't picked an object to display yet. A mission background has to be chosen for the export button to show up, but the game only builds the environment map while it's drawing an object, so with nothing on screen there's no map to export.
Steps to reproduce
- Start FSO with OpenGL and open the Lab.
- Without choosing anything under Select object, open Select background > Mission Background and pick any mission.
- Press M, or click "Export environment cubemap".
Debug build (master at a1250d716, retail data): ASSERTION: "handle >= 0" at bmpman.cpp:120, Invalid handle -1 passed to bm_get_slot! from gr_opengl_dump_envmap. A Release build segfaults at the same step (seen on a build of my #7853 branch, which doesn't change this code).
If you pick a ship first and then do steps 2 and 3, the export works and writes envmaps/<mission>.png.
Expected vs. actual behavior
Expected: the export writes the environment map for the chosen background, or tells you there's nothing to export yet.
Actual: Debug builds stop on the assertion and Release builds crash.
Proposed fixes
Ranked by simplicity, then maintainability, then thoroughness.
- Return early from
gr_opengl_dump_envmapwhenENVMAPis below 0, with a log line or a warning. One check, and it also covers any other caller. - Do that, and also hide or disable the Lab's export button and M key until an environment map exists, so the option only appears when it can work.
- Have the Lab build the environment map as soon as a background is chosen, even with no object shown, so the export always matches the selected background.
I haven't tried Vulkan; its export function is an empty stub there.
- Lingua principale
- C++
- Stelle
- 488
- Fork
- 184
- Merge medio
- 2g 9h
- PR unite (30g)
- 40
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scp-fs2open/fs2open.github.com
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
scp-fs2open/fs2open.github.com#7918 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
scp-fs2open/fs2open.github.com#7917 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
scp-fs2open/fs2open.github.com#7916 ·
I maintainer di solito rispondono entro 1 giorno
-
P2: A timed rotation maneuver does nothing on a ship that had an earlier timed lateral maneuverForse già presa @vovosta l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
scp-fs2open/fs2open.github.com#7914 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
scp-fs2open/fs2open.github.com#7901 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di scp-fs2open/fs2open.github.com
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
prestonbrown/helixscreen#1867 ·
I maintainer di solito rispondono entro 2 giorni
-
bug P5 XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-astro/AlpacaBridge#1550 ·
I maintainer di solito rispondono entro 1 giorno
-
Component: Packaging Type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
LizardByte/libvirtualhid#204 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Niko1221/Strata#3785 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni