<jhass>
GC Warning: Repeated allocation of very large block (appr. size 134221824):
<jhass>
May lead to memory leak and poor performance
<jhass>
oh well
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 264 seconds]
bcardiff1 has quit [Quit: Leaving.]
asterite has joined #crystal-lang
bcardiff has joined #crystal-lang
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asterite has quit [Quit: asterite]
sferik has joined #crystal-lang
canhtak has quit [Quit: canhtak]
<zamith>
jhass: where's that written?
<jhass>
while compiling
asterite has joined #crystal-lang
<jhass>
asterite: got some time for some remote debugging? :P
<jhass>
I'm getting:
<jhass>
GC Warning: Repeated allocation of very large block (appr. size 67112960):
<jhass>
May lead to memory leak and poor performance.
<asterite>
Not right now, I have a series of meetings today :(
<jhass>
repeatedly and I have to kill the compiler
<jhass>
just quick tip where I could insert some debug statements maybe?
<asterite>
Oh, it’s when you compile some code?
<jhass>
yes
<asterite>
Mmm… I can’t think of a place
asterite has quit [Quit: asterite]
<jhass>
alright, I try to attach a gdb
shama has joined #crystal-lang
asterite has joined #crystal-lang
<asterite>
We definitely need to implement the debugger
<asterite>
Well, correctly emit debug info
<jhass>
what's --debug doing currently?
<asterite>
It’s emiting some debug info, but I think it’s broken. I think it broke when we started using llvm 3.5
<jhass>
mmh, it slows down compiling the compiler a lot though
<asterite>
I guess. The debug info is very big and verbose
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
asterite has quit [Quit: asterite]
asterite has joined #crystal-lang
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 276 seconds]
leafybasil has quit [Remote host closed the connection]
<jhass>
kay, had to kill that, it won't finish. asterite if you got some time pls ping me, I'm pretty clueless on this one
leafybasil has joined #crystal-lang
<asterite>
jhass: mmm… do you have some code I can try to debug?
<asterite>
Or, when did it start happening?
<jhass>
okay, I just isolated it
<jhass>
trying to reduce it, but not successful
<jhass>
so, maybe the background story
<asterite>
What bakcground story?
<jhass>
of the bug ; I had a class with lots of parameters in initialize, basically all of them with constructor assignment to ivars
<jhass>
I wanted to refactor those params into their own object
<jhass>
so before changing the API, I just would build sad object in the constructor
<jhass>
in the process I removed one of instance variable assignments in the constructor
<jhass>
and I didn't see that I'm still referenced it in another method
<jhass>
and that strangely caused the bug
zamith has quit [Quit: Be back later ...]
<jhass>
removing the reference fixed it
<jhass>
and no, it doesn't reproduce on a minimal example
<asterite>
But it’s too big to share?
<jhass>
it's quite big, yeah :/
<asterite>
It’s part of CeBot?
<jhass>
yeah
<asterite>
Hmmm… was that object a struct?
<jhass>
nope
<asterite>
I mean, the replacement for the many variables
<asterite>
Ah
<asterite>
It’s using the record macro?
<jhass>
nope
<asterite>
Ok :)
<asterite>
If it was a struct maybe you ended up with a struct that contains itself, I think that blows the compiler
<asterite>
(but I’m not sure)
<jhass>
I don't think it's actually related to the object
<jhass>
the ivar was called @user
<jhass>
I literally can comment in and out @user = "foo" in the constructor to trigger it
<asterite>
Will CeBot source code be public one day?
<asterite>
I’m just curious why you don’t open source it
<asterite>
(but, of course, that’s your decision. The good thing about crystal is that you can create apps without giving the source code :-P)
<jhass>
sure
<asterite>
(good/bad)
<jhass>
I want to get it out of the total mess state first though ;)
<asterite>
Oh, I wouldn’t worry about that :)
<asterite>
As long as it works, the code doesn’t matter that much (at least that’s the way I see things)
<asterite>
Of course I also try to make code readable and easily changeable, but that’s secondary
<jhass>
well, I designed it so that eventually actually two libraries will fall out of the project
<jhass>
one that abstracts the basic IRC stuff and one that builds a nice API for writing a bot on top
<jhass>
they're a bit tangled still, so I want to have at least the basic feature set ready so I know I don't radically need to change the design anymore
<jhass>
we'll see
<jhass>
if I can get SASL working today, maybe I'll make a repo