no more zombie + additional bad channel detection underneath

This commit is contained in:
2026-03-24 16:50:30 -07:00
parent f2c236bec5
commit 7ef07678ae
2 changed files with 478 additions and 88 deletions
+45 -14
View File
@@ -181,6 +181,9 @@ SECTIONS = [
# TODO: implement drop
{"name": "EPOCH_HANDLING", "default": ["shift"], "type": list, "options": ["shift", "strict"], "help": "What to do if two unique events occur at the same time. Shift will automatically move one event to the first valid free index. Strict will raise an error processing the file. Drop will remove one of the events."},
{"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."},
{"name": "REJECT_BY_ANNOTATIONS", "default": True, "type": bool, "help": "Help."},
{"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."},
{"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."},
{"name": "T_MIN", "default": -5, "type": int, "help": "Seconds before the epoch to be used."},
{"name": "T_MAX", "default": 15, "type": int, "help": "Seconds after the epoch to be used."},
]
@@ -6201,26 +6204,54 @@ def _extract_metadata_worker(file_name):
print(f"Worker failed on {file_name}: {e}")
return None
def run_gui_entry_wrapper(config, gui_queue, progress_queue):
"""
Where the processing happens
"""
# def run_gui_entry_wrapper(config, gui_queue, progress_queue):
# """
# Where the processing happens
# """
# try:
# import flares
# flares.gui_entry(config, gui_queue, progress_queue)
# gui_queue.close()
# # gui_queue.join_thread()
# progress_queue.close()
# # progress_queue.join_thread()
# os._exit(0)
# except Exception as e:
# tb_str = traceback.format_exc()
# gui_queue.put({
# "success": False,
# "error": f"Child process crashed: {str(e)}\nTraceback:\n{tb_str}"
# })
# os._exit(1)
def log_to_file(msg):
with open("FLARES_CRITICAL_LOG.txt", "a") as f:
f.write(f"DEBUG: {msg}\n")
def run_gui_entry_wrapper(config, gui_queue, progress_queue):
log_to_file("Wrapper Started")
try:
import flares
log_to_file("Flares Imported")
# This is the line where it likely dies
flares.gui_entry(config, gui_queue, progress_queue)
gui_queue.close()
#gui_queue.join_thread()
sys.exit(0)
log_to_file("gui_entry finished successfully")
gui_queue.cancel_join_thread()
progress_queue.cancel_join_thread()
log_to_file("Attempting OS EXIT")
os._exit(0)
except Exception as e:
tb_str = traceback.format_exc()
gui_queue.put({
"success": False,
"error": f"Child process crashed: {str(e)}\nTraceback:\n{tb_str}"
})
sys.exit(1)
err = f"CRASH: {str(e)}\n{traceback.format_exc()}"
log_to_file(err)
os._exit(1)
def resource_path(relative_path):
"""