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

terminate called after throwing an instance of 'std::bad_cast' #60

Closed
jmmv opened this issue Feb 22, 2014 · 6 comments
Closed

terminate called after throwing an instance of 'std::bad_cast' #60

jmmv opened this issue Feb 22, 2014 · 6 comments

Comments

@jmmv
Copy link
Member

jmmv commented Feb 22, 2014

From asomers on April 02, 2013 14:36:13

What steps will reproduce the problem? 1. kyua config What is the expected output? What do you see instead? [root@localhost /usr/local/share/kyua-cli/examples]# kyua config
terminate called after throwing an instance of 'std::bad_cast'
what(): std::bad_cast
*** Fatal signal 6 received
*** Log file is /root/.kyua/logs/kyua.20130328-123142.log
*** Please report this problem to kyua-discuss@googlegroups.com detailing what you were doing before the crash happened; if possible, include the log file mentioned above
Abort trap: 6 (core dumped)

[root@localhost /usr/local/share/kyua-cli/examples]# cat /root/.kyua/logs/kyua.20130328-123142.log
20130328-123142 I 5902 cli/main.cpp:315: kyua-cli 0.6
20130328-123142 I 5902 cli/main.cpp:320: Command line: kyua config What version of the product are you using? On what operating system? kyua-cli 0.6 on FreeBSD 9.1 Please provide any additional information below. The exception is getting generated at utils/config/nodes.cpp:202. There is an accompanying catch(std::bad_cast) block; I don't know why the exception isn't getting caught.

Original issue: http://code.google.com/p/kyua/issues/detail?id=60

@jmmv
Copy link
Member Author

jmmv commented Feb 22, 2014

From julio@meroh.net on April 02, 2013 15:27:06

AFAICT this is a bug in FreeBSD 9.1: http://www.freebsd.org/cgi/query-pr.cgi?pr=175453 I think we could workaround it by using dynamic_cast on pointers rather than references because that seems to work fine. I'd rather get FreeBSD fixed instead, but will see if the workaround looks nice enough. That PR has been opened since January and does not show signs of activity...

Status: Blocked

@jmmv
Copy link
Member Author

jmmv commented Feb 22, 2014

From asomers on April 02, 2013 16:36:31

Good find. I pulled in that change, rebuilt world, and kyua works now. It's annoying for the user, but I don't think we should change kyua to work around it.

@jmmv
Copy link
Member Author

jmmv commented Feb 22, 2014

From jmmv@google.com on April 03, 2013 06:13:54

I kinda agree that we should not "fix" something that's not broken... but it would be nice if there was a port for Kyua ready to be used in the latest FreeBSD stable release!

I have prepared a patch to apply the workaround for this issue and confirmed it working on 9.1 powerpc64.

Maybe you could bundle this patch (attached) with your work-in-progress package of Kyua?

Thanks.

Attachment: freebsd-workaround-bad-cast.diff

@jmmv
Copy link
Member Author

jmmv commented Feb 22, 2014

From asomers on April 03, 2013 08:57:03

Your patch works for me. I'll submit it along with the port.

@jmmv
Copy link
Member Author

jmmv commented Feb 22, 2014

From asomers on July 10, 2013 14:31:35

Since the port is finished, I think we can close this bug.

@jmmv
Copy link
Member Author

jmmv commented Feb 22, 2014

From julio@meroh.net on July 10, 2013 14:34:25

Status: WontFix

@jmmv jmmv closed this as completed Feb 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant