artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
41 stars 22 forks source link

arwUpdateTexture32 crash on Windows #12

Closed GilbertoGojira closed 1 year ago

GilbertoGojira commented 5 years ago

When running on Windows the Unity Player (also happens on standalone) crash as soon as we update the texture. I can't get anymore info on the crash because the Unity player just dies on the spot. This problem does not happen on MacOS. The pixel format detected is Video 640x360@1Bpp (AR_PIXEL_FORMAT_420f) If i supply #-format=BGRA# into the ARController Video Config. (Windows) it gets the camera texture fine but not tracking occurs. Anyone else experiencing this?

Thanks

philip-lamb commented 5 years ago

Unity can't handle reading from multi-planar texture formats, so the native AR_PIXEL_FORMAT_420f the driver is supplying will definitely trip up arwUpdateTexture32. It shouldn't result in a crash, but I'd have to look into exactly where that is occurring and trap the error.

Tracking should definitely work with BGRA format, so that's a different error. I'll try and reproduce it.

philip-lamb commented 1 year ago

https://github.com/artoolkitx/arunityx/blob/release/1.1.2/Source/Package/Assets/artoolkitX-Unity/Scripts/ARController.cs#L674