Uploaded image for project: 'DAM Focal'
  1. DAM Focal
  2. RESPDAM-21

Uploading too small image breaks application

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.4
    • Fix Version/s: 1.1.6
    • Labels:
      None
    • Sprint:
      Sprint 5

      Description

      Reproduction:

      • uploading an to small Image (see attachment, size 15x15)
      • edit focalpoint (config is minHeight 17, minWidth 34, ratio 340/170)
        • select raster is larger than image and cannot be moved inside image
      • Saving generates

       

      java.awt.image.RasterFormatException: x lies outside the raster
      	at sun.awt.image.ByteInterleavedRaster.createWritableChild(ByteInterleavedRaster.java:1234) ~[?:?]
      	at java.awt.image.BufferedImage.getSubimage(BufferedImage.java:1202) ~[?:?]
      	at info.magnolia.dam.imaging.responsive.field.configuration.image.ResponsiveImageThumbnailComponentProvider.getThumbnailResource(ResponsiveImageThumbnailComponentProvider.java:65) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.dam.imaging.responsive.field.FocalAreasField$1.onSubmit(FocalAreasField.java:379) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.ui.mediaeditor.event.MediaEditorCompletedEvent.dispatch(MediaEditorCompletedEvent.java:88) ~[magnolia-ui-framework-compatibility-6.1.3.jar:?]
      	at info.magnolia.ui.mediaeditor.event.MediaEditorCompletedEvent.dispatch(MediaEditorCompletedEvent.java:46) ~[magnolia-ui-framework-compatibility-6.1.3.jar:?]
      	at info.magnolia.event.SimpleEventBus.fireEvent(SimpleEventBus.java:75) ~[magnolia-core-6.1.3.jar:?]
      	at info.magnolia.event.ResettableEventBus.fireEvent(ResettableEventBus.java:70) ~[magnolia-core-6.1.3.jar:?]
      	at info.magnolia.dam.imaging.responsive.ui.mediaeditor.ResponsiveMediaEditorPresenter.complete(ResponsiveMediaEditorPresenter.java:254) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.dam.imaging.responsive.ui.mediaeditor.ResponsiveMediaEditorPresenter.onCompleted(ResponsiveMediaEditorPresenter.java:266) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.dam.imaging.responsive.ui.mediaeditor.ResponsiveMediaEditorPresenter.lambda$getActionContextList$0(ResponsiveMediaEditorPresenter.java:211) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.ui.dialog.actionarea.renderer.DefaultEditorActionRenderer$DefaultActionView$1.buttonClick(DefaultEditorActionRenderer.java:75) [magnolia-ui-framework-compatibility-6.1.3.jar:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor425.invoke(Unknown Source) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:499) [vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:273) [vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:237) [vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1014) [vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.Button.fireClick(Button.java:384) [vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.Button$1.click(Button.java:57) [vaadin-server-8.8.5.jar:8.8.5]
      
      

       

      • editing generates following error and the whole focal-points are no longer shown.

       

      java.awt.image.RasterFormatException: x lies outside the raster
      	at sun.awt.image.ByteInterleavedRaster.createWritableChild(ByteInterleavedRaster.java:1234) ~[?:?]
      	at java.awt.image.BufferedImage.getSubimage(BufferedImage.java:1202) ~[?:?]
      	at info.magnolia.dam.imaging.responsive.field.configuration.image.ResponsiveImageThumbnailComponentProvider.getThumbnailResource(ResponsiveImageThumbnailComponentProvider.java:65) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.dam.imaging.responsive.field.configuration.image.ResponsiveImageThumbnailComponentProvider.getThumbnailComponent(ResponsiveImageThumbnailComponentProvider.java:87) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.dam.imaging.responsive.field.FocalAreasField.createPreviewThumbnail(FocalAreasField.java:288) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.dam.imaging.responsive.field.FocalAreasField.initField(FocalAreasField.java:243) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at info.magnolia.dam.imaging.responsive.field.FocalAreasField.initContent(FocalAreasField.java:211) ~[magnolia-dam-images-responsive-1.1.4.jar:?]
      	at com.vaadin.v7.ui.CustomField.getContent(CustomField.java:99) ~[vaadin-compatibility-server-8.8.5.jar:8.8.5]
      	at com.vaadin.v7.ui.CustomField.attach(CustomField.java:89) ~[vaadin-compatibility-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:621) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:600) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:621) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:600) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:621) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:600) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:621) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:600) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:621) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:600) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:621) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:600) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:621) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:600) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:521) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:178) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.TabSheet.addTab(TabSheet.java:397) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.TabSheet.addTab(TabSheet.java:349) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at com.vaadin.ui.TabSheet.addTab(TabSheet.java:325) ~[vaadin-server-8.8.5.jar:8.8.5]
      	at info.magnolia.admincentral.AdmincentralAppView.addSubAppView(AdmincentralAppView.java:129) ~[magnolia-admincentral-6.1.3.jar:?]
      	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.startSubApp(AppInstanceControllerImpl.java:413) ~[magnolia-ui-framework-6.1.3.jar:?]
      	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.openSubApp(AppInstanceControllerImpl.java:346) ~[magnolia-ui-framework-6.1.3.jar:?]
      	at info.magnolia.ui.framework.app.BaseApp.locationChanged(BaseApp.java:65) ~[magnolia-ui-framework-6.1.3.jar:?]
      	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.onLocationUpdate(AppInstanceControllerImpl.java:222) ~[magnolia-ui-framework-6.1.3.jar:?]

       

      • If switching to another application, the full asset-application crashes and its not possible to restart it.
      • Beside it doesnt make sense to upload a too small image, its not forbidden.

       

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                amanzoni Adrien Manzoni
                Reporter:
                SebastianPaasch Sebastian Paasch
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Checklists

                    Bug DoR
                    DoD