Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all 7143 articles
Browse latest View live

How to resolve UnhandledException at [UnityAppController(Rendering) repaintDisplayLink]

$
0
0

This crash is by far topping our crash logs, and we just can't figure out what is causing it. So I turn to you guys for help.

My research in this topic hints that a possible cause is when we're either trying to display an ad at a different orientation than the game is using, or if we resume the app in another orientation than it had when it was minimized. It also looks like this was a thing back in 2016 and was resolved in Unity 5.6.0. This does not help very much though, since we're currently using Unity 2018.4.6f1.

We are unable to reproduce this crash ourselves, but we're seeing tons of crashes like this on Firebase Crashlytics. So that's all we have to go on.

Here's some info that could be relevant:
Unity: 2018.4.6f1
Affected devices: iphone, ipad
Affected OS: iOS 9 - iOS 13
Xcode version: 11.1

Unity player settings configuration:
Default orientation: Auto rotation
Use Animated Autorotation: true
Allowed Orientations for Auto Rotation: Landscape Right, Landscape Left

A typical crash log looks like this:

Crashed: com.apple.main-thread
0  GameApp            0x100533da8 CrashedCheckBelowForHintsWhy + 118 (CrashReporter.mm:118)
1  GameApp            0x102c9563c void firebase::ReferenceCountedFutureImpl::DeleteT<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(void*) + 27033940
2  GameApp            0x1005fe8bc RuntimeInvoker_TrueVoid_tDB81A15FA2AB53E2401A76B745D215397B29F783_RuntimeObject_RuntimeObject(void (*)(), MethodInfo const*, void*, void**) + 22071 (Il2CppInvokerTable.cpp:22071)
3  GameApp            0x10126b4b8 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 539 (Runtime.cpp:539)
4  GameApp            0x10126bdf0 il2cpp::vm::Runtime::CallUnhandledExceptionDelegate(Il2CppDomain*, Il2CppDelegate*, Il2CppException*) + 476 (Runtime.cpp:476)
5  GameApp            0x10126bd7c il2cpp::vm::Runtime::UnhandledException(Il2CppException*) + 632 (Runtime.cpp:632)
6  GameApp            0x100cb5424 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 362 (ScriptingInvocation.cpp:362)
7  GameApp            0x100cbcbf0 Coroutine::InvokeMoveNext(ScriptingExceptionPtr*) + 71 (ScriptingInvocation.h:71)
8  GameApp            0x100cbc7c8 Coroutine::Run(bool*) + 257 (Coroutine.cpp:257)
9  GameApp            0x100c09fc0 AsyncOperation::InvokeCoroutine() + 21 (AsyncOperation.cpp:21)
10 GameApp            0x100c26590 PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int) + 455 (PreloadManager.cpp:455)
11 GameApp            0x100c26ba4 PreloadManager::UpdatePreloading() + 565 (PreloadManager.cpp:565)
12 GameApp            0x100c1b6a8 ExecutePlayerLoop(NativePlayerLoopSystem*) + 347 (PlayerLoop.cpp:347)
13 GameApp            0x100c1b6dc ExecutePlayerLoop(NativePlayerLoopSystem*) + 365 (PlayerLoop.cpp:365)
14 GameApp            0x100c1b8bc PlayerLoop() + 45 (RecursionLimit.h:45)
15 GameApp            0x100e71c24 UnityPlayerLoopImpl(bool) + 272 (LibEntryPoint.mm:272)
16 GameApp            0x10052a898 UnityRepaint + 280 (UnityAppController+Rendering.mm:280)
17 GameApp            0x10052a774 -[UnityAppController(Rendering) repaintDisplayLink] + 72 (UnityAppController+Rendering.mm:72)
18 QuartzCore         0x240809ff0 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 636
19 IOKit              0x23c6564b0 IODispatchCalloutFromCFMessage + 488
20 CoreFoundation     0x23c36519c __CFMachPortPerform + 188
21 CoreFoundation     0x23c38bda0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
22 CoreFoundation     0x23c38b4ec __CFRunLoopDoSource1 + 440
23 CoreFoundation     0x23c386310 __CFRunLoopRun + 2096
24 CoreFoundation     0x23c3857c0 CFRunLoopRunSpecific + 436
25 GraphicsServices   0x23e58679c GSEventRunModal + 104
26 UIKitCore          0x268a3ec38 UIApplicationMain + 212
27 GameApp            0x100522310 main + 41 (main.mm:41)
28 libdyld.dylib      0x23be498e0 start + 4

And some relevant code snippets from UnityAppController+Rendering.mm:

64 - (void)repaintDisplayLink
65 {
66 #if ENABLE_DISPLAY_LINK_PAUSING
67     _displayLink.paused = YES;
68 #endif
69     if (!_didResignActive)
70     {
71         [self repaint];
72         [self processTouchEvents];
73     }
74
75 #if ENABLE_DISPLAY_LINK_PAUSING
76     _displayLink.paused = NO;
77 #endif
78 }
267 extern "C" void UnityRepaint()
268 {
269     @autoreleasepool
270     {
271         // this will handle running on metal just fine (nop)
272         EAGLContextSetCurrentAutoRestore autorestore(GetMainDisplaySurface());
273
274         Profiler_FrameStart();
275
276         UnityInputProcess();
277         UnityPlayerLoop();
278
279         Profiler_FrameEnd();
280     }
281 }

I'm at a loss here, do you have any insights on what might be causing this? Any ideas how we should proceed to resolve this crash?


VS-2019 program crashes on first floating point instruction on some servers

$
0
0

I have a service with code that runs for years.

Now using the VS-2019 16.3.7/8/9 I get a 0xC000001D (The thread tried to execute an invalid instruction.) exceptions on the first floating point arithmetic in the boot phase of the service on some machines.

