Comments (9)
Can I see your child class of ZBarReaderViewController
? That might offer some hints to what's causing it.
The other thing to try (and what you should prob be doing for performance anyway) is to only create 1 ZbarReaderViewController and reuse it each time you need to scan.
from monotouch.zbar.
Thanks for the quick reply. Here's my child class: http://pastebin.com/raw.php?i=MmLzRTLa
I'll change the way I'm bringing up that view controller to only create one instance like you advised, hopefully that will help it out. But let me know if you see any red flags in my child class.
from monotouch.zbar.
I just modified the child class to maintain only one instance, using the Singleton pattern. The scanning view controller is now presented, rather than navigated to, from the initiating view controller. The view controller that's actually presented is the singleton BarcodeScanningNavController (since I want the top toolbar to remain).
It did work a few times but it seems to be crashing once again.
Here's my updated class:
http://pastebin.com/raw.php?i=uVZmWy4V
from monotouch.zbar.
And, if it helps, here's a new Xcode console output from a crash after making those modifications:
http://pastebin.com/raw.php?i=Be4LV7YM
from monotouch.zbar.
I don't know, sorry. Your class is doing quite a few things, I would start by cutting back features and retesting until it no longer occurs.
If you can reproduce it in a simple example, then please re-open this issue and I will look into it.
One thing I did notice was that you add your BottomBarView
via some Add
method of the controller - is that an extension method of yours? What does it do? If it is adding it to the controller's View
property, that might be causing issues. The ZBarReaderViewController
has a Overlay
UIView property designed for your custom overlays, you shouldn't manipulate the view directly as it is managed by the base class controller.
I expose it in the binding here:
https://github.com/Its-Tyson/MonoTouch.ZBar/blob/master/binding/ApiDefinition.cs#L200-L204
This whole binding is a pretty thin wrapper around the obj-c library you linked to above - Make sure you've read their documentation in detail.
Cheers.
Tyson.
from monotouch.zbar.
I've reached the point now where I'm simply presenting a new instance of the ZBarReaderViewController, without any of my child classes or anything, ie:
PresentViewController (new ZBar.ZBarReaderViewController(), true, () => {});
I'm starting to see a pattern now, too, that it's consistently crashing on Ad-Hoc mode, but it seems to be working on Release and Debug builds. I checked the iOS Build configurations and the Release and Ad-Hoc configuration settings are exactly the same, both of them with that "--nosymbolstrip=ZBarReaderControllerResults" additional mtouch argument.
Is there anything you can think of that would cause it to crash on Ad-Hoc all the time?
from monotouch.zbar.
Do you have consistent compile settings for all your non-debug builds (Release, Ad-Hoc, AppStore)? I always compile all my release builds with LLVM enabled, although it should work either way.
from monotouch.zbar.
Yes I do. Here are my non-debug build settings: https://i.imgur.com/dEhMj77.png https://i.imgur.com/c8yYqO0.png
And my debug build settings: https://i.imgur.com/5WvY8Ml.png https://i.imgur.com/oB6g2Af.png
My build configurations for Release, Ad-Hoc and App Store are all identical.
from monotouch.zbar.
Those screenshots show LLVM is disabled for Release builds. Can you try with it enabled - I always use LLVM (and I strip all assemblies, not just sdk)
but yeah no idea how to explain that it works in release and not ad
from monotouch.zbar.
Related Issues (6)
- Documentation on it's usage? HOT 1
- Wrapper Type missing HOT 4
- memory leak HOT 2
- Compatible with ARMV7s architecture? HOT 2
- Binding for 1.3.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monotouch.zbar.