2

iOSアプリでいくつかのバーコードをスキャンする必要があるアプリケーションを開発しています。モノタッチアプリケーションでRedLaserライブラリを使用するように依頼されました。

いくつかの調整を行うだけで、自分のマシンでアプリケーションをコンパイル、ビルド、および実行できます。

ただし、ホーム画面から[スキャン]ボタンをクリックすると、アプリケーションがクラッシュします。MonoDevelopの「アプリケーション出力」パネルに例外、エラー、または警告が表示されません。ログも見つかりませんでした。アプリケーションはiOSSimulatorで実行されています。

この問題は、OverrlayControllerがParentPickerを読み込もうとしたときに発生します。その値をチェックするだけでも、アプリケーションがクラッシュします。

クラッシュしている場所にコードのサンプルを置きました。ここでQRCodeに問題があることがわかったので、QRScanningを無効にしました。しかし、それでも同じクラッシュ。使ってます

Monotouch 6.0、MonoDevelop 3.0.5、RedLaser 3.4.0

どんな助けでも大歓迎です。

public partial class RLSampleViewController : UIViewController
{
    public RLSampleViewController (IntPtr handle) : base (handle) { }
    partial void scanPressed (MonoTouch.UIKit.UIBarButtonItem sender)
    {
         //THIS IS THE LINE WHERE THE APP IS JUST CRASHING 
         if (overlayController.ParentPicker == null)
         {
             BarcodePickerController picker = new BarcodePickerController ();
             // setup picker
             picker.Overlay = overlayController;
             picker.Delegate = new BarcodePickerDelegate (this);
             // Initialize with portrait mode as default
             picker.Orientation = UIImageOrientation.Up;
            // The active scanning region size is set in OverlayController.m
          }

         // The rest of the code was ignored

クラッシュログを含めるように質問を更新しました(どこにあるかを教えてくれたRolf B.に感謝します)。しかし、私はObjective-Cに精通していないので、それでも意味がありません。

> Process:         RedLaserSample [10999]
> Path:            /Users/USER/Library/Application Support/iPhone
> Simulator/*/RedLaserSample.app/RedLaserSample
> Identifier:      RedLaserSample
> Version:         ???
> Code Type:       X86 (Native)
> Parent Process:  launchd [243]
> User ID:         501

> Date/Time:       2013-01-08 16:58:35.532 +1100
> OS Version:      Mac OS X 10.8.2 (12C60)
> Report Version:  10

> Crashed Thread:  0  Dispatch queue: com.apple.main-thread

> Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000bf7ffffc

> VM Regions Near 0xbf7ffffc:
>     Stack                  00000000b056d000-00000000b057d000 [   64K] rw-/rwx SM=COW  
> --> Stack                  00000000bc000000-00000000bf800000 [ 56.0M] ---/rwx SM=NUL  
>     Stack                  00000000bf800000-00000000c0000000 [ 8192K] rw-/rwx SM=COW  

> Application Specific Information:
> iPhone Simulator 358.4, iPhone OS 6.0 (iPhone/10A403)


> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0   CoreFoundation                    0x0405f6cd typeStringHash + 13
> 1   CoreFoundation                    0x03fffdb0 __CFDictionaryHashKey + 32
> 2   CoreFoundation                    0x03fe53e2 CFBasicHashFindBucket + 1426
> 3   CoreFoundation                    0x03fe4e2d CFDictionaryGetValue + 109
> 4   CoreFoundation                    0x0405e0ea +[NSMethodSignature signatureWithObjCTypes:] + 250
> 5   CoreFoundation                    0x040fb5c3 -[NSObject(NSObject)  methodSignatureForSelector:] + 83
> 6   RedLaserSample                    0x0027a752 monotouch_trampoline + 82
> 7   ???                               0x0c7e9010 0 + 209621008
> 8   ???                               0x12c68efc 0 + 315002620
> 9   ???                               0x12c68fd4 0 + 315002836
> 10  RedLaserSample                    0x00077112 mono_jit_runtime_invoke + 722
> 11  RedLaserSample                    0x001d8bae mono_runtime_invoke + 126
> 12  RedLaserSample                    0x0027b568 monotouch_trampoline + 3688
> 13  ???                               0x0c7e9010 0 + 209621008
> 14  ???                               0x12c68efc 0 + 315002620
> 15  ???                               0x12c68fd4 0 + 315002836
4

1 に答える 1

1

これはバインディングのバグであることが判明しました(サブクラス化の準備ができていませんでした)。

これは修正され、更新されたバインディングはhttp://github.com/mono/monotouch-bindingsで入手できます。

于 2013-01-10T10:08:44.493 に答える