raiguard / RecipeBook

Recipe Book for Factorio.
MIT License
20 stars 9 forks source link

Orphaned duplicate search window after upgrading to 3.1.0 #69

Closed harag-on-steam closed 3 years ago

harag-on-steam commented 3 years ago

Describe the Bug

My guess is I had Recipe Book's search window open in my savegame when I upgraded from 3.0.x to 3.1.0. In any case Ctrl+Shift+B opened a second search window and I wasn't able to close the first one. Saving and reloading then resulted in this error:

Error while running event RecipeBook::on_string_translated (ID 151)
Gui element with name rb_search_window already present in the parent element.
stack traceback:
    [C]: in function 'add'
    __flib__/gui.lua:102: in function 'recursive_build'
    __flib__/gui.lua:171: in function 'build'
    __RecipeBook__/scripts/gui/search/root.lua:15: in function 'build'
    __RecipeBook__/control.lua:397: in function <__RecipeBook__/control.lua:374>

Workaround:

  1. disable Recipe Book
  2. reload savegame
  3. save again
  4. re-enable Recipe Book
  5. reload savegame

Save file & Username & Logs

Sadly I did overwrite the savegame and logs while applying the workaround above and thought of writing a bug ticket only afterwards. Maybe someone else runs into the same problem and can attach one.

harag-on-steam commented 3 years ago

Ah, damn, this might be a duplicate of #60 and #66 (closed). This one describes a workaround, though. Maybe leave it open for a while in-case this happens again?

raiguard commented 3 years ago

Could you please send me your save file?

Oh, you said you already overwrote it. Drat. I have been completely unable to reproduce this but at least once person gets it every update.

harag-on-steam commented 3 years ago

I just noticed the workaround is incomplete. The error pops up again if I save with the mod enabled and reload that. So basically I'm barred from using Recipe Book, now. Is there a way to clean out RB's global data?

raiguard commented 3 years ago

Please attach the save file so I can take a look!

raiguard commented 3 years ago

(got the save file on Discord)

Thanks for the report, fixed for the next release. Turns out it was a stupid mistake I made when fixing #60 that caused this.