-
Notifications
You must be signed in to change notification settings - Fork 143
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
Stack Overflow when I tried to save my stuff #85
Comments
Please provide some context. Otherwise this is not a bug report that we can do very much about. |
/* after doing some operations, creating Bus_Stop(s) in the dictionary bus_stops */
|
There's still not enough detail to replicate the problem. I entered all the code that is quoted above (note I made some edits to the order, and added quote marks---three backticks in a row), but I don't get any errors. |
Have you created Edges too? Just to let you know there can be a situation like this... A -> B -> C -> A Cyclical graph, I think that's where the stack overflow comes from. And my graph is not that huge, 4000 nodes with 6000 Edges. |
It's best if you can post a complete example that demonstrates the problem; it sometimes depends on details that I may never guess. (Bonus points if the example is also fairly minimal, although sometimes that's not straightforward, and any bug report is better than none at all.) In an open-source community where people are contributing code for free, it's also just good citizenship to avoid expecting that busy academics with priorities of their own will go to the trouble to try to read your mind 😄. Nevertheless in this case I decided to try, and managed to come up with an example that demonstrates a problem even if it's not perhaps exactly what you're seeing. Here's a complete example:
As far as fixing it goes, I will need to think this through a little bit. We need to make sure that any solution also works for the case where somebody starts from a pre-existing file, loads in the graph, adds some new nodes, and appends the new variables to the file. |
Cool, so this simple test case didn't terminate quickly, I think this is what happens too. Thanks !!! |
Simplified the test case. I wonder is there a solution yet? |
Not one that I've had time to implement, or really even think about. (Sorry. I have way too many packages I maintain, and open issues in many of them, as well as papers to write, grants to write, my own code to write, etc. HDF5 would benefit greatly from a new maintainer; I'd be happy to transfer this package to a JuliaLang location.) If you care to tackle this yourself and submit a PR, you're likely to get a solution faster. As I'm sure you understand, the problem is handling cyclic dependencies. I suspect the best solution would be for the |
I will try to fix it, what's "PR" ? How do I pass you the solution, if I have one? Can I commit and git push? |
Sorry, PR=pull request. Here's the workflow:
If you're new to
|
Oh, I should have also said: more detail about workflow is in the Package manager docs. You might be especially interested in the part about configuring |
|
Can't do it, I tried to use a global Set variable to store the objects that have been written. But ended up with this error which involves the symbol table. HDF5-DIAG: Error detected in HDF5 (1.8.11) thread 0: |
Not exactly sure what you tried, but a couple of points:
|
When I start another julia session,
The problem is that the Bar composite type does is not recognised. Another issue is
returns false. Seems to me that @save does not save the type definition and object references. That's why I cannot easily fix the circular dependency problem too. |
Modulo one issue which I'm (slowly) working on to finish resolving #81, there's enough information in the file to reconstruct the type. However, in typical uses I'm not sure it would be all that useful: if you construct a So if you create a file called
This is going to be the trickier one. With the writing command above, here's what's actually happening (I encourage you to follow along with
Note that if you defined The
However, I'm now skeptical that this will suffice; all it would do would be to fix up the references in the file, and reading would still create two separate objects. Hmm. It seems like we need to introduce some type that indicates a Julia cross-reference, not to be evaluated by HDF5. When your |
I have been thinking of how to address this issue. It seems that I need to read the entire HDF5 specifications. A simple fix to the current jld.jl does not seem sufficient because the current code save values instead of references. I tried Julia built-in serialization too and it turns out that it also does not store references. Refer to this JuliaLang/julia#6590 |
I certainly hope you don't have to read the entire HDF5 spec, I wouldn't wish that on anyone! I've had to read much too much of it myself. I didn't even have prior experience with HDF5 before starting this package, it just seemed like someone had to implement a good saving format so I bit the bullet. For your problem, I'm not certain of the right way forward either, but one option would seem to be to define a type |
ERROR: stack overflow
in h5d_write at ~/.julia/v0.3/HDF5/src/plain.jl:1778
The text was updated successfully, but these errors were encountered: