#2077·ODM

DJI "MakerNote" metadata causes exifread crash in ODM 3.6.0

Author: spwoodcockCreated Sep 22, 2026Updated Sep 22, 2026
Labelspossible software fault

Based on research processing a project by @zestyping

Traceback and context

Imagery from a DJI Mavic Enterprise 3.

Original traceback from ODM processing:

Traceback (most recent call last):
...
  File "/code/stages/dataset.py", line 169, in process
    p = types.ODM_Photo(f)
        ^^^^^^^^^^^^^^^^^^
  File "/code/opendm/photo.py", line 175, in __init__
    self.parse_exif_values(path_file)
...
  File "/code/venv/lib/python3.12/site-packages/exifread/__init__.py", line 121, in process_file
    hdr.decode_maker_note()
  File "/code/venv/lib/python3.12/site-packages/exifread/core/exif_header.py", line 612, in decode_maker_note
    self.dump_ifd(ifd=0, ifd_name="MakerNote", tag_dict=dji.TAGS)
...
  File "/code/venv/lib/python3.12/site-packages/exifread/core/exif_header.py", line 241, in _get_printable_for_field
    printable = str(values[0])
                    ~~~~~~^^^
IndexError: list index out of range

Summary of issue

""" The error has to do with "DJI MakerNote" metadata that appears to be in some photos but not others. The newer version of ODM (3.6.1) has a problem handling this metadata.

ODM switched to a different exifread package in ODM 3.6.0.  Previously it used ODMExifREad 3.0.4; in version 3.6.0 and after, it uses ExifRead 3.5.1.

This change makes it sensitive to a problem in how ExifRead reads the DJI MakerNote.  As far as I can tell, ExifRead always fails to read DJI MakerNotes correctly (possibly because DJI MakerNotes are ill-formed), but these two versions report the problem differently.  ODMExifRead 3.0.4 returns a placeholder value to represent an unreadable field, which is silently ignored.  ExifRead 3.5.1 returns an empty list but says there is one item, then can't get the item out of the list and crashes.

DJI MakerNotes always start with an invalid pointer that makes ExifRead look into a random location in the JPEG data, and the problem is only triggered when there is an invalid field of a specific type with a specific count.  So it's always looking at bad data, but the error only happens when the bad data happens to have specific values.  That's why this crash occurs apparently at random, and only for a small fraction of images. """

Only 4 images out 2000+ had issues:

task4/fbdf10fb_DJI_20260917112339_0361_V.JPG: entry 3495 of 19012, tag 0x0900 DOUBLE count=1 offset=201326592 unreadable
task5/1e6891c1_DJI_20260917112907_0546_V.JPG: entry 3563 of 19012, tag 0x0C0C DOUBLE count=1 offset=202116108 unreadable
task5/d54fea23_DJI_20260917113014_0584_V.JPG: entry 3565 of 19012, tag 0x0C0C DOUBLE count=1 offset=201326592 unreadable
task6/3aea0b54_DJI_20260917132325_0422_V.JPG: entry 3528 of 19012, tag 0x0606 DOUBLE count=1 offset=453771264 unreadable

Files to inspect

2x bad images: ISSUE_fbdf10fb_DJI_20260917112339_0361_V.zip ISSUE_1e6891c1_DJI_20260917112907_0546_V.zip

1x good image, as a comparison: VALID_018ebddd_DJI_20260917112100_0271_V.zip

EXIF metadata from a problem image

