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

Crash during configure #24

Closed
1 of 4 tasks
Morganamilo opened this issue Apr 8, 2018 · 3 comments
Closed
1 of 4 tasks

Crash during configure #24

Morganamilo opened this issue Apr 8, 2018 · 3 comments

Comments

@Morganamilo
Copy link

Is this a bug, an improvement, a proposal or something else?

  • Bug
  • Improvement
  • Proposal
  • Something else

Briefly explain your issue

gotext crashes during the call to gotext.Configure().

What's the expected behaviour?

No crash.

What's the actual behaviour?

gotext crashes due to a sigsev signal:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x658b22]

goroutine 1 [running]:
github.com/leonelquinteros/gotext.(*Locale).SetDomain(0x0, 0x73c4db, 0x3)
	/home/morganamilo/git/yay/.go/src/github.com/leonelquinteros/gotext/locale.go:147 +0x22
github.com/leonelquinteros/gotext.Configure(0x73d0e7, 0x7, 0x73c324, 0x2, 0x73c4db, 0x3)
	/home/morganamilo/git/yay/.go/src/github.com/leonelquinteros/gotext/gotext.go:150 +0xe2
main.initGotext()
	/home/morganamilo/go/src/github.com/Jguer/yay/main.go:167 +0x60
main.main()
	/home/morganamilo/go/src/github.com/Jguer/yay/main.go:175 +0x34

when calling:

gotext.Configure("locale/", "en", "yay")

What are the steps to reproduce the actual behaviour?

Call gotext.Configure().

Comments

This started happening after cd46239, before then it worked as expected.

@leonelquinteros
Copy link
Owner

Thanks for the report!
Please check now.

Also, take in consideration that we're moving towards release a version 2 of the package that may break backwards compatibility if you are using the master branch.
You can rely on the release tags to vendor the last stable version ( v1.3.1 at this moment ) https://github.com/leonelquinteros/gotext/releases

@Morganamilo
Copy link
Author

I've only played around with this project a little bit, basically just did the initial setup to get a feel for how it works. Realised the current release didn't have .mo support to I jumped onto master. I'll move to a release whenever the next one comes out.

Backwards compatibility is not really an issue because I only have a few lines of code leveraging this package just to test it out. I understand the implications of using master instead of a release, I'm not going to come complaining because something changed.

Also I can't check right now but i'll assume the fix is good, I'll report back if I find something to still be wrong.

@leonelquinteros
Copy link
Owner

@Morganamilo Thanks for the feedback and usage report!

It's always good to have users of the master branch to help debug stuff like this, so you're welcome to report any issue you may found on the master branch.

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

2 participants