neocotic / brick-pop-solver

Solver for the Brick Pop facebook messenger game
MIT License
4 stars 1 forks source link

Error #1

Open Yunaleska opened 7 years ago

Yunaleska commented 7 years ago

hey there i've been trying to run it on windows but everytime i get the same error using cmd/gitbash I also have a nexus 6p.

21:46:28.886 [main] INFO com.neocotic.brickpopsolver.BrickPopSolver - 1 connected devices found Exception in thread "main" com.neocotic.brickpopsolver.device.DeviceException: Failed to read captured screenshot at com.neocotic.brickpopsolver.device.android.AndroidDeviceService.captureScreenshot(AndroidDeviceService.java:77) at com.neocotic.brickpopsolver.BrickPopSolver.solve(BrickPopSolver.java:99) at com.neocotic.brickpopsolver.BrickPopSolver.main(BrickPopSolver.java:56) Caused by: com.neocotic.brickpopsolver.image.ImageException: Image is not valid: C:\Users\abikk\AppData\Local\Temp\brickpopsolver-8740516682397023140.png at com.neocotic.brickpopsolver.image.opencv.OpenCVImageService.readImage(OpenCVImageService.java:54) at com.neocotic.brickpopsolver.device.android.AndroidDeviceService.captureScreenshot(AndroidDeviceService.java:69) ... 2 more

thanks!

neocotic commented 7 years ago

@Yunaleska can you please confirm that you're still seeing this error and that, when you're running the application, that you have the game running on your device (i.e. you can "pop bricks")?

Since I have only tested this on Linux, I would perhaps recommend running through it in debug mode in an IDE. The application cleans up the temporary files containing the screenshots on exit, so you might want to first add a breakpoint immediately after the screenshot is captured and then inspect the temporary file that is created. This line is probably the best place:

https://github.com/neocotic/brick-pop-solver/blob/master/src/main/java/com/neocotic/brickpopsolver/device/android/AndroidDeviceService.java#L69

Brendan61 commented 7 years ago

@Yunaleska I was just wondering if you ever figured this problem out and if you did if you remember what you had to do. I'm currently getting this right now and don't really know what to do.

Thanks

Yunaleska commented 7 years ago

Noo I couldn't make it work sadly...

bliznik commented 7 years ago

Hey guys, I have the same issue, running on Windows 10.

How do I "insert a breakpoint" and view the temp file? Is there a way for me to output the file to a more permanent location and take a look at it?