Giter Club home page Giter Club logo

Comments (7)

ruidscampos avatar ruidscampos commented on May 23, 2024 4

Confirm this still happens, raised an issue on the main Nativescript project, but looks like a direct match to this one.

Added a bit more information in my original issue report here:
NativeScript/NativeScript#8995

@EddyVerbruggen has tested this with a few versions and added some worthy insights in my original issue.

Here's the trace:

Incident Identifier: EE6F69AF-9928-4F1A-8A1F-478C802875AC
Hardware Model:      iPad8,1
Process:             mobile [631]
Path:                /private/var/containers/Bundle/Application/97611BA7-D13D-486D-BE3C-B60FD53C19AF/mobile.app/mobile
Identifier:          a.a.a
Version:             1.0.6 (1.0.6)
AppStoreTools:       12A7604b
AppVariant:          1:iPad8,1:14
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           a.a.a [540]


Date/Time:           2020-10-30 13:12:24.9266 +0000
Launch Time:         2020-10-30 13:12:18.7557 +0000
OS Version:          iPhone OS 14.1 (18A8395)
Release Type:        User
Baseband Version:    n/a
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000101c28128
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [631]
Triggered by Thread:  0

0   NativeScript                  	0x0000000101c28128 v8::base::OS::Abort() + 24
1   NativeScript                  	0x0000000101375d14 v8::Isolate::Dispose() + 160
2   NativeScript                  	0x00000001012b0f38 tns::Runtime::~Runtime() + 164
3   NativeScript                  	0x00000001011fb73c std::__1::shared_ptr<v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value> > >::~shared_ptr() + 64
4   libsystem_c.dylib             	0x0000000198c55328 __cxa_finalize_ranges + 408 (atexit.c:284)
5   libsystem_c.dylib             	0x0000000198c55668 exit + 28 (exit.c:81)
6   UIKitCore                     	0x000000019246aa8c -[UIApplication _terminateWithStatus:] + 504 (UIApplication.m:6534)
7   UIKitCore                     	0x0000000191af3db0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:819)
8   UIKitCore                     	0x0000000191af3a10 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 220 (_UISceneLifecycleMultiplexer.m:457)
9   UIKitCore                     	0x0000000192460770 -[UIApplication workspaceShouldExit:withTransitionContext:] + 212 (UIApplication.m:3600)
10  FrontBoardServices            	0x000000019eb22988 -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 88 (FBSUIApplicationWorkspace.m:144)
11  FrontBoardServices            	0x000000019eb500a4 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:312)
12  FrontBoardServices            	0x000000019eb34d24 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:355)
13  FrontBoardServices            	0x000000019eb5003c __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 132 (FBSWorkspaceScenesClient.m:309)
14  libdispatch.dylib             	0x000000018f73aac8 _dispatch_client_callout + 20 (object.m:559)
15  libdispatch.dylib             	0x000000018f73e348 _dispatch_block_invoke_direct + 268 (queue.c:468)
16  FrontBoardServices            	0x000000019eb780e0 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:184)
17  FrontBoardServices            	0x000000019eb77d88 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448 (FBSSerialQueue.m:227)
18  FrontBoardServices            	0x000000019eb782ac -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:258)
19  CoreFoundation                	0x000000018fab981c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1967)
20  CoreFoundation                	0x000000018fab9718 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2011)
21  CoreFoundation                	0x000000018fab8a28 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2048)
22  CoreFoundation                	0x000000018fab2d20 __CFRunLoopRun + 824 (CFRunLoop.c:2925)
23  CoreFoundation                	0x000000018fab24bc CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
24  GraphicsServices              	0x00000001a65c4820 GSEventRunModal + 164 (GSEvent.c:2259)
25  UIKitCore                     	0x000000019245f164 -[UIApplication _run] + 1072 (UIApplication.m:3270)
26  UIKitCore                     	0x0000000192464840 UIApplicationMain + 168 (UIApplication.m:4739)
27  NativeScript                  	0x0000000101358044 ffi_call_SYSV + 68
28  NativeScript                  	0x00000001013564f0 ffi_call_int + 968
29  NativeScript                  	0x00000001012ca5d0 tns::Interop::CallFunctionInternal(tns::MethodCall&) + 428
30  NativeScript                  	0x000000010126d160 std::__1::__function::__func<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfo<v8::Value> const&)::$_2, std::__1::allocator<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallba... + 564
31  NativeScript                  	0x0000000101306e9c tns::Tasks::Drain() + 108
32  NativeScript                  	0x0000000101300f60 +[NativeScript start:] + 572
33  mobile                        	0x00000001008c3c4c main + 260 (main.m:58)
34  libdyld.dylib                 	0x000000018f779e40 start + 4

from ios.

romandrahan avatar romandrahan commented on May 23, 2024 3

@NathanaelA, sad to report, but 7.0.4 runtime brings another related issue: the app crashes right after "swipe to close" action on iOS. It work just fine on 7.0.3 runtime though.

Reproducible only on real device, fine on simulator.

Demo: https://drive.google.com/file/d/1T8eU3LQb4q9_ZDkw0ZWB4jHccEACRZov/view?usp=sharing

from ios.

adrian-branescu avatar adrian-branescu commented on May 23, 2024 2

I think the problem is inside Runtime destructor at this line.

As long as I understand ->Enter() and ->Exit() V8 API calls must be paired. That's what stack allocated instances of Isolate::Scope, Context::Scope etc actually do: they perform an ->Enter() call in their constructor and an ->Exit() call in their destructor.

I don't understand why an Isolate->Exit() is manually performed in the Runtime destructor. It's not paired with an Isolate->Enter() call and leads to crashes.

You should take inspiration from { N } Android Runtime. Here is an example of a proper usage of the V8 API.

from ios.

adrian-niculescu avatar adrian-niculescu commented on May 23, 2024

We are experiencing this issue as well.

from ios.

darind avatar darind commented on May 23, 2024

Yes, I believe this is a leftover from previous refactorings and can be removed. @adrian-branescu, would you mind submitting a PR for this?

from ios.

NathanaelA avatar NathanaelA commented on May 23, 2024

@adrian-branescu - Sharp eye, thank you very much for spotting the issue, saved us some debug time. 7.0.4 will have this fix in it.

Just a FYI: The only reason Darin suggested you do a PR was because then you get credit for the fix in your github history (and this git repo). You did the hard work, we love to let you have the credit too. 😀

I created a simple PR #74 which is what your discovery found. If you haven't checked out the source code (and don't want to use a lot of disk space), you can use github to edit the file online and create the PR all from the browser without download anything. I'm going to leave my #74 unmerged for a couple more days to give you a chance to drop a PR on and then we'll merge yours instead of mine.

from ios.

NathanaelA avatar NathanaelA commented on May 23, 2024

Fixed in 7.0.4

from ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.