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

Sometimes IFC objects are cloned without any reason #1224

Closed
dkurillo opened this issue Dec 1, 2021 · 12 comments
Closed

Sometimes IFC objects are cloned without any reason #1224

dkurillo opened this issue Dec 1, 2021 · 12 comments

Comments

@dkurillo
Copy link

dkurillo commented Dec 1, 2021

I noticed, that BIMvie.ws always duplicates objects in the tree if there is more than one revision:

image

There can be even more duplications. Usually more revisions leads to more clones. I thought that it was BIMvie.ws bug, but now I got the same behaviour in ClientIfcModel:

image

Model looks fine, there are no clones. But in rare cases when I init new ClientIfcModel and query something I get objects multiplied like on the screenshot above. There are 3 clones of ifcRelNests objects and inside 2 clones of ifcPorts in each nest...

Any suggestions?

@hlg
Copy link
Member

hlg commented Dec 1, 2021

Did you create the revision through low level interface? Then this may be related to or even a duplicate of #1115.

@dkurillo
Copy link
Author

dkurillo commented Dec 1, 2021

Did you create the revision through low level interface? Then this may be related to or even a duplicate of #1115.

Nope. I call model.commit()

@hlg
Copy link
Member

hlg commented Dec 1, 2021

ClientIfcModel.commit? That uses the low level interface under the hood.

public long commit(String comment) throws ServerException, UserException, PublicInterfaceNotFoundException {
if (tid == -1) {
throw new UserException("No transaction was started");
}
return bimServerClient.getLowLevelInterface().commitTransaction(tid, comment, true);

@dkurillo
Copy link
Author

dkurillo commented Dec 1, 2021

Yes I see... Is there any other method to commit the model?

@hlg
Copy link
Member

hlg commented Dec 1, 2021

If you want to make low level modifications to a model in your BIMserver client - then no. The alternative to low level modifications is check-in of a whole serialized model created external to the BIMserver client, but I believe that is not what you are after.

@dkurillo
Copy link
Author

If you want to make low level modifications to a model in your BIMserver client - then no. The alternative to low level modifications is check-in of a whole serialized model created external to the BIMserver client, but I believe that is not what you are after.

It seems that I got another bug related to this issue. Starting from some point I receive this error from the server side: Query stack size > 10000000, probably a bug, please report

I debugged server side a little. This is what I see in HashMapVirtualObject in StreamingGeometryGenerator before failing to exception:

IfcLocalPlacement 1550517826
	RelativePlacement: 4344317463
	ReferencedByPlacements: [1550583362, 1550583362, 1550583362, 1550583362, 1550583362]
	PlacementRelTo: 1550452290
	PlacesObject: [54264770, 54264770, 54264770, 54264770, 54264770]

Again: the same object ids. I made 5 commits and I see 5 duplicates. And it seems that StreamingGeometryGenerator does work for same objects and starting from some critical point exceeds MAX_STACK_SIZE.
This is a severe problem... Is it possible to overcome this?

@dkurillo
Copy link
Author

What could be the reason for this error? Circular dependencies?

@hlg
Copy link
Member

hlg commented Dec 22, 2021

It could be in many places. That's what I considered in #1115:

I don't understand whether this issue is triggered in the serializer or in the database layer and if the latter whether on storage or on access.

Looking at your report now, it's probably not in the serializer, but happens somewhere before. I think the bug is either in the way how the query is processed or in the way how the low level changes are written. I don't think it is a circular thing, because then it would not stop after the exact number of revisions. It's likely some thing that's accidentally done or not done for every revision, even though it should not or should be done, like add or remove an oid from some temporary list or similar.

I agree that this is a main issue to be solved in order for the low level interface to be effectively used and I would classify it high priority.

@hlg
Copy link
Member

hlg commented Jul 3, 2024

This should be solved with the latest commits. I have tested for the initial issue, but had not reproduced the query stack size issue yet. I guess it needs testing with a sufficiently large model, complex query and a couple of low level changes committed.

@thaopham03
Copy link

Hello @dkurillo,

I am working on testing if this issue still appears on the newest release 1.5.185. So, I wonder how many revisions you made before you encountered the duplication or query stack size error? Thanks a lot!

@zaqifathis
Copy link
Collaborator

I just tested with BIMserver 1.5.185, and it seems that the duplication issue has been resolved.

@hlg
Copy link
Member

hlg commented Sep 16, 2024

The duplication issue is resolved. It could not be confirmed that that the query stack size issue #1230 is associated with this and is solved in the same vein, because we were not able to reproduce #1230 in the first place.

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

4 participants