Installing the same code base compiled with 16.2.4/5 works.

I have a full memory crash dump from one machine. The crash happens on a call to _dtol3.

I can see in the assembly code this situation.

0149477B 83 3D B4 AC 55 01 06 cmp         dword ptr [__isa_available (0155ACB4h)],6  
01494782 7C 15                jl          _dtol3_default (01494799h)  
01494784 C5 FA 7E C0          vmovq       xmm0,xmm0  
01494788 62 F1 FD 08 7A C0    vcvttpd2qq  xmm0,xmm0  <---- CRASH

__isa_available has the value 6. On my machine the value is 5. One machine were we can see the crash is a XEON Silver 4110 running our software virtualized. Same exe runs on a XEON E5-2620. The same exe runs on all my client machines in my company without any problem (a mix of old and new Intel machines).

Looking at the called code, I can see that there is a simple difference and division of to double values comparing it to a value greater or equal 1.0.

COleDateTime nowClient = COleDateTime::GetCurrentTime(),
nowDB = GetCurrentTime();
COleDateTimeSpan diff = nowDB-nowClient;
if (diff.GetTotalMinutes()>=1)  // <----- CRASH
    ...

Is there any way to influence the code creation in the VS to avoid the calls to this code? (Any shim, compatibility setting)

Is there any known change in VS-2019 that influences the floating math since VS 16.2.4, that might has influence on my problem?

Flutter app crashes when it use Firestore plugin in Release mode

$
0
0

Everything works perfectly when in debug mode. It first happened when I update Flutter version to 1.10.x I could not remember which version did I use, properly. It should be 1.7.8, it was stable. To fix it I downgrade the flutter to 1.7.8+4 and also downgrade firebase related pub packages. But error still here.

Stack Trace for Related Error, captured from gogle play console

java.lang.RuntimeException: 
  at com.google.firebase.firestore.util.AsyncQueue.a (AsyncQueue.java:379)
  at com.google.firebase.firestore.util.AsyncQueue$$Lambda$5.run (AsyncQueue.java:2)
  at android.os.Handler.handleCallback (Handler.java:790)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:7000)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:441)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408)
Caused by: java.lang.AbstractMethodError: 
  at com.google.protobuf.GeneratedMessageLite.a (GeneratedMessageLite.java:1319)
  at com.google.firebase.firestore.proto.WriteBatch.s (WriteBatch.java:120)
  at com.google.firebase.firestore.proto.WriteBatch.a (WriteBatch.java:162)
  at com.google.firebase.firestore.proto.WriteBatch.a (WriteBatch.java:15)
  at com.google.firebase.firestore.proto.WriteBatch$Builder.a (WriteBatch.java:835)
  at com.google.firebase.firestore.local.LocalSerializer.a (LocalSerializer.java:172)
  at com.google.firebase.firestore.local.SQLiteMutationQueue.a (SQLiteMutationQueue.java:188)
  at com.google.firebase.firestore.local.LocalStore.a (LocalStore.java:237)
  at com.google.firebase.firestore.local.LocalStore$$Lambda$2.get (LocalStore.java:8)
  at com.google.firebase.firestore.local.SQLitePersistence.a (SQLitePersistence.java:195)
  at com.google.firebase.firestore.local.LocalStore.a (LocalStore.java:201)
  at com.google.firebase.firestore.core.SyncEngine.a (SyncEngine.java:227)
  at com.google.firebase.firestore.core.FirestoreClient.a (FirestoreClient.java:200)
  at com.google.firebase.firestore.core.FirestoreClient$$Lambda$11.run (FirestoreClient.java:6)
  at com.google.firebase.firestore.util.AsyncQueue.a (AsyncQueue.java:311)
  at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call (AsyncQueue.java:2)
  at com.google.firebase.firestore.util.AsyncQueue.a (AsyncQueue.java:287)
  at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run (AsyncQueue.java:4)
  at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:457)
  at java.util.concurrent.FutureTask.run (FutureTask.java:266)
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run             
(ScheduledThreadPoolExecutor.java:301)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run (AsyncQueue.java:205)
  at java.lang.Thread.run (Thread.java:764)

When I saw the error trace on device (in android crash report dialog) It mentioned Firebase 19.0.0

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel unknown, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17134.1069], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Enterprise 2017 15.9.7)
[√] Android Studio (version 3.4)
[√] VS Code, 64-bit edition (version 1.38.1)
[√] Connected device (3 available)

• No issues found!

Error reporoducing scenario for final describe:

  • Build app with flutter run --release
  • App try an basic firestore call

    Firestore.instance.collection('collection-name').document('docuemnt-id').get()

  • App crashes.

Also getting the same error with building with flutter build appbudle

how to find a symbol file and tell crash about it

$
0
0

I am debugging in issue in the Linux kernel using the crash utility to inspect a kernel crash core. But when I try to inspect contents of a particular instance of struct r5conf, crash tells me it does not know that struct or its layout.

crash> struct r5conf
struct: invalid data structure reference: r5conf

So, how do I tell crash about the layout of this structure?

Adding entry to myApp.entitlements causes quit with `Message from debugger: Error 1`

$
0
0

I have some IOHID code for watching keyboard events.

It was working fine on an earlier version of macOS. About four years ago, I don't remember precisely. Towards the end of the Big Cat era, before the Geography era.

I tried running it on Catalina and it won't pick up events.

I figured this is likely some security measure.

I couldn't find any suitable key in info.plist

Googling, I found a bunch of myProj.entitlementshere

I will just use one of them as an example:

<key>com.apple.iohideventsystem.server</key>
    <true/>