ExifTool Version Number         : 13.25
File Name                       : ISSUE_1e6891c1_DJI_20260917112907_0546_V.JPG
Directory                       : /mnt/c/Users/Sam/Downloads
File Size                       : 13 MB
File Modification Date/Time     : 2026:09:22 14:54:19+01:00
File Access Date/Time           : 2026:09:22 14:54:39+01:00
File Inode Change Date/Time     : 2026:09:22 14:54:34+01:00
File Permissions                : -rwxrwxrwx
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Description               : default
Make                            : DJI
Camera Model Name               : M3E
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : 11.09.10.58
Modify Date                     : 2026:09:17 11:29:07
Y Cb Cr Positioning             : Co-sited
Exposure Time                   : 1/1000
F Number                        : 2.8
Exposure Program                : Program AE
ISO                             : 100
Sensitivity Type                : Recommended Exposure Index
Exif Version                    : 0230
Date/Time Original              : 2026:09:17 11:29:07
Create Date                     : 2026:09:17 11:29:07
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/1000
Aperture Value                  : 2.8
Exposure Compensation           : 0
Max Aperture Value              : 2.8
Subject Distance                : 0 m
Metering Mode                   : Average
Light Source                    : Daylight
Flash                           : No Flash
Focal Length                    : 12.3 mm
Maker Note Unknown Text         : DJI MakerNotes
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 5280
Exif Image Height               : 3956
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
File Source                     : Digital Camera
Scene Type                      : Directly photographed
Custom Rendered                 : Normal
Exposure Mode                   : Auto
White Balance                   : Auto
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 24 mm
Scene Capture Type              : Standard
Gain Control                    : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Device Setting Description      : (Binary data 4 bytes, use -b option to extract)
Serial Number                   : 1581F5FHC255C00DWPYE
Lens Info                       : 0.24mm f/2.8-11
GPS Version ID                  : 2.3.0.0
GPS Latitude Ref                : North
GPS Longitude Ref               : East
GPS Altitude Ref                : Above Sea Level
GPS Status                      : Measurement Active
GPS Map Datum                   : WGS-84
XP Comment                      : 0.9.142
XP Keywords                     : single
Compression                     : JPEG
Thumbnail Offset                : 1350
Thumbnail Length                : 33218
About                           : DJI Meta Data
Format                          : image/jpg
Image Source                    : WideCamera
Gps Status                      : Normal
Altitude Type                   : GpsFusionAlt
Absolute Altitude               : +266.607
Relative Altitude               : +125.088
Gimbal Roll Degree              : +0.00
Gimbal Yaw Degree               : +137.40
Gimbal Pitch Degree             : -90.00
Flight Roll Degree              : +0.80
Flight Yaw Degree               : +137.00
Flight Pitch Degree             : -16.80
Flight X Speed                  : -10.9
Flight Y Speed                  : 10.3
Flight Z Speed                  : 0.0
Cam Reverse                     : 0
Gimbal Reverse                  : 0
Self Data                       :
Surveying Mode                  : 1
Dewarp Flag                     : 0
Dewarp Data                     : 2022-06-08;3713.290000000000,3713.290000000000,7.020000000000,-8.720000000000,-0.112575240000,0.014874430000,-0.000085720000,0.000000100000,-0.027064110000
Calibrated Focal Length         : 3725.151611
Calibrated Optical Center X     : 2640.000000
Calibrated Optical Center Y     : 1978.000000
UTC At Exposure                 : 0000:00:00 00:00:00.002215
Shutter Type                    : Mechanical
Shutter Count                   : 7412
Focus Distance                  : -1
Camera Serial Number            : 493ON344AB01BW
Drone Model                     : M3E
Drone Serial Number             : 1581F5FHC255C00DWPYE
LRF Status                      : Normal
LRF Target Distance             : 0.000
LRF Target Lon                  : 0.0000000
LRF Target Lat                  : 0.0000000
LRF Target Alt                  : 0.000
LRF Target Abs Alt              : 0.000
Picture Quality                 : 90
Version                         : 7.0
Has Settings                    : False
Has Crop                        : False
Already Applied                 : False
MPF Version                     : 0100
Number Of Images                : 2
MP Image Flags                  : Dependent child image
MP Image Format                 : JPEG
MP Image Type                   : Large Thumbnail (VGA equivalent)
MP Image Length                 : 989105
MP Image Start                  : 12136448
Dependent Image 1 Entry Number  : 0
Dependent Image 2 Entry Number  : 0
Image UID List                  : (Binary data 66 bytes, use -b option to extract)
Total Frames                    : 1
AE Debug Info                   : (Binary data 8192 bytes, use -b option to extract)
AE Histogram Info               : (Binary data 4096 bytes, use -b option to extract)
AE Local Histogram              : (Binary data 2048 bytes, use -b option to extract)
AE Live View Histogram Info     : (Binary data 2048 bytes, use -b option to extract)
AE Live View Local Histogram    : (Binary data 10000 bytes, use -b option to extract)
AWB Debug Info                  : (Binary data 10240 bytes, use -b option to extract)
AF Debug Info                   : (Binary data 1024 bytes, use -b option to extract)
Histogram                       : (Binary data 1024 bytes, use -b option to extract)
ADJ Debug Info                  : (Binary data 4096 bytes, use -b option to extract)
Sensor ID                       : 493ON344AB01BW
Hyperlaps Debug Info            : (Binary data 8 bytes, use -b option to extract)
Scap Info                       : (Binary data 8192 bytes, use -b option to extract)
Sisr Info                       : (Binary data 4096 bytes, use -b option to extract)
JFIF Version                    : 1.02
Image Width                     : 5280
Image Height                    : 3956
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Aperture                        : 2.8
Image Size                      : 5280x3956
Megapixels                      : 20.9
Scale Factor To 35 mm Equivalent: 2.0
Shutter Speed                   : 1/1000
Thumbnail Image                 : (Binary data 33218 bytes, use -b option to extract)
GPS Altitude                    : 266.6 m Above Sea Level
GPS Latitude                    : 7 deg 49' 34.46" N
GPS Longitude                   : 126 deg 3' 39.77" E
Preview Image                   : (Binary data 989105 bytes, use -b option to extract)
Circle Of Confusion             : 0.015 mm
Depth Of Field                  : inf (-1.41 m - inf)
Field Of View                   : 73.7 deg
Focal Length                    : 12.3 mm (35 mm equivalent: 24.0 mm)
GPS Position                    : 7 deg 49' 34.46" N, 126 deg 3' 39.77" E
Hyperfocal Distance             : 3.51 m
Light Value                     : 12.9

Possible Solution

The MakerNotes metadata isn't needed, so we could just strip this by default, avoiding the issue.