object.hide_render Crashes Blender Before Starting to Bake
Changing the visibility of an object (hide_render, hide_select, hide_viewport, etc.) triggers the rebuild of collection caches. Since this modifies the collection you're iterating over (Collection.all_objects), it may result in a crash. Since Blender is implemented in C and C++ you're causing undefined behavior through the Python API. Therefore it's just a (un-)lucky coincidence that it didn't crash on Windows.

This limitation is documented in Blender's Python API manual on the very important Gotcha page in the section Unforunate Corner Cases.


  Unfortunate Corner Cases
  
  Besides all expected cases listed above, there are a few others that
  should not be an issue but, due to internal implementation details,
  currently are:
  
  
  Object.hide_viewport, Object.hide_select and Object.hide_render: Setting any of those booleans will trigger a
  rebuild of Collection caches, hence breaking any current iteration
  over Collection.all_objects.
  


The best solution is to create a list of all objects' names from the object references that are given by Collection.all_objects and then use these unique names to access the actual objects in the loop. This is the generally recommended approach that avoids many of the potential problems described in "Help! My script is crashing".


  TL;DR: Do not keep direct references to Blender data (of any kind)
  when modifying the container of that data, and/or when some undo/redo
  may happen (e.g. during modal operators execution…). Instead, use
  indices (or other data always stored by value in Python, like string
  keys…), that allow you to get access to the desired data.


While you can create copies of the object references, there is no guarantee that these references remain valid. This could only be done when knowing exactly how Blender manages the underlying data structures. Since the internal implementation may change and doesn't have to be consistent across all versions of Blender, that approach would be considered a bad practice.

The following code shows the required modifications to avoid the crash.

Before

low_objects = bpy.data.collections[context.scene.lowpoly_bake_obj].all_objects
for obj in low_objects:
    self.bootstrap_bake(obj.name)


After

low_objects_names = [obj.name for obj in bpy.data.collections[context.scene.lowpoly_bake_obj].all_objects]
for obj_name in low_objects_names:
    self.bootstrap_bake(obj_name)


In general you would have to perform a lookup of the objects by name instead of using it directly from the collection. If you join, rename or delete objects in the loop you may also want to check that the object still exists before accessing it.

import bpy


obj_names = [obj.name for obj in bpy.data.objects]
for obj_name in obj_names:
    obj = bpy.data.objects.get(obj_name)
    if obj is not None:
        # Perform your operations with the object here


This issue was previously reported on the bug tracker in T62406.