If I add this key (bumping over this issue) and run my app, it now quits immediately with:

Message from debugger: Error 1

Even setting a breakpoint in main.m won't hit.

What is going on?

App crashes in GooglePlay store but not when developing locally on emulators and physical devices

$
0
0

After upgrading my app to a never version and using realm database, it crashes when downloaded from GooglePlay but never when I check it on physical devices or many emulators. What is wrong? Pls help. In my app I used StaticObject to wrap some realm configurations for different languages and inMemory real to keep track of selected object along all the app.

problem:

`java.lang.ExceptionInInitializerError: 
  at pl.nanoid.atlasotoskopii.ui.Start.MainActivity.onCreate (20)
  at android.app.Activity.performCreate (Activity.java:7458)
  at android.app.Activity.performCreate (Activity.java:7448)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1286)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3409)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3614)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:86)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2199)
  at android.os.Handler.dispatchMessage (Handler.java:112)
  at android.os.Looper.loop (Looper.java:216)
  at android.app.ActivityThread.main (ActivityThread.java:7625)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:987)
Caused by: java.lang.IllegalArgumentException: 
  at c.a.q$a.a (3)
  at c.a.q$a.a (Unknown Source:5)
  at pl.nanoid.atlasotoskopii.StaticObject.<clinit> (3)`

MainActivity:

    class MainActivity : AppCompatActivity() {

    lateinit var inMemRealm: Realm

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        try {

            this.supportActionBar?.hide()

        } finally {

        }

        setContentView(R.layout.activity_main)
        val navView: BottomNavigationView = findViewById(R.id.nav_view)
        val navController = findNavController(R.id.nav_host_fragment)


        // Passing each menu ID as a set of Ids because each
        // menu should be considered as top level destinations.
        val appBarConfiguration = AppBarConfiguration(
            setOf(
                R.id.navigation_list,
                R.id.navigation_info,
                R.id.navigation_pictures
            )
        )

        setupActionBarWithNavController(navController, appBarConfiguration)
        navView.setupWithNavController(navController)

        // Configure Realm database and create in memory Realm for selecting items

        inMemRealm = Realm.getInstance(StaticObject.inMemoryRealm)
        inMemRealm.executeTransaction {
            val inMem = InMemRealm()
            inMem.id = 1
            inMemRealm.insert(inMem)
        }
        copyDatabaseFromBundle()

    }

    // COPY DATABASE from bundle to the working directory

    private fun copyDatabaseFromBundle() {

    }

}

StaticObject:

    object StaticObject {

    // value for number of items for adapters:
    const val numberOfItemsInAdapters: Int = 24

    val inMemoryRealm: RealmConfiguration
    val enRealmConfig: RealmConfiguration
    val plRealmConfig: RealmConfiguration
    val ruRealmConfig: RealmConfiguration


    init {

        enRealmConfig = configureENRealm()
        plRealmConfig = configurePLRealm()
        ruRealmConfig = configureRURealm()
        inMemoryRealm = configureInMemoryRealm()

    }


    private fun configureENRealm () : RealmConfiguration {

        return RealmConfiguration.Builder()
            .assetFile("tableen.realm")
            .schemaVersion(1)
            .modules(TableENModule())
            .name("rurealm.realm")
            .readOnly()
            .build()
    }

    private fun configurePLRealm () : RealmConfiguration {

        return RealmConfiguration.Builder()
            .assetFile("tablepl.realm")
            .schemaVersion(1)
            .modules(TablePLModule())
            .name("plrealm.realm")
            .readOnly()
            .build()
    }

    private fun configureRURealm () : RealmConfiguration {

        return RealmConfiguration.Builder()
            .assetFile("tableru.realm")
            .schemaVersion(1)
            .modules(TableRUModule())
            .name("enrealm.realm")
            .readOnly()
            .build()
    }

    private fun configureInMemoryRealm () : RealmConfiguration {
        return RealmConfiguration.Builder()
            .inMemory()
            .name("inMemoryRealm")
            .build()
    }


    @RealmModule(classes = arrayOf(tableen::class))
    private class TableENModule

    @RealmModule(classes = arrayOf(tablepl::class))
    private class TablePLModule

    @RealmModule(classes = arrayOf(tableru::class))
    private class TableRUModule

}

InMemory Realm scheme:

    import io.realm.RealmObject

open class InMemRealm: RealmObject() {

    var id: Int? = null

}

Run on emulator:

