Next-Flip / Momentum-Apps

Bundle of external apps tweaked for Momentum Firmware
https://momentum-fw.dev
288 stars 48 forks source link

UHF App: Unpredictable Crashes on Read #6

Open zacharyweiss opened 7 months ago

zacharyweiss commented 7 months ago

I'm running into a number of crashes with the UHF app bundled here. I initially detailed these on the app's main repo, but after a bit more investigation, it appears to be something unique to the modified code here or how it interacts with the FW; flashing OFW dev & the app's current master branch abates the crashes, but replaces them with intermittent freezes as mentioned in another issue in their repo.

Any thoughts / suggestions on how to tackle debugging? I'm not familiar with all the modifications made here, nor why they were made. Is this better asked of xMasterX on their apps repo?

Willy-JL commented 6 months ago

tried with same code as upstream on momentum and results did not change for me, same crashes. maybe its related to some PRs we have merged early into firmware. regardless, there most definitely is some problem with reading, and module initialization too. will look into it when i have the time

Willy-JL commented 6 months ago

for some more context, currently the only difference we have from upstream in our code is to do with UART init and deinit, adding some safety checks and removing redundant init by app/hal checks

zacharyweiss commented 6 months ago

Interesting; yeah, likely FW related then, or spurious correlation on my part from too few samples

Willy-JL commented 5 months ago

just for an update, this would make it seem like similar behavior to issues with other apps that did not play nicely with new TLSF allocator, however it could be deeper than this. the app author said theyre looking into it on discord and noticed some oddities with commands sending too fast. im not knowlegeable enough on that side of things, at most i could try to track down memory management issues brought to light by TLSF, but it freezing on OFW too makes it seem like the issue is deeper. ill try to have a look when i can however

frux-c commented 5 months ago

@zacharyweiss Here's a commit that you can try that addresses that issue https://github.com/frux-c/uhf_rfid/commit/e8633bd4e541b4badf16605c4895e31c6e60dfba