In our app, we are showing 30 POIs, each with its own background image. The app functionality is such that the AR view is the central view and its possible to frequently switch b/w AR and other views. After creating new POIs again, the app comes back to AR. After doing this a few times, the app crashes. Most times the "Wikitude SDK: Texture memory exceeded" warning is shown. Even otherwise the app crashes with following error:
and so on. The images are only of 100x100 resolution. Neither did reducing the number from 30 to 20 nor reducing image size to half the current size helped. Also, I am creating only one AR.ImageResource instance for each POI and am clearing the architectview cache and also destroying all the data in AR view, each time the view appears. Still the app does not stand up for too long. Thanks in advance.
P
Philipp Nagele
said
almost 9 years ago
Hi,
can you tell us more about your environment, which will help us isolate the issue. Device OS version SDK version Extensions or plugins (PhoneGap, Titanium) and their version.
A
Anand V
said
almost 9 years ago
As for device and OS, its happening in all of them. OS 6.0 to the 7.1 and all devices, even in 5S. I am using the latest SDK - 3.3.1. Not using any extensions or plugins.
A
Andreas Schacherbauer
said
almost 9 years ago
Hi, Seems that you are running into multiple issues at the same time. So let my clarify some logs and explain to you how you can use the Wikitdue SDK more efficiently.
Wikitude SDK: Texture memory exceeded: This log is printed each time you want to load an AR.ImageResource that can not be loaded into the texture memory. This does not result in a crash. You simply see a black texture instead of the original image.
Crash in RenderableInstance: Right now I'm not sure whats the reason for this crash. It would be very helpful if you could send us a demo project with which we can reproduce the error.
Additional Wikitude SDK logs: Those 'unknown drawable' or 'not found' logs appear each time you want to use/modify a JS object which does no longer has a counterpart in C++. So the object was destroyed in C++ but not in JS.
What you should try: As far as I understood, you're loading the ARchitect World each time the Wikitude SDK view comes visible. You don't need to do this. You can load the ARchitect World once and then simply use the '-start / -stop' methods (ObjC SDK) to pause and resume the rendering when switching between other views. The ARchitect World will resume exactly where it was paused. The -clearCache method does only affect the web view cache and not the SDK cache (3d models, tracker, images, sounds). As far as you dont want to load differnt content, you also don't need to call the destroyAll() function in JS.
I hope this answer was usefull. Please also watch for developer channel releases which we will publich each two weeks. They include the latest bug fixes and improvements from the last development sprint.
Best regards
Andreas
A
Anand V
said
almost 9 years ago
@Andreas I have emailed the project code to you, please look. Also, the app is crashing more frequently in iPhone 5c. Especially while switching b/w apps and while returning back to the app from lock screen. The lock screen issue is happening on all devices at times.
Anand V