11/12 07:49:17: Launching 'app' on Pixel C API 28.
$ adb shell am start -n "pl.nanoid.atlasotoskopii/pl.nanoid.atlasotoskopii.ui.Start.StartActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Waiting for process to come online...
Connected to process 8060 on device 'Pixel_C_API_28 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/.atlasotoskopi: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
W/.atlasotoskopi: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
W/.atlasotoskopi: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
W/.atlasotoskopi: Accessing hidden method Landroid/graphics/FontFamily;-><init>()V (light greylist, reflection)
W/.atlasotoskopi: Accessing hidden method Landroid/graphics/FontFamily;->addFontFromAssetManager(Landroid/content/res/AssetManager;Ljava/lang/String;IZIII[Landroid/graphics/fonts/FontVariationAxis;)Z (light greylist, reflection)
    Accessing hidden method Landroid/graphics/FontFamily;->addFontFromBuffer(Ljava/nio/ByteBuffer;I[Landroid/graphics/fonts/FontVariationAxis;II)Z (light greylist, reflection)
    Accessing hidden method Landroid/graphics/FontFamily;->freeze()Z (light greylist, reflection)
    Accessing hidden method Landroid/graphics/FontFamily;->abortCreation()V (light greylist, reflection)
    Accessing hidden method Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;Ljava/lang/String;II)Landroid/graphics/Typeface; (light greylist, reflection)
W/.atlasotoskopi: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking)
D/OpenGLRenderer: Skia GL Pipeline
D/HostConnection: HostConnection::get() New Host Connection established 0xe14ee260, tid 8111
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation: eglCreateContext: 0xe208b540: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xe208b540: ver 3 0 (tinfo 0xe41e0620)
D/HostConnection: createUnique: call
    HostConnection::get() New Host Connection established 0xe14f01f0, tid 8111
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
D/EGL_emulation: eglMakeCurrent: 0xe208b540: ver 3 0 (tinfo 0xe41e0620)
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@9195193
I/System.out: @drawable/photo1min
I/System.out: @drawable/photo2min
I/System.out: @drawable/photo3min
I/System.out: @drawable/photo4min
I/System.out: @drawable/photo5min
I/System.out: @drawable/photo6min
D/EGL_emulation: eglMakeCurrent: 0xe208b540: ver 3 0 (tinfo 0xe41e0620)
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@4db914d
D/EGL_emulation: eglMakeCurrent: 0xe208b540: ver 3 0 (tinfo 0xe41e0620)
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@aa9d30d
D/EGL_emulation: eglMakeCurrent: 0xe208b540: ver 3 0 (tinfo 0xe41e0620)

Unity3d - Access Violation (0xc0000005)

$
0
0

My Unity App build for Windows10 is crashing randomly. I can kind of reproduce it when I click the buttons in the app very fast, a couple of times in a row.

