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

Error: org.bimserver.BimserverDatabaseException: Query stack size > 10000000 #1230

Closed
dkurillo opened this issue Dec 23, 2021 · 9 comments
Closed

Comments

@dkurillo
Copy link

dkurillo commented Dec 23, 2021

Hello!
I prepared 2 models of small size that help to get this error. Each is of size approximately 40 Kb. In order to get the error you need to create a new project and checkin. Both models can be opened in different IFC-viewers. XBim viewer shows no validation errors.

First model "beforeError1.txt" is successfully checkedin by BimServer but geometry generation takes too much time for the model of that size.
Second model "afterError1.txt" fails with "Query stack size > 10000000". Output of BimServer is in "output.txt"
Second model differs from first model only by one extra element.

afterError1.txt
beforeError1.txt
output.txt

Any ideas? What could be the reason? Where to dig?

PS. BimServer version is 1.5.183-SNAPSHOT

@dkurillo
Copy link
Author

Oops. Made the same fix as here for IFC4 and it worked!
#1085

@hlg hlg closed this as completed in 2e59595 Dec 23, 2021
@hlg
Copy link
Member

hlg commented Dec 23, 2021

Thanks for the catch! Can you check if the error also disappears with the project you used for testing #1224? The duplication may still be there, but maybe the Query stack size stays within limits now?

@dkurillo
Copy link
Author

Thanks for the catch! Can you check if the error also disappears with the project you used for testing #1224? The duplication may still be there, but maybe the Query stack size stays within limits now?

It's working but takes too much time to generate geometry

@dkurillo
Copy link
Author

But finally if I add more elements it fails...

@dkurillo
Copy link
Author

Actually this fix #1085 also didn't help. Maybe the problem is here:

"RelativePlacement": {
         "type": "IfcLocalPlacement",
         "fields": ["PlacementRelTo", "RelativePlacement"],
         "includes": [
            "RelativePlacement",
            {
              "type": "IfcAxis2Placement3D",
                  "fields": [
                     "Location",
                     "Axis",
                     "RefDirection"
                  ]
            }
         ]
      }

If I remove "RelativePlacement" from includes it's working again

@hlg
Copy link
Member

hlg commented Dec 24, 2021

Does it only fail and take very long for models modified through the low level interface?
Are you always getting the correct geometry generated with the "RelativePlacement" include removed?

I thought that this was necessary for recursive querying of the relative placement, but apparently this is not the case, as I figured after some tinkering with the queries. Then a query like the following should just be enough (replace OID with valid ID for testing).

{"query": {
    "type": {
      "name": "IfcDistributionPort",
      "includeAllSubTypes": true
    },
   "oid": 6817549,
   "include": "ObjectPlacement"
 },
 "defines" : {
      "ObjectPlacement": {
         "type": "IfcProduct",
         "field": "ObjectPlacement",
         "include": "RelativePlacement"
      },
      "RelativePlacement": {
         "type": "IfcLocalPlacement",
         "fields": ["PlacementRelTo", "RelativePlacement"],
         "includes":  [{
            "type": "IfcAxis2Placement3D",
            "fields": [
               "Location",
               "Axis",
               "RefDirection"
            ]
         }]
     }
  }
}

@hlg hlg reopened this Dec 24, 2021
@dkurillo
Copy link
Author

Does it only fail and take very long for models modified through the low level interface?
Are you always getting the correct geometry generated with the "RelativePlacement" include removed?

I work with models through LowLevelInterface. If I get the error I commit a model without regenerating geometry, then I export it to IFC and import it again. During the import process I get the error. So the reason not in LowLevelInterface...

@thaopham03
Copy link

@dkurillo

Hello,

I tried to reproduce the query stack >10000000 error by loading the ifc model you mentioned above to release 1.5.184 to see if I get the same error. What I did was basically run the python client while I can make a loop of 100 revisions without actually having any minor change. Just for the revisions to appear. I have the duplication issue but there is no query stack issue when i add an query.

Since I am unable to reproduce this issue, if you encounter the error again in the future, please let us know.

@hlg
Copy link
Member

hlg commented Nov 14, 2024

As we cannot reproduce this, we are assuming this is solved with 252850f and a6591ea (fixed duplicate inverse generation in low level interface). If you encounter it again, please reopen or create a new issue.

@hlg hlg closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
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

3 participants