How to fix PAGE_FAULT_IN_NONPAGED_AREA in wdf driver - driver

I meet a BSOD issue in a WDF filter driver when call WdfObjectDelete in Wdf01000!FxObject::CallCleanupCallbacks? Mosttime it works well but the issue happens sometime when reboot. Does anyone can give me some suggestions? Thanks.
the stack as follow
ffffaa8e`34afabf8 fffff801`6e8ff731 : 00000000`00000050 ffffaf01`48c9cff0 00000000`00000002 ffffaa8e`34afaee0 : nt!KeBugCheckEx
ffffaa8e`34afac00 fffff801`6e7702e7 : ffffaf01`48c9cc80 00000000`00000002 00000000`00000000 ffffaf01`48c9cff0 : nt!MiSystemFault+0x12ffa1
ffffaa8e`34afad40 fffff801`6e869ac9 : ffffaf01`48cb0e70 00000000`00000001 00000000`00000000 ffffaf01`48c9cd20 : nt!MmAccessFault+0x327
ffffaa8e`34afaee0 fffff801`7a061707 : 000050fe`b73632f8 fffff801`7a064526 ffffaf01`4567ef98 00000000`00000000 : nt!KiPageFault+0x349
ffffaa8e`34afb070 fffff801`7a0645b0 : ffffaf01`48c9cff0 000050fe`bc2df0b8 00000000`00000001 fffff801`7a062f3a : drvxxxx!ControlDevice::deleteDevice+0x47 [c:\works\src\drvxxxx\controldevice.cpp # 68]
ffffaa8e`34afb0b0 fffff801`7a06297a : ffffaf01`4567ef10 ffffaf01`3dff0fd0 ffffaf01`439ece70 ffffaf01`439ece00 : drvxxxx!Driver::unregisterFilterDevice+0x80 [c:\works\src\drvxxxx\driver.cpp # 117]
ffffaa8e`34afb100 fffff802`379cc026 : 000050fe`c200f318 ffffaf01`439ece00 00000000`00000000 ffffaa8e`34afb1a8 : drvxxxx!FilterDevice::onCleanup+0x2a [c:\works\src\drvxxxx\filterdevice.cpp # 263]
ffffaa8e`34afb140 fffff802`379978aa : ffffaf01`3dff0ce0 ffffaa8e`34afb300 ffffaf01`3dff0d00 ffffaf01`3dff0ce0 : Wdf01000!FxObject::CallCleanupCallbacks+0x4e [minkernel\wdf\framework\shared\object\fxobject.cpp # 353]
ffffaa8e`34afb170 fffff802`379cd7b1 : ffffaa8e`34afb300 ffffaf01`3dff0c01 ffffaf01`3dff0d00 ffff83fb`afa00000 : Wdf01000!FxObject::DisposeChildrenWorker+0x1edea
what I do in the function is:
void ControlDevice::deleteDevice()
{
PAGED_CODE();
if (m_device)
{
WdfObjectDelete(m_device);
m_device = nullptr;
}
}
Does anyone know why it happens?

the issue can be fixed just by remove the code m_device = nullptr; not sure why but it works. Is anyone knows why?

Related

Buildable libraries cannot import or export from non-buildable libraries (eslint)

I am getting above error when i import the interface from one of the library:
import { DetailsProps } from '#vite/prop-types'; //error
import styles from './header.module.less';
const initailDetails: DetailsProps = {
name: 'Arif',
city: 'Chennai',
pin: 600019,
};
export function Header() {
return (
<div className={styles['container']}>
<h1>Welcome to Header!</h1>
<ul>
{Object.values(initailDetails).map((v) => (
<li key={v}>{v}</li>
))}
</ul>
</div>
);
}
Nx report:
Node : 16.13.2
OS : darwin arm64
npm : 8.1.2
nx : 15.3.3
#nrwl/angular : Not Found
#nrwl/cypress : 15.3.3
#nrwl/detox : Not Found
#nrwl/devkit : 15.3.3
#nrwl/esbuild : Not Found
#nrwl/eslint-plugin-nx : 15.3.3
#nrwl/expo : Not Found
#nrwl/express : Not Found
#nrwl/jest : Not Found
#nrwl/js : 15.3.3
#nrwl/linter : 15.3.3
#nrwl/nest : Not Found
#nrwl/next : Not Found
#nrwl/node : Not Found
#nrwl/nx-cloud : Not Found
#nrwl/nx-plugin : Not Found
#nrwl/react : 15.3.3
#nrwl/react-native : Not Found
#nrwl/rollup : Not Found
#nrwl/schematics : Not Found
#nrwl/storybook : Not Found
#nrwl/web : Not Found
#nrwl/webpack : Not Found
#nrwl/workspace : 15.3.3
typescript : 4.8.4
---------------------------------------
Local workspace plugins:
---------------------------------------
Community plugins:
#nrwl/vite: 15.3.3
This is because of the linter, you can disable it by setting false for enforceBuildableLibDependency in .eslintrc.json file.
or you can disable it by adding this comment before importing it:
// eslint-disable-next-line #nrwl/nx/enforce-module-boundaries
import { DetailsProps } from '#vite/prop-types';

Apple Store We were unable to review your app as it crashed on launch

My Xamarin iOS App, Works great in the simulator, but when i publish to the apple store i get this error:
Guideline 2.1 - Performance - App Completeness
We were unable to review your app as it crashed on launch. We have attached detailed crash logs to help troubleshoot this issue.
Heres the error log:
{"app_name":"ProyectoAngela.Prism.iOS","timestamp":"2022-01-14 10:33:37.00 -0800","app_version":"1.3","slice_uuid":"0725ebef-24d0-3dd4-aba2-bd0283b254a8","adam_id":"1604093951","build_version":"1.3","platform":2,"bundleID":"com.mxxx.xxxx","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"iPhone OS 15.2 (19C56)","incident_id":"C23408FA-A088-4955-9454-2BD6CA8A371E","name":"ProyectoAngela.Prism.iOS"}
{
"uptime" : 2400000,
"procLaunch" : "2022-01-14 10:33:34.8287 -0800",
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "iPad7,5",
"procStartAbsTime" : 59878077029641,
"coalitionID" : 5657,
"osVersion" : {
"isEmbedded" : true,
"train" : "iPhone OS 15.2",
"releaseType" : "User",
"build" : "19C56"
},
"captureTime" : "2022-01-14 10:33:36.5764 -0800",
"incident" : "C23408FA-A088-4955-9454-2BD6CA8A371E",
"bug_type" : "309",
"pid" : 24812,
"procExitAbsTime" : 59878118842372,
"cpuType" : "ARM-64",
"procName" : "ProyectoAngela.Prism.iOS",
"procPath" : "\/private\/var\/containers\/Bundle\/Application\/3F629218-B618-43E2-A456-6AF0F4B6132B\/ProyectoAngela.Prism.iOS.app\/ProyectoAngela.Prism.iOS",
"bundleInfo" : {"CFBundleShortVersionString":"1.3","CFBundleVersion":"1.3","CFBundleIdentifier":"com.mxxx.xxxx","DTAppStoreToolsBuild":"13C90b"},
"storeInfo" : {"itemID":"1604093951","deviceIdentifierForVendor":"F13E8B85-5D9C-4C8E-885D-4550BE2D0EB1","thirdParty":true,"softwareVersionExternalIdentifier":"43806246"},
"parentProc" : "launchd",
"parentPid" : 1,
"coalitionName" : "com.mxxx.xxxx",
"crashReporterKey" : "36c14055bb17c6d0db3f456869338332b769d45e",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"ktriageinfo" : "VM - Fault hit memory shortage\nVM - Fault hit memory shortage\nVM - Fault hit memory shortage\nVM - Fault hit memory shortage\n",
"asi" : {"libsystem_c.dylib":["abort() called"]},
"lastExceptionBacktrace" : [{"imageOffset":597308,"symbol":"__exceptionPreprocess","symbolLocation":216,"imageIndex":4},{"imageOffset":83624,"symbol":"objc_exception_throw","symbolLocation":56,"imageIndex":5},{"imageOffset":1190300,"symbol":"_userInfoForFileAndLine","symbolLocation":0,"imageIndex":12},{"imageOffset":5034496,"symbol":"-[UIApplication _runWithMainScene:transitionContext:completion:]","symbolLocation":2028,"imageIndex":10},{"imageOffset":3381572,"symbol":"-[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:]","symbolLocation":148,"imageIndex":10},{"imageOffset":1694148,"symbol":"_UIScenePerformActionsWithLifecycleActionMask","symbolLocation":96,"imageIndex":10},{"imageOffset":2890720,"symbol":"__101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke","symbolLocation":196,"imageIndex":10},{"imageOffset":4031172,"symbol":"-[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:]","symbolLocation":240,"imageIndex":10},{"imageOffset":6307680,"symbol":"-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]","symbolLocation":732,"imageIndex":10},{"imageOffset":5847968,"symbol":"-[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:]","symbolLocation":336,"imageIndex":10},{"imageOffset":1697964,"symbol":"__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke","symbolLocation":188,"imageIndex":10},{"imageOffset":2468940,"symbol":"+[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:]","symbolLocation":812,"imageIndex":10},{"imageOffset":1705532,"symbol":"_UISceneSettingsDiffActionPerformChangesWithTransitionContext","symbolLocation":248,"imageIndex":10},{"imageOffset":2645692,"symbol":"-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]","symbolLocation":356,"imageIndex":10},{"imageOffset":7212472,"symbol":"__64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.576","symbolLocation":772,"imageIndex":10},{"imageOffset":1894672,"symbol":"-[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:]","symbolLocation":248,"imageIndex":10},{"imageOffset":2164592,"symbol":"-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]","symbolLocation":264,"imageIndex":10},{"imageOffset":3400924,"symbol":"-[UIApplication workspace:didCreateScene:withTransitionContext:completion:]","symbolLocation":548,"imageIndex":10},{"imageOffset":2638552,"symbol":"-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:]","symbolLocation":360,"imageIndex":10},{"imageOffset":158380,"symbol":"-[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:]","symbolLocation":412,"imageIndex":8},{"imageOffset":299212,"symbol":"__94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.180","symbolLocation":100,"imageIndex":8},{"imageOffset":37104,"symbol":"-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]","symbolLocation":232,"imageIndex":8},{"imageOffset":42232,"symbol":"__94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke","symbolLocation":312,"imageIndex":8},{"imageOffset":410024,"symbol":"_dispatch_client_callout","symbolLocation":16,"imageIndex":7},{"imageOffset":27344,"symbol":"_dispatch_block_invoke_direct$VARIANT$mp","symbolLocation":220,"imageIndex":7},{"imageOffset":42960,"symbol":"__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__","symbolLocation":40,"imageIndex":8},{"imageOffset":40156,"symbol":"-[FBSSerialQueue _targetQueue_performNextIfPossible]","symbolLocation":176,"imageIndex":8},{"imageOffset":56900,"symbol":"-[FBSSerialQueue _performNextFromRunLoopSource]","symbolLocation":24,"imageIndex":8},{"imageOffset":729776,"symbol":"__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__","symbolLocation":24,"imageIndex":4},{"imageOffset":795352,"symbol":"__CFRunLoopDoSource0","symbolLocation":204,"imageIndex":4},{"imageOffset":22136,"symbol":"__CFRunLoopDoSources0","symbolLocation":256,"imageIndex":4},{"imageOffset":43688,"symbol":"__CFRunLoopRun","symbolLocation":768,"imageIndex":4},{"imageOffset":122396,"symbol":"CFRunLoopRunSpecific","symbolLocation":572,"imageIndex":4},{"imageOffset":6560,"symbol":"GSEventRunModal","symbolLocation":160,"imageIndex":9},{"imageOffset":5162496,"symbol":"-[UIApplication _run]","symbolLocation":1080,"imageIndex":10},{"imageOffset":2628360,"symbol":"UIApplicationMain","symbolLocation":2028,"imageIndex":10},{"imageOffset":6357064,"imageIndex":3},{"imageOffset":5659504,"imageIndex":3},{"imageOffset":735588,"imageIndex":3},{"imageOffset":4497056,"imageIndex":3},{"imageOffset":27583448,"imageIndex":3},{"imageOffset":28347188,"imageIndex":3},{"imageOffset":28372456,"imageIndex":3},{"imageOffset":27445224,"imageIndex":3},{"imageOffset":29268332,"imageIndex":3},{"imageOffset":735424,"imageIndex":3},{"imageOffset":98896,"symbol":"start","symbolLocation":444,"imageIndex":11}],
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":7001002,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":10000000},{"value":6656},{"value":0},{"value":4377052544,"symbolLocation":0,"symbol":"_main_thread"},{"value":9444832902787961409},{"value":1000},{"value":0},{"value":4374720048},{"value":4396135443},{"value":96},{"value":2147483648},{"value":328},{"value":35220},{"value":0},{"value":6},{"value":259},{"value":4377052768,"symbolLocation":224,"symbol":"_main_thread"},{"value":0},{"value":4387366400},{"value":4396135440},{"value":6127452192},{"value":1},{"value":4371711952},{"value":16777215}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8063379492},"cpsr":{"value":1073741824},"fp":{"value":6127448544},"sp":{"value":6127448512},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":7524698600,"matchesCrashFrame":1},"far":{"value":0}},"name":"tid_103","queue":"com.apple.main-thread","frames":[{"imageOffset":27112,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":0},{"imageOffset":67620,"symbol":"pthread_kill","symbolLocation":208,"imageIndex":1},{"imageOffset":471172,"symbol":"__abort","symbolLocation":124,"imageIndex":2},{"imageOffset":127168,"symbol":"abort","symbolLocation":132,"imageIndex":2},{"imageOffset":29233400,"imageIndex":3},{"imageOffset":27948312,"imageIndex":3},{"imageOffset":27510416,"imageIndex":3},{"imageOffset":27504740,"imageIndex":3},{"imageOffset":27463136,"imageIndex":3},{"imageOffset":4929516,"imageIndex":3},{"imageOffset":28395608,"imageIndex":3},{"imageOffset":29232364,"imageIndex":3},{"imageOffset":27507688,"imageIndex":3},{"imageOffset":27504740,"imageIndex":3},{"imageOffset":27463136,"imageIndex":3},{"imageOffset":4929516,"imageIndex":3},{"imageOffset":5997920,"imageIndex":3},{"imageOffset":5980964,"imageIndex":3},{"imageOffset":6449104,"imageIndex":3},{"imageOffset":1096596,"symbol":"__handleUncaughtException","symbolLocation":628,"imageIndex":4},{"imageOffset":106508,"symbol":"_objc_terminate()","symbolLocation":112,"imageIndex":5},{"imageOffset":74444,"symbol":"std::__terminate(void (*)())","symbolLocation":16,"imageIndex":6},{"imageOffset":74356,"symbol":"std::terminate()","symbolLocation":60,"imageIndex":6},{"imageOffset":410044,"symbol":"_dispatch_client_callout","symbolLocation":36,"imageIndex":7},{"imageOffset":27344,"symbol":"_dispatch_block_invoke_direct$VARIANT$mp","symbolLocation":220,"imageIndex":7},{"imageOffset":42960,"symbol":"__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__","symbolLocation":40,"imageIndex":8},{"imageOffset":40156,"symbol":"-[FBSSerialQueue _targetQueue_performNextIfPossible]","symbolLocation":176,"imageIndex":8},{"imageOffset":56900,"symbol":"-[FBSSerialQueue _performNextFromRunLoopSource]","symbolLocation":24,"imageIndex":8},{"imageOffset":729776,"symbol":"__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__","symbolLocation":24,"imageIndex":4},{"imageOffset":795352,"symbol":"__CFRunLoopDoSource0","symbolLocation":204,"imageIndex":4},{"imageOffset":22136,"symbol":"__CFRunLoopDoSources0","symbolLocation":256,"imageIndex":4},{"imageOffset":43688,"symbol":"__CFRunLoopRun","symbolLocation":768,"imageIndex":4},{"imageOffset":122396,"symbol":"CFRunLoopRunSpecific","symbolLocation":572,"imageIndex":4},{"imageOffset":6560,"symbol":"GSEventRunModal","symbolLocation":160,"imageIndex":9},{"imageOffset":5162496,"symbol":"-[UIApplication _run]","symbolLocation":1080,"imageIndex":10},{"imageOffset":2628360,"symbol":"UIApplicationMain","symbolLocation":2028,"imageIndex":10},{"imageOffset":6357064,"imageIndex":3},{"imageOffset":5659504,"imageIndex":3},{"imageOffset":735588,"imageIndex":3},{"imageOffset":4497056,"imageIndex":3},{"imageOffset":27583448,"imageIndex":3},{"imageOffset":28347188,"imageIndex":3},{"imageOffset":28372456,"imageIndex":3},{"imageOffset":27445224,"imageIndex":3},{"imageOffset":29268332,"imageIndex":3},{"imageOffset":735424,"imageIndex":3},{"imageOffset":98896,"symbol":"start","symbolLocation":444,"imageIndex":11}]},{"id":7001006,"frames":[{"imageOffset":18920,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":7001037,"name":"SGen worker","frames":[{"imageOffset":5360,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":0},{"imageOffset":52220,"symbol":"_pthread_cond_wait$VARIANT$mp","symbolLocation":1216,"imageIndex":1},{"imageOffset":29015296,"imageIndex":3},{"imageOffset":25508,"symbol":"_pthread_start","symbolLocation":116,"imageIndex":1},{"imageOffset":18940,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":7001043,"name":"Finalizer","frames":[{"imageOffset":2892,"symbol":"semaphore_wait_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":27961632,"imageIndex":3},{"imageOffset":28665400,"imageIndex":3},{"imageOffset":28665020,"imageIndex":3},{"imageOffset":25508,"symbol":"_pthread_start","symbolLocation":116,"imageIndex":1},{"imageOffset":18940,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":7001044,"frames":[{"imageOffset":18920,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":7001045,"frames":[{"imageOffset":18920,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":7001046,"name":"com.apple.uikit.eventfetch-thread","frames":[{"imageOffset":2832,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":4404,"symbol":"mach_msg","symbolLocation":72,"imageIndex":0},{"imageOffset":27488,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":368,"imageIndex":4},{"imageOffset":44104,"symbol":"__CFRunLoopRun","symbolLocation":1184,"imageIndex":4},{"imageOffset":122396,"symbol":"CFRunLoopRunSpecific","symbolLocation":572,"imageIndex":4},{"imageOffset":95180,"symbol":"-[NSRunLoop(NSRunLoop) runMode:beforeDate:]","symbolLocation":232,"imageIndex":12},{"imageOffset":351292,"symbol":"-[NSRunLoop(NSRunLoop) runUntilDate:]","symbolLocation":88,"imageIndex":12},{"imageOffset":4629320,"symbol":"-[UIEventFetcher threadMain]","symbolLocation":512,"imageIndex":10},{"imageOffset":407724,"symbol":"__NSThread__start__","symbolLocation":792,"imageIndex":12},{"imageOffset":25508,"symbol":"_pthread_start","symbolLocation":116,"imageIndex":1},{"imageOffset":18940,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":7001047,"queue":"com.apple.UIKit.KeyboardManagement","frames":[{"imageOffset":5876,"symbol":"__ulock_wait","symbolLocation":8,"imageIndex":0},{"imageOffset":18172,"symbol":"_dlock_wait","symbolLocation":52,"imageIndex":7},{"imageOffset":17640,"symbol":"_dispatch_thread_event_wait_slow$VARIANT$mp","symbolLocation":52,"imageIndex":7},{"imageOffset":70800,"symbol":"__DISPATCH_WAIT_FOR_QUEUE__","symbolLocation":320,"imageIndex":7},{"imageOffset":69812,"symbol":"_dispatch_sync_f_slow","symbolLocation":136,"imageIndex":7},{"imageOffset":3490008,"symbol":"__37-[_UIRemoteKeyboards startConnection]_block_invoke_3","symbolLocation":112,"imageIndex":10},{"imageOffset":133488,"symbol":"__invoking___","symbolLocation":144,"imageIndex":4},{"imageOffset":247368,"symbol":"-[NSInvocation invoke]","symbolLocation":300,"imageIndex":4},{"imageOffset":206832,"symbol":"__NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__","symbolLocation":20,"imageIndex":12},{"imageOffset":335816,"symbol":"-[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:]","symbolLocation":568,"imageIndex":12},{"imageOffset":190012,"symbol":"__88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3","symbolLocation":208,"imageIndex":12},{"imageOffset":101576,"symbol":"_xpc_connection_reply_callout","symbolLocation":60,"imageIndex":13},{"imageOffset":53252,"symbol":"_xpc_connection_call_reply_async","symbolLocation":76,"imageIndex":13},{"imageOffset":410144,"symbol":"_dispatch_client_callout3","symbolLocation":16,"imageIndex":7},{"imageOffset":118880,"symbol":"_dispatch_mach_msg_async_reply_invoke$VARIANT$mp","symbolLocation":352,"imageIndex":7},{"imageOffset":40884,"symbol":"_dispatch_lane_serial_drain$VARIANT$mp","symbolLocation":340,"imageIndex":7},{"imageOffset":43972,"symbol":"_dispatch_lane_invoke$VARIANT$mp","symbolLocation":456,"imageIndex":7},{"imageOffset":83808,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":632,"imageIndex":7},{"imageOffset":20100,"symbol":"_pthread_wqthread","symbolLocation":284,"imageIndex":1},{"imageOffset":18928,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":1}]},{"id":7001049,"name":"tid_5703","frames":[{"imageOffset":5360,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":0},{"imageOffset":52220,"symbol":"_pthread_cond_wait$VARIANT$mp","symbolLocation":1216,"imageIndex":1},{"imageOffset":29078140,"imageIndex":3},{"imageOffset":29114340,"imageIndex":3},{"imageOffset":28616676,"imageIndex":3},{"imageOffset":28665400,"imageIndex":3},{"imageOffset":28665020,"imageIndex":3},{"imageOffset":25508,"symbol":"_pthread_start","symbolLocation":116,"imageIndex":1},{"imageOffset":18940,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":7001050,"name":"Thread Pool Worker","frames":[{"imageOffset":2916,"symbol":"semaphore_timedwait_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":28618908,"imageIndex":3},{"imageOffset":28665400,"imageIndex":3},{"imageOffset":28665020,"imageIndex":3},{"imageOffset":25508,"symbol":"_pthread_start","symbolLocation":116,"imageIndex":1},{"imageOffset":18940,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":7001051,"name":"Thread Pool Worker","frames":[{"imageOffset":2916,"symbol":"semaphore_timedwait_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":28618908,"imageIndex":3},{"imageOffset":28665400,"imageIndex":3},{"imageOffset":28665020,"imageIndex":3},{"imageOffset":25508,"symbol":"_pthread_start","symbolLocation":116,"imageIndex":1},
I think you should always test your app on a physical device before submitting your app to the App store.
By doing so you can correct bugs or missing permissions early.

Delete all Data belonging to user

I am rebuilding a social media app like Instagram.
My user can decide to delete their account and then I would like to automatically delete all things belonging to the user.
Most of the stuff I can delete easily, but things like posts is where I struggle because the uid is just a sub child of the key where the post is saved into.
My Database tree:
"Feed" : {
"es5fIbnKFpX4szcCbroUqHjJg6E3" : {
"-KjTBFFE5QzktG1IT5u0" : true,
"-KjTHFNe1RRS8Ly6bKsA" : true,
"-KjY30xwWA2IJBwlvyzf" : true
}
"myPosts" : {
"jlkRoaucY6Q4GBkzhor5yAAl97I2" : {
"-KjTBFFE5QzktG1IT5u0" : true,
"-KjTHFNe1RRS8Ly6bKsA" : true,
"-KjY30xwWA2IJBwlvyzf" : true
}
"posts" : {
"-KjTBFFE5QzktG1IT5u0" : {
"bookmarkCount" : 0,
"caption" : "Toll",
"commentCount" : 1,
"creationDate" : 1.494081403379004E9,
"hoursSinceUpload" : 0,
"likeCount" : 0,
"photoUrl" : "https://firebasestorage.googleapis.com/v0/b/funcloud-8e84e.appspot.com/o/Posts%2F76192CBE-55F0-4907-889A-849E196D5796?alt=media&token=de675609-4b73-411d-b402-f1ff3db64f79",
"ratio" : 1.502732240437158,
"score" : 16.38698994684219,
"uid" : "jlkRoaucY6Q4GBkzhor5yAAl97I2"
},
"-KjTHFNe1RRS8Ly6bKsA" : {
"bookmarkCount" : 1,
"bookmarks" : {
"jlkRoaucY6Q4GBkzhor5yAAl97I2" : true
},
"caption" : "Traumhaft",
"commentCount" : 0,
"creationDate" : 1.494082976550228E9,
"hoursSinceUpload" : 0,
"likeCount" : 2,
"likes" : {
"es5fIbnKFpX4szcCbroUqHjJg6E3" : true,
"jlkRoaucY6Q4GBkzhor5yAAl97I2" : true
},
"photoUrl" : "https://firebasestorage.googleapis.com/v0/b/funcloud-8e84e.appspot.com/o/Posts%2F306BF7E1-9FEF-493A-ABF8-C0E061E8648F?alt=media&token=128bdd90-023a-49ac-8361-19c02c631183",
"ratio" : 1.502732240437158,
"score" : 166.6491847103437,
"uid" : "jlkRoaucY6Q4GBkzhor5yAAl97I2"
}
"users" : {
"es5fIbnKFpX4szcCbroUqHjJg6E3" : {
"email" : "user3#mail.de",
"profilText" : "Schreib etwas über dich",
"profileImageUrl" : "https://firebasestorage.googleapis.com/v0/b/funcloud-8e84e.appspot.com/o/profile_image%2Fes5fIbnKFpX4szcCbroUqHjJg6E3?alt=media&token=ce8d8722-39bc-457a-8149-e51c837ef0a3",
"username" : "Blondine",
"username_lowercase" : "blondine"
}
My function where I delete data
static func removeUserData() {
let user = Auth.auth().currentUser
let uid = API.User.CURRENT_USER?.uid
Database.database().reference().child("users").child(uid!).removeValue()
Database.database().reference().child("Feed").child(uid!).removeValue()
Database.database().reference().child("Favoriten").child(uid!).removeValue()
Database.database().reference().child("LikesFromUsers").child(uid!).removeValue()
Database.database().reference().child("post-comments").child(uid!).removeValue()
Database.database().reference().child("notification").child(uid!).removeValue()
Database.database().reference().child("followers").child(uid!).removeValue()
Database.database().reference().child("following").child(uid!).removeValue()
Database.database().reference().child("LikesCommentsFromUsers").child(uid!).removeValue()
Database.database().reference().child("comments").child(uid!).removeValue()
user?.delete(completion: { (error) in
if let error = error {
print(error.localizedDescription)
} else {
print("success")
}
})
}
I would love to iterate through all posts and look for every post which contains the uid of the current user and then delete these posts.
Thanks in advance :)
I would build a server task that can run this asynchronously, removing the responsibility from the mobile device. If the app crashes or loses connection, you'll get a severely broken data set. You need to be able to run it in a stable and verifiable environment. This inherently solves your problem as well, since now you can (at your server's leisure) cycle through and delete all posts owned by the user.
As far as your app is concerned, you'll just need to call a single API after validating that the user wants to delete their account, and voila.

"Flush Result : No Connectivity" Error for FBSDKAppEvents

I have integrated FBSDKCoreKit.framework to track app events, I am calling [FBSDKAppEvents activateApp] in applicationDidBecomeActive: and enabling logs using [FBSDKSettings enableLoggingBehavior:FBSDKLoggingBehaviorAppEvents]
In logs it's logging following error
FBSDKLog: FBSDKAppEvents: Flushed # 1473666575, 2 events due to 'Timer' - {
"advertiser_tracking_enabled" = 1;
"anon_id" = "xxxxxx-xxxxx-xxxxx-xxxxx";
"application_tracking_enabled" = 1;
event = "CUSTOM_APP_EVENTS";
extinfo = "[xxx, xxx, xxx]";
"url_schemes" = "[\"xxxxxxxx\"]";
}
Events: [
{
"isImplicit" : false,
"event" : {
"fb_mobile_launch_source" : "Unclassified",
"_session_id" : "xxxxxx-xxxxx-xxxxx-xxxxx",
"fb_mobile_app_interruptions" : 0,
"_logTime" : 1473664599,
"_ui" : "no_ui",
"_eventName" : "fb_mobile_deactivate_app",
"_valueToSum" : 155,
"fb_mobile_time_between_sessions" : "session_quanta_2"
}
},
{
"isImplicit" : false,
"event" : {
"fb_mobile_launch_source" : "Unclassified",
"_ui" : "no_ui",
"_eventName" : "fb_mobile_activate_app",
"_logTime" : 1473665765,
"_session_id" : "96FA9509-AB21-475F-9F44-3005FE5D10BC"
}
}
]
Flush Result : No Connectivity
At end of log it's showing me error Flush Result : No Connectivity
Any one know why I'm getting this error ?
I got it working by following this guide FBSDK doc here does not explain about each configuration required for tracking events

stop and run again an application in erlang

have an application developed in Erlang and to run this application I need to do: ./build.sh && ./deploy.sh && ./erl_start.sh
I want to make a function that will do the same thing as Ctrl + C and run ./build.sh && ./deploy.sh && ./erl_start.sh
meaning stop the application and run again this application
I try with this function :
verify(Val)->
if Val =:=40 ->
Pid = self(),
io:format("~w~n",[Pid]),
spawn(fun() -> exit(Pid, kill) end),
LsOut = os:cmd("./build.sh && ./deploy.sh && ./erl_start.sh");
true -> ok
end.
and when I test this function I have this error :
1> model:verify(40).
<0.144.0>
** exception exit: killed
I test this command :
1> [io:format("~p : ~p~n",[Pid,erlang:process_info(Pid,current_function)]) || Pid <- processes()].
<0.0.0> : {current_function,{init,loop,1}}
<0.3.0> : {current_function,{erl_prim_loader,loop,3}}
<0.5.0> : {current_function,{gen_event,fetch_msg,5}}
<0.6.0> : {current_function,{gen_server,loop,6}}
<0.8.0> : {current_function,{application_master,main_loop,2}}
<0.9.0> : {current_function,{application_master,loop_it,4}}
<0.10.0> : {current_function,{gen_server,loop,6}}
<0.11.0> : {current_function,{gen_server,loop,6}}
<0.12.0> : {current_function,{gen_server,loop,6}}
<0.13.0> : {current_function,{global,loop_the_locker,1}}
<0.14.0> : {current_function,{global,collect_deletions,2}}
<0.15.0> : {current_function,{global,loop_the_registrar,0}}
<0.16.0> : {current_function,{gen_server,loop,6}}
<0.18.0> : {current_function,{gen_server,loop,6}}
<0.19.0> : {current_function,{gen_server,loop,6}}
<0.20.0> : {current_function,{code_server,loop,1}}
<0.21.0> : {current_function,{gen_server,loop,6}}
<0.22.0> : {current_function,{standard_error,server_loop,1}}
<0.23.0> : {current_function,{gen_server,loop,6}}
<0.24.0> : {current_function,{user_drv,server_loop,5}}
<0.25.0> : {current_function,{group,server_loop,3}}
<0.26.0> : {current_function,{group,server_loop,3}}
<0.27.0> : {current_function,{shell,shell_rep,4}}
<0.28.0> : {current_function,{gen_server,loop,6}}
<0.29.0> : {current_function,{gen_server,loop,6}}
<0.36.0> : {current_function,{application_master,main_loop,2}}
<0.37.0> : {current_function,{application_master,loop_it,4}}
<0.38.0> : {current_function,{gen_server,loop,6}}
<0.39.0> : {current_function,{gen_event,fetch_msg,5}}
<0.40.0> : {current_function,{gen_server,loop,6}}
<0.41.0> : {current_function,{gen_server,loop,6}}
<0.44.0> : {current_function,{gen_server,loop,6}}
<0.45.0> : {current_function,{mnesia_locker,loop,1}}
<0.46.0> : {current_function,{gen_server,loop,6}}
<0.47.0> : {current_function,{mnesia_tm,doit_loop,1}}
<0.48.0> : {current_function,{gen_server,loop,6}}
<0.49.0> : {current_function,{gen_server,loop,6}}
<0.53.0> : {current_function,{gen_server,loop,6}}
<0.54.0> : {current_function,{gen_server,loop,6}}
<0.63.0> : {current_function,{disk_log,loop,1}}
<0.65.0> : {current_function,{gen_server,loop,6}}
<0.66.0> : {current_function,{gen_server,loop,6}}
<0.67.0> : {current_function,{gen_server,loop,6}}
<0.68.0> : {current_function,{gen_server,loop,6}}
<0.69.0> : {current_function,{mnesia_late_loader,loop,1}}
<0.105.0> : {current_function,{application_master,main_loop,2}}
<0.106.0> : {current_function,{application_master,loop_it,4}}
<0.107.0> : {current_function,{gen_server,loop,6}}
<0.108.0> : {current_function,{gen_server,loop,6}}
<0.109.0> : {current_function,{gen_server,loop,6}}
<0.110.0> : {current_function,{gen_server,loop,6}}
<0.111.0> : {current_function,{gen_server,loop,6}}
<0.112.0> : {current_function,{gen_server,loop,6}}
<0.113.0> : {current_function,{gen_server,loop,6}}
<0.114.0> : {current_function,{gen_server,loop,6}}
<0.115.0> : {current_function,{gen_server,loop,6}}
<0.117.0> : {current_function,{gen_server,loop,6}}
<0.118.0> : {current_function,{gen_server,loop,6}}
<0.119.0> : {current_function,{gen_server,loop,6}}
<0.120.0> : {current_function,{gen_server,loop,6}}
<0.121.0> : {current_function,{prim_inet,accept0,2}}
<0.123.0> : {current_function,{gen_server,loop,6}}
<0.124.0> : {current_function,{gen_server,loop,6}}
<0.125.0> : {current_function,{gen_server,loop,6}}
<0.126.0> : {current_function,{gen_server,loop,6}}
<0.127.0> : {current_function,{prim_inet,accept0,2}}
<0.129.0> : {current_function,{gen_server,loop,6}}
<0.130.0> : {current_function,{gen_server,loop,6}}
<0.131.0> : {current_function,{gen_server,loop,6}}
<0.132.0> : {current_function,{gen_server,loop,6}}
<0.133.0> : {current_function,{prim_inet,accept0,2}}
<0.135.0> : {current_function,{gen_server,loop,6}}
<0.136.0> : {current_function,{gen_server,loop,6}}
<0.137.0> : {current_function,{gen_server,loop,6}}
<0.138.0> : {current_function,{gen_server,loop,6}}
<0.139.0> : {current_function,{prim_inet,accept0,2}}
<0.140.0> : {current_function,{gen_server,loop,6}}
<0.143.0> : {current_function,{os,start_port_srv_loop,2}}
<0.144.0> : {current_function,{erl_eval,do_apply,5}}
[ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,
ok,ok,ok,ok,ok,ok,ok,ok,ok,ok|...]
and also I test this command :
1> [io:format("~p : ~p~n",[Pid,erlang:process_info(Pid,initial_call)]) || Pid <- processes()].
<0.0.0> : {initial_call,{otp_ring0,start,2}}
<0.3.0> : {initial_call,{erlang,apply,2}}
<0.5.0> : {initial_call,{proc_lib,init_p,5}}
<0.6.0> : {initial_call,{erlang,apply,2}}
<0.8.0> : {initial_call,{proc_lib,init_p,5}}
<0.9.0> : {initial_call,{application_master,start_it,4}}
<0.10.0> : {initial_call,{proc_lib,init_p,5}}
<0.11.0> : {initial_call,{proc_lib,init_p,5}}
<0.12.0> : {initial_call,{proc_lib,init_p,5}}
<0.13.0> : {initial_call,{erlang,apply,2}}
<0.14.0> : {initial_call,{erlang,apply,2}}
<0.15.0> : {initial_call,{erlang,apply,2}}
<0.16.0> : {initial_call,{proc_lib,init_p,5}}
<0.18.0> : {initial_call,{proc_lib,init_p,5}}
<0.19.0> : {initial_call,{proc_lib,init_p,5}}
<0.20.0> : {initial_call,{erlang,apply,2}}
<0.21.0> : {initial_call,{proc_lib,init_p,5}}
<0.22.0> : {initial_call,{standard_error,server,2}}
<0.23.0> : {initial_call,{proc_lib,init_p,5}}
<0.24.0> : {initial_call,{user_drv,server,2}}
<0.25.0> : {initial_call,{group,server,3}}
<0.26.0> : {initial_call,{group,server,3}}
<0.27.0> : {initial_call,{erlang,apply,2}}
<0.28.0> : {initial_call,{proc_lib,init_p,5}}
<0.29.0> : {initial_call,{proc_lib,init_p,5}}
<0.36.0> : {initial_call,{proc_lib,init_p,5}}
<0.37.0> : {initial_call,{application_master,start_it,4}}
<0.38.0> : {initial_call,{proc_lib,init_p,5}}
<0.39.0> : {initial_call,{proc_lib,init_p,5}}
<0.40.0> : {initial_call,{proc_lib,init_p,5}}
<0.41.0> : {initial_call,{proc_lib,init_p,5}}
<0.44.0> : {initial_call,{proc_lib,init_p,5}}
<0.45.0> : {initial_call,{proc_lib,init_p,5}}
<0.46.0> : {initial_call,{proc_lib,init_p,5}}
<0.47.0> : {initial_call,{proc_lib,init_p,5}}
<0.48.0> : {initial_call,{proc_lib,init_p,5}}
<0.49.0> : {initial_call,{proc_lib,init_p,5}}
<0.53.0> : {initial_call,{proc_lib,init_p,5}}
<0.54.0> : {initial_call,{proc_lib,init_p,5}}
<0.63.0> : {initial_call,{proc_lib,init_p,5}}
<0.65.0> : {initial_call,{proc_lib,init_p,5}}
<0.66.0> : {initial_call,{proc_lib,init_p,5}}
<0.67.0> : {initial_call,{proc_lib,init_p,5}}
<0.68.0> : {initial_call,{proc_lib,init_p,5}}
<0.69.0> : {initial_call,{proc_lib,init_p,5}}
<0.105.0> : {initial_call,{proc_lib,init_p,5}}
<0.106.0> : {initial_call,{application_master,start_it,4}}
<0.107.0> : {initial_call,{proc_lib,init_p,5}}
<0.108.0> : {initial_call,{proc_lib,init_p,5}}
<0.109.0> : {initial_call,{proc_lib,init_p,5}}
<0.110.0> : {initial_call,{proc_lib,init_p,5}}
<0.111.0> : {initial_call,{proc_lib,init_p,5}}
<0.112.0> : {initial_call,{proc_lib,init_p,5}}
<0.113.0> : {initial_call,{proc_lib,init_p,5}}
<0.114.0> : {initial_call,{proc_lib,init_p,5}}
<0.115.0> : {initial_call,{proc_lib,init_p,5}}
<0.117.0> : {initial_call,{proc_lib,init_p,5}}
<0.118.0> : {initial_call,{proc_lib,init_p,5}}
<0.119.0> : {initial_call,{proc_lib,init_p,5}}
<0.120.0> : {initial_call,{proc_lib,init_p,5}}
<0.121.0> : {initial_call,{proc_lib,init_p,5}}
<0.123.0> : {initial_call,{proc_lib,init_p,5}}
<0.124.0> : {initial_call,{proc_lib,init_p,5}}
<0.125.0> : {initial_call,{proc_lib,init_p,5}}
<0.126.0> : {initial_call,{proc_lib,init_p,5}}
<0.127.0> : {initial_call,{proc_lib,init_p,5}}
<0.129.0> : {initial_call,{proc_lib,init_p,5}}
<0.130.0> : {initial_call,{proc_lib,init_p,5}}
<0.131.0> : {initial_call,{proc_lib,init_p,5}}
<0.132.0> : {initial_call,{proc_lib,init_p,5}}
<0.133.0> : {initial_call,{proc_lib,init_p,5}}
<0.135.0> : {initial_call,{proc_lib,init_p,5}}
<0.136.0> : {initial_call,{proc_lib,init_p,5}}
<0.137.0> : {initial_call,{proc_lib,init_p,5}}
<0.138.0> : {initial_call,{proc_lib,init_p,5}}
<0.139.0> : {initial_call,{proc_lib,init_p,5}}
<0.140.0> : {initial_call,{proc_lib,init_p,5}}
<0.143.0> : {initial_call,{erlang,apply,2}}
<0.144.0> : {initial_call,{erlang,apply,2}}
[ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,
ok,ok,ok,ok,ok,ok,ok,ok,ok,ok|...]
I try with this function :
verify(Val) ->
erlang:halt();
verify(_) ->
% do nothing
ok.
and when I test I have this result :
1> model:verify(40).
root#ubuntu:/home/afif/Desktop/ttest/erlang#
it only exit the VM
but as I already said I want to stop the application and run again this application
and for this I try with :
verify(Val) ->
erlang:halt(),
LsOut = os:cmd("./build.sh && ./deploy.sh && ./erl_start.sh");
verify(_) ->
% do nothing
ok.
but I have the same result like the previous code
what I've done is half of work
remains how to run the program again
If you only want to exit the VM in order to restart, you can use the function erlang:halt() or erlang:halt(Status). From the documentation:
halt()
Halts the Erlang runtime system and indicates normal exit to the
calling environment. Has no return value.
halt().
os_prompt%
halt(Status)
Types:
Status = integer() >= 0 | string()
Status must be a non-negative integer, or a string. Halts the Erlang
runtime system. Has no return value. If Status is an integer, it is
returned as an exit status of Erlang to the calling environment. If
Status is a string, produces an Erlang crash dump with String as
slogan, and then exits with a non-zero status code.
Note that on many platforms, only the status codes 0-255 are supported
by the operating system.
so your code could be:
verify(40) ->
erlang:halt();
verify(_) ->
% do nothing
ok.
But as I told you in your previous question, I don't think that you are looking in the good direction.

Resources