I use an external touchscreen monitor, not sure if this is important and the app is compiled on a Mac (don't have Unity on windows).

My system: Intel NUC8, Windows 10, Unity 2019.2.1f

  • run app as administrator
  • disabled wifi, firewall, anti virus
  • the windows 10 on the pc is pretty clean, nothing other installed
  • some users had problem with the citrix app, which I don't have installed

Not sure what else I can try... :(

See error log file below:

Error Log:

JLR Touchscreen App by ME [version: Unity 2019.2.1f1_ca4d5af0be6f]

d3d11.dll caused an Access Violation (0xc0000005)
  in module d3d11.dll at 0033:7c3df4f0.

Error occurred at 2019-11-12_011246.
C:\Users\this2\Documents\Touchscreen App.exe, run by this2.

29% physical memory in use.
8061 MB physical memory [5719 MB free].
387 MB process peak paging file [281 MB used].
367 MB process peak working set [264 MB used].
System Commit Total/Limit/Peak: 2280MB/9341MB/2562MB
System Physical Total/Available: 8061MB/5719MB
System Process Count: 145
System Thread Count: 1519
System Handle Count: 51188
Disk space data for 'C:\Users\this2\AppData\Local\Temp\ME\Touchscreen App\Crashes\Crash_2019-11-12_091243819\': 220660408320 bytes free of 255383826432 total.

Read from location 000000000000012C caused an access violation.

Context:
RDI:    0x0000000000000000  RSI: 0x0000015309b8e9c0  RAX:   0x0000000000000100
RBX:    0x0000000000000036  RCX: 0x0000015309b8e9c0  RDX:   0x0000000000000000
RIP:    0x00007ff87c3df4f0  RBP: 0x00000031f4bfe841  SegCs: 0x0000000000000033
EFlags: 0x0000000000010206  RSP: 0x00000031f4bfe780  SegSs: 0x000000000000002b
R8:     0x0000000000000000  R9:  0x00000031f4bfe8d8  R10:   0x00000153083b8d40
R11:    0x00007ff83fbe1ff8  R12: 0x0000000000000000  R13:   0x0000015309b8e8e0
R14:    0x0000000000000100  R15: 0x0000000000000100


Bytes at CS:EIP:
44 0f b6 9a 2c 01 00 00 4c 8b f1 8b 8a d8 00 00 

Mono DLL loaded successfully at 'C:\Users\this2\Documents\JLR\MonoBleedingEdge\EmbedRuntime\mono-2.0-bdwgc.dll'.

Stack Trace of Crashed Thread 5820:
0x00007FF87C3DF4F0 (d3d11) CreateDirect3D11SurfaceFromDXGISurface
0x00007FF83ED30B8B (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83ED2907F (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83EDB29A3 (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83EDB864B (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83EDB8728 (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83F0B9D08 (UnityPlayer) UnityMain
0x00007FF884F07BD4 (KERNEL32) BaseThreadInitThunk
0x00007FF88560CED1 (ntdll) RtlUserThreadStart

iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta

$
0
0

This crash has been a blocking issue I used the following steps to reproduce the issue:

  • Create a Cocoa Touch Framework project
  • Add a swift file and a class Dog
  • Build a framework for device
  • Create a Single View application in Swift
  • Import framework into app project
  • Instantiate swift class from the framework in ViewController
  • Build and run an app on the device

The app immediate crashed upon launching, here is console log:

dyld: Library not loaded: @rpath/FrameworkTest03.framework/FrameworkTest03
  Referenced from: /var/mobile/Applications/FA6BAAC8-1AAD-49B4-8326-F30F66458CB6/FrameworkTest03App.app/FrameworkTest03App
  Reason: image not found

I have tried to build on iOS 7.1 and 8.0 devices, they both have the same crash. However, I can build an app and run on the simulator fine. Also, I am aware that I can change the framework to form Required to Optional in Link Binary With Libraries, but it did not completely resolve the problem, the app crashed when I create an instance of Dog. The behavior is different on the device and simulator, I suspect that we can't distribute a framework for the device using a beta version of Xcode. Can anyone shed light on this?


App crashes on first time opening it, but only if downloaded from Google play store [closed]

$
0
0

What the title says. Already saw few topics and tried their fixes like adding

android:allowBackup="false" 
android:fullBackupContent="false" 
tools:replace="android:allowBackup"

to the AndroidManifest. Tried few unity versions aswell.

Any ideas what might be the problem?

Android October Security Patch 2019 broke my app

$
0
0

My team noticed that after upgrading our QA devices with the October 2019 Security Patch (primarily Samsung and Pixel phone devices), our app is no longer stable.

We are seeing crashes due to a signal 9 in adb logs:

11-01 09:23:51.067   832   832 I Zygote  : Process 24758 exited due to signal 9 (Killed)

These crashes are not showing up in our Crashlytics reporting, but we are seeing evidence of this crash via metrics (Session length) and reviews (up tick in 1 star reviews indicating instability).

We cannot find any one thing that triggers this crash. Sitting on our home screen for 5 or so minutes will result in a crash. Navigating around the app for 5 or so minutes will result in a crash.

I've seen some reports indicating signal 9 is tied to memory, but profiling our app shows a stable memory profile, and if anything, we've seen memory slightly decreasing leading to the crash.

Our app is a Cordova app with a sizeable native plugin foot print.

Cordova: 7.0.0 (also tried upgrading to 8.1.0 to no avail)
DJI SDK: 4.11
Google Maps: 16.0.0
RxJava: 2.2.3
Support Libs: AndroidX

Has anyone else experienced instability with this latest update? Tips on debugging this Signal 9 crash?

Thanks.

running python code with takes 3GBs of ram and crashes the pc

$
0
0

im doing deep learning stuff. I have tensorflow 2.0 (cpu version) and when i try to run this code(below) in pycharm (or jupyter notebook) it uses 3GBs of memory(RAM) however i have 6GBs of RAM

the dataset that i run has 50000+ training pic and 10k test pics (as i remember). the code is:

import tensorflow as tf
from tensorflow import keras
import matplotlib.pyplot as plt
import numpy as np

data_mnist = keras.datasets.cifar10
(x_train, y_train), (x_test, y_test) = data_mnist.load_data()

class_names = ['airplane', 'automobile', 'bird',
               'cat', 'deer', 'dog', 'frog',
               'horse', 'ship', 'truck'
               ]

x_train = x_train/255.0
x_test = x_test/255.0

model = keras.Sequential([
    keras.layers.Flatten(input_shape=(32, 32, 3)),
    keras.layers.Dense(128, activation='relu'),
    keras.layers.Dense(10, activation='softmax'),
])

model.compile(optimizer='Adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
model.fit(x_train, y_train, epochs=1)

image_label = 1

prediction = model.predict(x_test)
plt.grid(False)
plt.imshow(x_test[image_label])
plt.title('Actual Img: ' +  class_names[image_label])
plt.xlabel('Predicted: ' + class_names[np.argmax(prediction[image_label])])
plt.show

it happens whenever i try to train the model.

there is no problem about the code, but as i said the computer almost crashes when i try to run this code(look at the picture below): enter image description here

i hope anybody can help just drop what u think will be the answer. Thanks a lot<3

iOS crash report and the plus value meaning

$
0
0

facing a crash on my app, i'm using an external SDK to display some ads, i have a crash velocity and the report i get looks like:

-[ExternalProviderCAbstractShowableNetworkALongLongNameForAFunction:]

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000169646588


Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x1ae842240 objc_retain + 16
1  MyApp                       0x10526b29c -[ExternalProviderCAbstractShowableNetworkALongLongNameForAFunction:] + 4372116124
2  MyApp                       0x10521e724 -[ExternalProvider show:] + 4371801892
3  MyApp                       0x1052aef28 -[ExternalProvider show:] + 4372393768
4  MyApp                       0x10509812c closure #1 in static AdsManager.show(fromController:) + 66 (AdsManager.swift:66)
5  MyApp                       0x104eb7908 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
6  libdispatch.dylib              0x1ae7b3c2c <redacted> + 32
7  libdispatch.dylib              0x1ae7b5088 <redacted> + 20
8  libdispatch.dylib              0x1ae7c0d54 _dispatch_main_queue_callback_4CF + 968
9  CoreFoundation                 0x1aea88700 <redacted> + 16
10 CoreFoundation                 0x1aea8345c <redacted> + 1980
11 CoreFoundation                 0x1aea82978 CFRunLoopRunSpecific + 480
12 GraphicsServices               0x1b8bb2534 GSEventRunModal + 108
13 UIKitCore                      0x1b2b74f0c UIApplicationMain + 1940
14 MyApp                       0x104eb2b88 main + 16 (SettingsNotificationViewController.swift:16)
15 libdyld.dylib                  0x1ae902f04 <redacted> + 4

I sent the report to my external provider and technical support told me :

Can't be us because + 4372116124 is too much if it was our code it would less than 100

I understand +something is the number of bytes that the instructions crash after, which to tell you everything does not much to me, question is: is the number too much that it is from my code ? how can you know +100 is the max number of bytes ? If it is correct this means the crash came from line 5 ou 4 ? Thank you very much.

Stm32duino crashes in malloc

$
0
0

I find this trouble really hard to fix.

Some info before describing the problem : - I got a Nucleo L4r5zi and I'm using stm32duino to control it. - I'm using PlatformIO in visual studio code to debug the code. - This problem occur randomly, which means that I can run the same code twice and in the first run the code will crash and in the second one it won't.

The Problem :

I have a really big code that I'm working on and there fore can't send all the code. It seems that my Nucleo is crashing in the middle of malloc (sometimes free) function as can be seeing here :

Stack Trace

Assembly code where crashed

Jumps to here - Default handler

It is very randomly. If a will add a single line to the code - I will get the malloc crashing somewhere else ...

How can I fix that ? I want the Nucleo to stop crashing. What causing the crash and how can I stop it ?

Gauge - Implementing step crashing VS 17

$
0
0

I had created a spec several days ago and needed to create a new one. Instead of creating a new step implementation I used the same one as the previous spec. And since a couple of the steps were similar to the first spec I copy pasted the steps and changed what I needed. Then made the changes in the spec file to match the implementation. After a clean and build I noticed the steps were red (needing to be implemented, so I clicked implement step, and selected the file, which crashed VS17. It restarted by itself and gave me an error which you see below. Deleting the step implementations it still crashes. Deleting the step and implementation and rewriting them both still causes the crash, but the implementation is still generated.

Windows 10 Pro Visual Studio community 2017

System.ArgumentException: An item with the same key has already been added.at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)at Gauge.VisualStudio.Model.Project.GetGaugeImplementations(Project containingProject)at Gauge.VisualStudio.Model.Project.RefreshImplementations()at Gauge.VisualStudio.Model.Project.HasDuplicateImplementation(ITextSnapshotLine line)at Gauge.VisualStudio.Highlighting.UnimplementedStepTagger.<GetTags>d__4.MoveNext()at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator1.d__39.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Why is my Application going to a black screen when I click on a level?

$
0
0

I am creating a mathematical Quiz, that has 10 questions, all randomly generated, completely. For some reason, when I click on the level I wish to play, it crashes.

No errors are shown in logcat annoyingly.

This is the class that should be executed when a level is chosen:

package com.georgeashby11221.arithmeticquiz;

import android.app.Activity;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import java.util.HashMap;
import java.util.Random;

public class GameActivity extends Activity {
TextView txtTimer, txtQuestion;
EditText fldAnswer;
Button submitAnswer;

Boolean questionAnswered = false;
String currentQuestion;
Integer currentAnswer = -1;
Boolean timerActive = false;
HashMap<String, Integer> levelTimes = new HashMap<>();
CountDownTimer countDownTimer;
Integer timeLeftInMilliseconds;
String levelSelected;
Integer userAnswer;
Integer userScore;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_game);

    txtTimer = findViewById(R.id.txtTimer);
    txtQuestion = findViewById(R.id.txtQuestion);
    fldAnswer = findViewById(R.id.fldAnswer);
    submitAnswer = findViewById(R.id.btnSubmit);

    submitAnswer.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (!(fldAnswer.getText().toString().contains("."))) {
                userAnswer = Integer.parseInt(fldAnswer.getText().toString());
                questionAnswered = true;
            }
        }
    });

    levelTimes.put("1", 20);
    levelTimes.put("2", 10);

    Bundle extras = getIntent().getExtras();

    if (extras != null) {
        levelSelected = extras.getString("levelSelected");
    }

    updateQuestion();
}

public void startStop() {
    if (timerActive) {
        stopTimer();
    } else {
        startTimer();
    }
}

public void startTimer() {
    if(levelSelected != null && levelSelected != "0"&& levelTimes.get(levelSelected) != null) {
        timeLeftInMilliseconds = levelTimes.get(levelSelected) * 1000;
        timerActive = true;
        countDownTimer = new CountDownTimer(timeLeftInMilliseconds, 1000) {
            @Override
            public void onTick(long millisUntilFinished) {
                timeLeftInMilliseconds = Integer.parseInt(String.valueOf(millisUntilFinished));
                txtTimer.setText(String.valueOf(timeLeftInMilliseconds / 1000));
            }

            @Override
            public void onFinish() {
                timerActive = false;
            }
        }.start();
    }
}

public void stopTimer() {
    countDownTimer.cancel();
    timerActive = false;
}

public int getRandomIntegerBetweenRange(Integer min, Integer max){
    Integer random = new Random().nextInt((max - min) + 1) + min;
    return random;
}

public void randomQuestion() {
    Integer randomOperator = 1;
    Integer first = 0;
    Integer second = 0;
    switch (randomOperator) {
        case 1:
            first = getRandomIntegerBetweenRange(1, 12);
            second = getRandomIntegerBetweenRange(1, 12);

            currentQuestion = (first + " + " + second + " = ?");
            currentAnswer = (first + second);
            break;
        case 2:
            currentAnswer = -1;
            while (currentAnswer < 0) {
                first = getRandomIntegerBetweenRange(1, 12);
                second = getRandomIntegerBetweenRange(1, 12);

                if((first - second) > 0) {
                    currentQuestion = (first + " - " + second + " = ?");
                    currentAnswer = first + second;
                    break;
                }
            }
        case 3:
            first = getRandomIntegerBetweenRange(1, 12);
            second = getRandomIntegerBetweenRange(1, 12);

            currentQuestion = (first + " * " + second + " = ?");
            currentAnswer = first + second;
            break;
        case 4:
            Boolean isDivisible = false;
            while (isDivisible == false) {
                first = getRandomIntegerBetweenRange(1, 12);
                second = getRandomIntegerBetweenRange(1, 12);

                if((first % second) == 0) {
                    currentQuestion = (first + " / " + second + " = ?");
                    currentAnswer = first + second;
                    isDivisible = true;
                    break;
                }
            }
    }

}

public void updateQuestion() {
    for(int i = 1; i <=10; i++) {
        randomQuestion();
        txtQuestion.setText(currentQuestion);
        if (levelSelected != "0") {
            startStop();
        }
        while (checkAnswer() == "wait") {
            checkAnswer();
        }
    }
}

public String checkAnswer() {
    if(questionAnswered == true) {
        if(userAnswer == currentAnswer) {
            return "correct";
        } else {
            return "incorrect";
        }
    } else {
        return "wait";
    }
}
}

And this is my Level Selection java class:

package com.georgeashby11221.arithmeticquiz;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.Toast;

public class LevelSelectionActivity extends Activity implements View.OnClickListener {

Button levelZero, levelOne, levelTwo, mainMenu;
ImageButton levelZeroInfo, levelOneInfo, levelTwoInfo;
String levelSelected;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_levelselection);

    // Registering and Assigning Buttons

    levelZero = findViewById(R.id.btnLevelZero);
    levelOne = findViewById(R.id.btnLevelOne);
    levelTwo = findViewById(R.id.btnLevelTwo);
    mainMenu = findViewById(R.id.btnMainScreen);

    levelZeroInfo = findViewById(R.id.imgBtnLevelZeroInfo);
    levelOneInfo = findViewById(R.id.imgBtnLevelOneInfo);
    levelTwoInfo = findViewById(R.id.imgBtnLevelTwoInfo);

    levelZero.setOnClickListener(this);
    levelOne.setOnClickListener(this);
    levelTwo.setOnClickListener(this);
    mainMenu.setOnClickListener(this);
    levelZeroInfo.setOnClickListener(this);
    levelOneInfo.setOnClickListener(this);
    levelTwoInfo.setOnClickListener(this);
}

@Override
public void onClick(View v) {
    Intent screen = new Intent(LevelSelectionActivity.this, GameActivity.class);
    switch (v.getId()) {
        case R.id.btnLevelZero:
            levelSelected = "0";
            screen.putExtra("levelSelected", levelSelected);
            startActivity(screen);
            break;
        case R.id.btnLevelOne:
            levelSelected = "1";
            screen.putExtra("levelSelected", levelSelected);
            startActivity(screen);
            break;
        case R.id.btnLevelTwo:
            levelSelected = "2";
            screen.putExtra("levelSelected", levelSelected);
            startActivity(screen);
            break;
        case R.id.btnMainScreen:
            Intent mainMenu = new Intent(LevelSelectionActivity.this, MainActivity.class);
            startActivity(mainMenu);
            break;
        case R.id.imgBtnLevelZeroInfo:
            Toast.makeText(getApplicationContext(), "Level 0 has no time limit, reccomended for beginners!", Toast.LENGTH_SHORT).show();
            break;
        case R.id.imgBtnLevelOneInfo:
            Toast.makeText(getApplicationContext(), "Level 1 has a time limit of 20 seconds, reccomended for novices!", Toast.LENGTH_SHORT).show();
            break;
        case R.id.imgBtnLevelTwoInfo:
            Toast.makeText(getApplicationContext(), "Level 2 has a time limit of 10 seconds, reccomended for experts!", Toast.LENGTH_SHORT).show();
            break;
    }
}
}

LocalHost not reloading and crashing on save

$
0
0

So I am building a huge project in React.Js and VSCode, and I have had no problems up to this point.

Recently when dealing with this json object, my program (on localhost:3000) just won't save, and then when I refresh the page, it just crashes.

I can't even close the tab when this happens. It's just frozen in refreshing. I have to Ctl + ALt+ Del to shut it down. It seems like it is happening randomly.

I am using Google Chrome.

What is going wrong? What do I do? Thank you.

    for (var obj in json1) {
      const json = json1[obj];
      for (var i = 0; i < json.length; i++) {
        const apt = json[i];
        // Do some stuff with the big json object
      }
    }

App crashes while login on iPad running iOS 13.2

$
0
0

I have submitted an iOS app to app store review and they say that the application crashes in iPad (iPadOS 13.2) running on wifi.

I have tried to symbolicate crash logs but could not find understand the reason of the crash. The app runs perfectly on simulators and I do not have a physical device.

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001a9ef8efc 0x1a9ed3000 + 155388
1   libsystem_pthread.dylib         0x00000001a9e18d10 0x1a9e16000 + 11536
2   libsystem_c.dylib               0x00000001a9da8af4 0x1a9d32000 + 486132
3   libsystem_c.dylib               0x00000001a9da8a80 0x1a9d32000 + 486016
4   libc++abi.dylib                 0x00000001a9ec03c8 0x1a9ebf000 + 5064
5   libc++abi.dylib                 0x00000001a9ec05c0 0x1a9ebf000 + 5568
6   libobjc.A.dylib                 0x00000001a9e27308 0x1a9e21000 + 25352
7   MyApp_Name              0x00000001008a031c CLSTerminateHandler() + 3277596 (CLSException.mm:0)
8   libc++abi.dylib                 0x00000001a9ecd634 0x1a9ebf000 + 58932
9   libc++abi.dylib                 0x00000001a9ecd5c0 0x1a9ebf000 + 58816
10  libdispatch.dylib               0x00000001a9db3fec 0x1a9db1000 + 12268
11  libdispatch.dylib               0x00000001a9dbfcc8 0x1a9db1000 + 60616
12  CoreFoundation                  0x00000001aa088e0c 0x1a9fdb000 + 712204
13  CoreFoundation                  0x00000001aa083b68 0x1a9fdb000 + 691048
14  CoreFoundation                  0x00000001aa083084 0x1a9fdb000 + 688260
15  GraphicsServices                0x00000001b42d1534 0x1b42ce000 + 13620
16  UIKitCore                       0x00000001ae1f3698 0x1ad7b1000 + 10757784
17  MyApp_Name              0x00000001006c3828 main + 1325096 (main.m:15)
18  libdyld.dylib                   0x00000001a9f02e18 0x1a9f02000 + 3608

Unity Build (Win10) Crashes - Access Violation (0xc0000005)

$
0
0

My Unity App build for Windows10 is crashing randomly.

I'm using an external touchscreen monitor, not sure if this is important and the app is compiled on a Mac (don't have Unity on windows).

