What is the bug or the crash?
I wanted to create yearly binary rasters for Global Forest Change dataset
I used if ("Hansen_GFC-2024-v1.12_lossyear_70N_080E_mosaic@1" = 1, 1, 0) expression in raster calculator
However, it just failed with message "could not create destination file"
When I tried to investigate further, I noticed that the actual error appears in OpenCL console and says:
2026-01-17T12:10:33 CRITICAL Error building OpenCL program: <kernel>:16:94: error: used type 'float' where floating point type is not allowed
resultLine[i] = ( ( float ) ( ( float ) input_raster_0_band_1[i] == ( float ) 1 ) ) ? ( ( float ) 1 ) : ( ( float ) 0 ) ;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
When I tried to run the same expression with acceleration turned off, everything worked nice
Even if it can not be fixed, probably a more user-friendly error message should be shown
Steps to reproduce the issue
- Enable OpenCL acceleration
- Download any Global Forest Change data (or probably any other data)
- Try to execute something like
if ("Hansen_GFC-2024-v1.12_lossyear_70N_080E_mosaic@1" = 1, 1, 0) in a raster calculator
Versions
| QGIS version | 3.44.7-Solothurn |
| QGIS code revision | ea262bc5ed8 |
| |
| Libraries |
| Qt version | 5.15.13 |
| Python version | 3.12.12 |
| GDAL version | 3.12.1 — Chicoutimi |
| PROJ version | 9.7.1 |
| EPSG Registry database version | v12.029 (2025-10-03) |
| GEOS version | 3.14.1-CAPI-1.20.5 |
| SQLite version | 3.50.4 |
| PDAL version | 2.9.0 |
| PostgreSQL client version | 17.3 |
| SpatiaLite version | 5.1.0 |
| QWT version | 6.3.0 |
| QScintilla2 version | 2.14.1 |
| OS version | Windows 11 Version 2009 |
| |
| Active Python plugins |
| LAStools | 2.3.2 |
| mmqgis | 2024.11.8 |
| orfeoToolbox_provider | 3.0.3 |
| OSMDownloader | 1.0.4 |
| processing_saga_nextgen | 1.1.0 |
| qfieldsync | v4.18.0 |
| qgis2web | 3.31.0 |
| qtiles | 1.8.0 |
| quick_map_services | 1.1.0 |
| db_manager | 0.1.20 |
| grassprovider | 2.12.99 |
| MetaSearch | 0.3.6 |
| processing | 2.12.99 |
Supported QGIS version
New profile
Additional context
No response
What is the bug or the crash?
I wanted to create yearly binary rasters for Global Forest Change dataset
I used
if ("Hansen_GFC-2024-v1.12_lossyear_70N_080E_mosaic@1" = 1, 1, 0)expression in raster calculatorHowever, it just failed with message "could not create destination file"
When I tried to investigate further, I noticed that the actual error appears in OpenCL console and says:
When I tried to run the same expression with acceleration turned off, everything worked nice
Even if it can not be fixed, probably a more user-friendly error message should be shown
Steps to reproduce the issue
if ("Hansen_GFC-2024-v1.12_lossyear_70N_080E_mosaic@1" = 1, 1, 0)in a raster calculatorVersions
Supported QGIS version
New profile
Additional context
No response