【appcrawler】抛:Exception in thread "main" java.awt.image.RasterFormatException: (y + height) is outside of Raster

问题

【当前使用设备】:android模拟器;
【当前android版本】:android 15
【当前执行日志】:
2024-07-05 17:32:27 ERROR [Crawler.226.crawlWithRetry] create new session

Exception in thread “main” java.awt.image.RasterFormatException: (y + height) is outside of Raster

at sun.awt.image.ByteInterleavedRaster.createWritableChild(ByteInterleavedRaster.java:1248)

at java.awt.image.BufferedImage.getSubimage(BufferedImage.java:1202)

at com.ceshiren.appcrawler.model.ScreenShot.clip(ScreenShot.scala:52)

at com.ceshiren.appcrawler.core.Crawler.saveElementScreenshot(Crawler.scala:1177)

at com.ceshiren.appcrawler.core.Crawler.doElementAction(Crawler.scala:1053)

at com.ceshiren.appcrawler.core.Crawler.crawl(Crawler.scala:1021)

at com.ceshiren.appcrawler.core.Crawler.$anonfun$crawlWithRetry$1(Crawler.scala:214)

at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)

at scala.util.Try$.apply(Try.scala:210)

at com.ceshiren.appcrawler.core.Crawler.crawlWithRetry(Crawler.scala:214)

at com.ceshiren.appcrawler.core.Crawler.start(Crawler.scala:171)

at com.ceshiren.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:319)

at com.ceshiren.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:286)

at com.ceshiren.appcrawler.AppCrawler$.main(AppCrawler.scala:73)

at com.ceshiren.appcrawler.AppCrawler.main(AppCrawler.scala)
【当前执行日志截图】


【appcrawler.log】
appcrawler.log (1.4 MB)
【设备信息】
Properties
avd.ini.displayname android 15
avd.ini.encoding UTF-8
AvdId android_15
disk.dataPartition.size 6G
fastboot.chosenSnapshotFile
fastboot.forceChosenSnapshotBoot no
fastboot.forceColdBoot no
fastboot.forceFastBoot yes
hw.accelerometer yes
hw.arc false
hw.audioInput yes
hw.battery yes
hw.camera.back virtualscene
hw.camera.front emulated
hw.cpu.ncore 4
hw.device.hash2 MD5:d37b758e1a2b070e348378c2efde849a
hw.device.manufacturer Generic
hw.device.name small_phone
hw.dPad no
hw.gps yes
hw.gpu.enabled yes
hw.gpu.mode auto
hw.initialOrientation portrait
hw.keyboard yes
hw.lcd.density 320
hw.lcd.height 1280
hw.lcd.width 720
hw.mainKeys no
hw.ramSize 1024
hw.sdCard yes
hw.sensors.orientation yes
hw.sensors.proximity yes
hw.trackBall no
image.androidVersion.api 35
image.sysdir.1 system-images/android-35/google_apis_playstore/arm64-v8a/
PlayStore.enabled true
runtime.network.latency none
runtime.network.speed full
showDeviceFrame no
skin.dynamic yes
skin.path.backup _no_skin
tag.display Google Play
tag.displaynames Google Play
tag.id google_apis_playstore
tag.ids google_apis_playstore
vm.heapSize 80

项目来源

https://github.com/seveniruby/AppCrawler

可以检查下屏幕是不是横屏


老师,确实是横屏, :rofl:该怎么处理。

老师,有同学说修改分辨率,请问支持什么样的分辨率啊?

应该你的显示分辨率和实际分辨率不一致,你的模拟器上应该有对应的分辨率选项可以修改的

用的什么模拟器呀,找下设置里有没有横屏竖屏设置,或者直接修改分辨率

接上面帖子:我把分辨率改成
image

【执行到一半又抛同样的异常啦】




【appcrawler.log 】
老师因为log文件太大啦,所以我上传到百度网盘啦:链接: 百度网盘 请输入提取码 提取码: aidt 复制这段内容后打开百度网盘手机App,操作更方便哦

是一张横着的图片

414*896 试试这个分辨率