My system: Intel NUC8, Windows 10, Unity 2019.2.1f

What I have already tried:

  • run app as administrator
  • disabled wifi, firewall, anti virus
  • the windows 10 on the pc is pretty clean, nothing other installed

Not sure what else I can try... :(

See error log file below:

Error Log:

JLR Touchscreen App by ME [version: Unity 2019.2.1f1_ca4d5af0be6f]

d3d11.dll caused an Access Violation (0xc0000005)
  in module d3d11.dll at 0033:7c3df4f0.

Error occurred at 2019-11-12_011246.
C:\Users\this2\Documents\Touchscreen App.exe, run by this2.

29% physical memory in use.
8061 MB physical memory [5719 MB free].
387 MB process peak paging file [281 MB used].
367 MB process peak working set [264 MB used].
System Commit Total/Limit/Peak: 2280MB/9341MB/2562MB
System Physical Total/Available: 8061MB/5719MB
System Process Count: 145
System Thread Count: 1519
System Handle Count: 51188
Disk space data for 'C:\Users\this2\AppData\Local\Temp\ME\Touchscreen App\Crashes\Crash_2019-11-12_091243819\': 220660408320 bytes free of 255383826432 total.

Read from location 000000000000012C caused an access violation.

Context:
RDI:    0x0000000000000000  RSI: 0x0000015309b8e9c0  RAX:   0x0000000000000100
RBX:    0x0000000000000036  RCX: 0x0000015309b8e9c0  RDX:   0x0000000000000000
RIP:    0x00007ff87c3df4f0  RBP: 0x00000031f4bfe841  SegCs: 0x0000000000000033
EFlags: 0x0000000000010206  RSP: 0x00000031f4bfe780  SegSs: 0x000000000000002b
R8:     0x0000000000000000  R9:  0x00000031f4bfe8d8  R10:   0x00000153083b8d40
R11:    0x00007ff83fbe1ff8  R12: 0x0000000000000000  R13:   0x0000015309b8e8e0
R14:    0x0000000000000100  R15: 0x0000000000000100


Bytes at CS:EIP:
44 0f b6 9a 2c 01 00 00 4c 8b f1 8b 8a d8 00 00 

Mono DLL loaded successfully at 'C:\Users\this2\Documents\JLR\MonoBleedingEdge\EmbedRuntime\mono-2.0-bdwgc.dll'.

Stack Trace of Crashed Thread 5820:
0x00007FF87C3DF4F0 (d3d11) CreateDirect3D11SurfaceFromDXGISurface
0x00007FF83ED30B8B (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83ED2907F (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83EDB29A3 (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83EDB864B (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83EDB8728 (UnityPlayer) PAL_Thread_SupportsThreads
0x00007FF83F0B9D08 (UnityPlayer) UnityMain
0x00007FF884F07BD4 (KERNEL32) BaseThreadInitThunk
0x00007FF88560CED1 (ntdll) RtlUserThreadStart

Program crashes and I can't figure out why

$
0
0

Program crashes and I can't figure out why. ptr and ptr1 are char** and each element of ptr and ptr1 is a char*, not all of the malloc'd space if full, however, leaving some null pointers in each. I think the problem is in this segment as the last thing printed is in this segment before crashing.

 while (strlen(ptr[k]) > 1 && strlen(ptr1[i]) > 1)
    {
        while ((strlen(ptr[k]) > 1 && strlen(ptr1[i]) > 1) && isFound == 0)
        {
            totalCounter++;
            lineCounter++;
            if(strcmp(ptr[k], ptr1[i]) == 0)
            {
                printf("'%s' is word %d in the list\n", ptr[k], lineCounter);
                isFound = 1;
            }
            k++;
        }
        if (isFound == 0)
            {
                printf("'%s' is not in the word list\n", ptr1[i]);
            }
        isFound = 0;
        lineCounter = 0;
        k = 0;
        i++;
        wordCounter++;
    }

CoreData crashes with a small number of users

$
0
0

I developed an app focused on health and fitness and to save workout data I use Core Data. In a small number of users (<0.1%), I get the following error:

Fatal Exception: NSInvalidArgumentException, Illegal attempt to establish an 'X' relationship between objects in different contexts.

This error occurs when I try to save the training program. If I log-on with the same user account on my device, this error does not happen.

This is my save function:

func saveTraningProgramDB(trainingPro:RetornoTreino) {
        let db = getContext()
        for ficha in (trainingProgram.programa?.fichas)! {
            let fichasDB = FichasNovoDB(context: db)
            fichasDB.nome = ficha.nome
            ....
            for atividade in ficha.atividades! {
                for atividadePrograma in (programaTreino.programa?.atividades)! {
                    if atividade.codigoAtividade == String(atividadePrograma.codigoAtividade ?? 0) {
                        let atividadesDB = AtividadesNovoDB(context: bancoDeDados)
                        ...
                        for serie in atividade.series! {
                            let seriesDB = SeriesNovoDB(context: bancoDeDados)
                            ...
                            atividadesDB.addToSeries(seriesDB)
                        }
                        for ajuste in atividade.ajustes! {
                            ...
                            atividadesDB.addToAjustes(ajustesDB)
                        }
                        fichasDB.addToAtividades(atividadesDB)
                    }
                }
            }
            db(fichasDB)
        }
        do {
            try db.save()
        } catch {
            db(error)
        }
    }

Does anyone have any idea what might be going on, or how can I do to simulate the problem as it only happens on the client device ?

Thanks for all replies!

NOTE: Sorry for my English, it is not my native language.

Viewing all 7143 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>