Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • CityDoctor2 CityDoctor2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CityDoctor
  • CityDoctor2CityDoctor2
  • Issues
  • #104
Closed
Open
Issue created Jan 21, 2025 by Riegel@alexander.riegelContributor

Creation of error reports fails

Summary

CityDoctor currently fails to create error reports if the citymodel contains top-level CityObject types added in version 3.16.0

Steps to reproduce

  1. Open a CityGML file containing newly added CityObject types like e.g. CityFurniture

  2. Run checks

  3. Open error statistics and activate checkboxes for PDF and XML reports

  4. Click the save button

What is the current bug behavior?

An empty, corrupted PDF file is created and creation of XML report fails silently.

What is the expected correct behavior?

PDF and XML reports should be created.

Relevant logs and/or screenshots

Exception in thread "Thread-9" java.lang.IllegalStateException: Unknown City Object found: class de.hft.stuttgart.citydoctor2.datastructure.GenericCityObject
	at de.hft.stuttgart.citydoctor2.reporting.pdf.PdfStreamReporter.report(PdfStreamReporter.java:190)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at de.hft.stuttgart.citydoctor2.reporting.pdf.PdfReporter.writeReport(PdfReporter.java:41)
	at de.hft.stuttgart.citydoctor2.check.Checker.writePdfReport(Checker.java:163)
	at de.hft.stuttgart.citydoctor2.gui.CityDoctorController.writePdfReport(CityDoctorController.java:1049)
	at de.hft.stuttgart.citydoctor2.gui.WriteReportDialog.lambda$initWriteButton$9(WriteReportDialog.java:231)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Possible cause

The PDF- and XMLStreamReporter have a switch-case in their report(CityObject co) function, which selects the report formatting according to the CityObject's type. Cases for the newly added top-level CityObject types (Tunnel, CityFurniture and GenericCityObjects) are missing, causing the StreamReporters to throw an IllegalStateException when encountering them.

Assignee
Assign to
Time tracking

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal