Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old recipe crashes Brewtarget #420

Closed
anderwm opened this issue Aug 17, 2018 · 9 comments
Closed

Old recipe crashes Brewtarget #420

anderwm opened this issue Aug 17, 2018 · 9 comments

Comments

@anderwm
Copy link

anderwm commented Aug 17, 2018

I have a database with old recipes from much earlier versions of brewtarget. When I restore the database and double click on those recipes Brewtarget crashes immediately. Anybody seen this?

@pricelessbrewing
Copy link
Contributor

pricelessbrewing commented Aug 17, 2018

How old? I know at some point old recipes had to be imported manually.

I'd try exporting the recipe, then importing it. If that doesn't work, could you upload the db file and/or the recipe file? I'll give it a try on Monday when I get back from a homebrew festival.

@anderwm
Copy link
Author

anderwm commented Aug 17, 2018

I'm not sure exactly how old, I've used Brewtarget for about 5 years. But I brewed this recipe this year and I usually add to the brewnotes each time. I tried exporting and importing and it still crashes on import (terminate called without an active exception). XML looks clean, see what you think when you recover from your sampling. I had to change the extension to get it to upload.
germanPils.txt

Edit: Nevermind about this being and old recipe, it is just something I made this year from leftover ingredients. I'm still not sure why it breaks Brewtarget though

@jawsdaws
Copy link
Contributor

I gave your XML a try and I get a crash too. I get this error.

'QObject::connect: No such slot MashDesigner::typeChanged(int) in MashDesigner.cpp:65'
'QObject::connect: (sender name: 'comboBox_type')'
'QObject::connect: (receiver name: 'mashDesigner')'
'terminate called without an active exception'
'Aborted (core dumped)'

I can't really look any further into until next week though... I have a busy weekend planned.

@anderwm
Copy link
Author

anderwm commented Aug 17, 2018

No rush on my end, I have all the information from the recipe...just a bug

@jawsdaws
Copy link
Contributor

This appears to be a bug from when you exported. Do you know what version you used to do the export? I tried to replicate this with a 2.4.0 build from git, but I could not replicate a bad XML export. That said, database.cpp calls throw; without a log of any kind in quite a few different places. That's not ideal when importing who knows what in an XML. Some better error handling would be very useful.

Here's a fix for your file in the mean time. At least it worked on my git build. :-)

Line 255 should read <TYPE>Infusion</TYPE> "Batch sparge" is not a valid BeerXML type and the code does not support it.

Line 277 <DATE_FERMENTED_OUT>CURRENT_DATETIME</DATE_FERMENTED_OUT> can be deleted and changed back to the proper date inside Brewtarget after you get the import done.

@anderwm
Copy link
Author

anderwm commented Aug 21, 2018

Who knows what version, I build from source and update randomly whenever the mood strikes. Probably not important what the XML error is but I just expected it would get caught somewhere and not crash the Main. Thanks for looking at it.

@jawsdaws
Copy link
Contributor

jawsdaws commented Aug 21, 2018

get caught somewhere and not crash the Main.

Agree. I'll start a new issue and see about making some of the XML error handling more robust. Cheers!
Edit: markdown :-)

@mikfire
Copy link
Contributor

mikfire commented Sep 22, 2020

Can this issue be closed?

@mattiasmaahl
Copy link
Collaborator

I would say Its closed.
Open new ticket if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants