-
Notifications
You must be signed in to change notification settings - Fork 35
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
Segfault learnerSGDEOnOffTest #47
Comments
In GitLab by @lettrich on Jul 2, 2017, 12:30 created branch |
In GitLab by @lettrich on Jul 3, 2017, 08:51 First of all I was able to reproduce the error on my system and I am very surprised that I did not see it in the first place. Also my tests have shown, that it seems to be older then commit b8f5768 . I will need more time to look into that but I'm working on it and will keep you updated about my progress. |
In GitLab by @valentjn on Jul 3, 2017, 09:23 You know about |
In GitLab by @valentjn on Jul 3, 2017, 09:24 Is it possible to add a test (after you've found/fixed it) to avoid regression bugs? |
In GitLab by @lettrich on Jul 3, 2017, 09:47 I will see what I can do. I'm officially out of the game, but since it feels now that sgpp is also partially my baby I feel a certain responsibility ;) Nevertheless I want to point out, that tests for those classes should have been @maierjn 's work in the first place. My additions all provide unit tests. (however it is my stupidity in the second place to refactor untested code and wonder that its not bug free :D ) |
In GitLab by @lettrich on Jul 22, 2017, 17:39 OK, so bisecting (very cool feature btw) hints me at commit merge commit 67ad260. This is something to start with but on the other hand terrible news, especially as both branches had working code before. So its back to opening up the debugger and finding out what went wrong |
In GitLab by @lettrich on Jul 22, 2017, 19:33 Ok so the first thing that looks very fishy is, that the pointer to the bounding box of the grid that's evaluated when this thing segfaults looks like it is invalid - the member variables all contain garbage values. |
In GitLab by @lettrich on Jul 22, 2017, 20:34 I found the source of the bug and have to admit, this is extremely neatly hidden. The The quick fix for this is to revert the clone function to the state before 23ac235. Having tried this, I can confirm that it works. However this is only a quick fix, since just copying the grid points of the grid may work for most cases but doesn't work with stretching or bounding box. Unfortunately as far as I can see, there seems to be something wrong with the copy constructor of I am sorry for taking so long to find this, but this took almost an entire day of intense work to find, trace back and debug, since I assumed the error anywhere but in a flawed copy constructor in code I did not write... Please also note that while I am very happy to have worked with all of you, I have to admit that I am not very keen to implement the "real fix", since I am no longer affiliated with @waegemans, please tell me if the quickfix works for you, so I can sleep better at night ;) |
In GitLab by @valentjn on Jul 24, 2017, 10:49 Wow--thank you so much for the thorough investigation! Let's look at what you did in newGrid->storage = HashGridStorage{this->storage}; Good lord! 🤦 Never ever do that. Seriously! What happens if this line gets executed is the following:
I've put together a simple test program if you want to experiment [1]. The real culprit is that But even if there would be an
The copy constructor seems to be fine. You should've been looking what that |
In GitLab by @valentjn on Jul 24, 2017, 11:06 mentioned in merge request !21 |
In GitLab by @valentjn on Jul 24, 2017, 11:06 Implemented |
In GitLab by @lettrich on Jul 24, 2017, 11:07 thank you so much for the feedback. Undoubtably you're right about the explicit call of the copy constructor, followed by an assignment. Also sorry for not taking a very detailed look at all of my code before starting to blame others. |
In GitLab by @valentjn on Jul 24, 2017, 11:09 You shall be forgiven 😃 |
In GitLab by @valentjn on Jul 24, 2017, 16:27 closed via merge request !21 |
In GitLab by @lettrich on Jul 2, 2017, 12:30
Durch Commit b8f5768 kommt es beim Aufruf von
datadriven/examples/learnerSGDEOnOffTest zu einem Segfault.
Der Fehler kann bis zu LearnerSGDEOnOff.cpp : 352 verfolgt werden:
densityFunction.first->eval(data, perClassDensities.back(), true);
Reported by
@waegemans
@krsgpp
The text was updated successfully, but these errors were encountered: