memory error, but only on device running ios 8 - realm

My app running on an iPhone 4 iOS 8.3 gets this error:
2016-06-26 19:09:22.587 Skyline Flora[4498:949043] *** Terminating app
due to uncaught exception 'RLMException', reason: 'mmap() failed:
Cannot allocate memory size: 671088640 offset: 0'
*** First throw call stack:
(0x29cd5d67 0x37534c77 0x2318db 0x211d03 0x21231b 0x212c41 0x2113fd
0x15354f 0x153133 0x152fbf 0xbea6b 0x2d17a705 0x2d2245a5 0x2d2244cd
0x2d223a51 0x2d22378b 0x2d2234f1 0x2d223489 0x2d177c1f 0x2cba2f65
0x2cb9e951 0x2cb9e7d9 0x2cb9e1c7 0x2cb9dfd1 0x2d3dba5d 0x2d3dc7f5
0x2d3e6c39 0x2d3dac2b 0x304470e1 0x29c9c60d 0x29c9b8d1 0x29c9a06f
0x29be7981 0x29be7793 0x2d1deb87 0x2d1d9981 0xbfa1b 0x37ad0aaf)
libc++abi.dylib: terminating with uncaught exception of type
NSException
It only happens on the device, it's fine in the simulator (Xcode 7.3).
The phone has 18GB free when the app is run.
This error has shown up in the past, as can be found easily with a search, but on writes; this app only reads the database, never writes.
There's no problem on iOS 9 devices.
What's the next thing to check?

The Realm file is mmaped whether it is opened as read-only or read-write. Unfortunately, this is probably an issue inherent to the resource constraints of the iPhone 4/4S. We've seen issues with mmap ranging from files as small as 300 MB, depending on the device.
You can check out this Github issue for some potential workarounds.

Related

Including Multiple Attachments In Transaction Kills Node

Setup
Corda 4.6
Working from Java template
I have been experimenting adding up to 10 Attachments of small (1K) zip files to a transaction.
Error when testing with StartedMockNodes:
io.github.classgraph.ClassGraphException: Uncaught exception during scan
at io.github.classgraph.ClassGraphException.newClassGraphException(ClassGraphException.java:89) ~[classgraph-4.8.90.jar:4.8.90]
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1555) ~[classgraph-4.8.90.jar:4.8.90]
...
Caused by: java.lang.OutOfMemoryError: Java heap space
at nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.readAllBytesWithSpilloverToDisk(NestedJarHandler.java:815) ~[classgraph-4.8.90.jar:4.8.90]
at nonapi.io.github.classgraph.fastzipfilereader.PhysicalZipFile.<init>(PhysicalZipFile.java:161) ~[classgraph-4.8.90.jar:4.8.90]
at nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.downloadJarFromURL(NestedJarHandler.java:576) ~[classgraph-4.8.90.jar:4.8.90]
...
Error when testing local nodes built with CordForm and connecting with RPC:
Node will stop suddenly. No errors in the log. In the directory of the failed node there will be two files:
hs_err_pid20400.log
java_pid20400.hprof
log file has similar errors as StartedMockNode failures:
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.readAllBytesWithSpilloverToDisk(Ljava/io/InputStream;Ljava/lang/String;JLnonapi/io/github/classgraph/utils/LogNode;)Lnonapi/io/github/classgraph/fileslice/Slice;+65
j nonapi.io.github.classgraph.fastzipfilereader.PhysicalZipFile.<init>(Ljava/io/InputStream;JLjava/lang/String;Lnonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler;Lnonapi/io/github/classgraph/utils/LogNode;)V+25
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.downloadJarFromURL(Ljava/lang/String;Lnonapi/io/github/classgraph/utils/LogNode;)Lnonapi/io/github/classgraph/fastzipfilereader/PhysicalZipFile;+428
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.access$000(Lnonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler;Ljava/lang/String;Lnonapi/io/github/classgraph/utils/LogNode;)Lnonapi/io/github/classgraph/fastzipfilereader/PhysicalZipFile;+3
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler$4.newInstance(Ljava/lang/String;Lnonapi/io/github/classgraph/utils/LogNode;)Ljava/util/Map$Entry;+124
Clarification #1: The error occurs during transaction execution. Not when originally uploading the files to the node using CordaRPCOps.uploadAttachmentWithMetadata (that works fine).
Clarification #2: The first node to fail is the one constructing the transaction. If you try restarting this node it will fail on restart. It will take several re-starts to get up and running again. Then any node that was receiving the transaction will fail. They will also require several restarts to get up an running again. As a testament to Corda's Flow framework - after enough restarts the transaction will eventually be successful and the Attachment's will be transmitted.
Clarification #3: I can pre-upload the Attachments to all the nodes before executing the transaction and the failures still occur.
StartedMockNodes:
Found this
Added the following to my workFlows build.gradle file to stop the errors:
test {
maxHeapSize = "4096m"
}
Local Nodes & RPC:
??? - haven't found a solution yet

VirtualBox macOS Catalina Springboard quit unexpectedly [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am new to this VirtualBox macOS thing and I am trying to run flutter with the IOS simulator, but when I try to open the IOS Simulator it takes a long time to load and an error comes up and says that the SpringBoard quit unexpectedly. I was wondering how I would be able to fix it? I already tried reinstalling it and the error still came up.
Process: SpringBoard [850]
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app/SpringBoard
Identifier: SpringBoard
Version: 1.0 (50)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [719]
Responsible: SimulatorTrampoline [714]
User ID: 501
Date/Time: 2020-06-13 18:56:35.137 -0700
OS Version: Mac OS X 10.15.3 (19D76)
Report Version: 12
Anonymous UUID: C3FC17E7-DC36-0C9B-B9ED-3D40775A17B0
Sleep/Wake UUID: 48BAAE61-7371-48CE-82D8-E10AFAEE7A5A
Time Awake Since Boot: 3400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [850]
Application Specific Information:
CoreSimulator 704.12.2 - Device: iPhone SE (2nd generation) (E13AD6AD-6437-4A57-B9F4-CAEC3FDBAD36) - Runtime: iOS 13.5 (17F61) - DeviceType: iPhone SE (2nd generation)
For the full error: https://pastebin.com/EKJkb5i7
I just had the same issue and solved it by executing the following commands in a Command Prompt with Admin privileges, to disable AVX/AVX2 support for my virtual machine (Make sure to shutdown the VM and close Virtualbox before and replace "YourVMName" with the actual name of your VM in VirtualBox)
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage setextradata "YourVMName" VBoxInternal/CPUM/IsaExts/AVX 0
VBoxManage setextradata "YourVMName" VBoxInternal/CPUM/IsaExts/AVX2 0
I have the same issue with iOS 13.3 simulators. I couldn't solve the problem, but devices with older iOS (I tried with 11.4) working fine. (You can create simulator devices with older iOS in the Device Manager.)
SIGILL usually means you hit a __builtin_trap() or you are trying to execute an instruction that isn't supported by your CPU.
Given this is in some HEVC processing, I suspect your VM is advertising support for some SIMD extension it doesn't actually support (eg: AVX2 or similar).
You should check your VM configuration and ensure it is not advertising support for CPU extensions your system doesn't actually support, and you should file a bug against VirtualPC to ensure they have checks in place to prevent that in the first place.

Flutter - http.get fails on macos build target: Connection failed

I started porting my Flutter app to macos Desktop. The UI started fine. However, as soon as the app makes a network call, it fails instantly with Connection failed (OS Error: Operation not permitted).
Running a one-liner:
final response = await http.get('https://jsonplaceholder.typicode.com/posts/1');
fails with:
Unhandled Exception: SocketException: Connection failed (OS Error:
Operation not permitted, errno = 1),
address = jsonplaceholder.typicode.com, port = 443
#0 IOClient.send (package:http/src/io_client.dart:33:23)
The macos build target comes from Google's sample here.
Flutter (Channel master, v1.9.8-pre.108)
Per my comment on the other answer, you should not use the Xcode capabilities UI for this. It will not correctly handle the two separate entitlement files in a Flutter project.
You need to add:
<key>com.apple.security.network.client</key>
<true/>
to macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements.
This is documented here and here.
Your macOS XCode project lacks Internet permission called "Outgoing Connections (Client)".
Open your macos xcode project - [root]/macos/Runner.xcworkspace
Click "Runner" in Project navigator - general settings will show up. Select "Capabilities" from tabbar and tick option "Outgoing Connections (Client)".
Rebuild your application inside XCode and launch the project.
If you are getting this error Only in Android release then Internet permission must be missing from main manifest. You just need to add Internet permission in Manifest file.
Just add this permission in manifest <uses-permission android:name="android.permission.INTERNET"/>
There are three manifest file available in Android folder
app/src/debug
app/src/main
app/src/profile

firebase first call very slow on IOS

the first call to firebase is very slow > 10 seconds, and some Network error happend. I forked the repo to reproduce the issue: https://github.com/frankpolkm/ionic-conference-app
It simply added firebase to the driftyco/ionic-conference-app demo app. Please have a look at the code change in https://github.com/frankpolkm/ionic-conference-app/blob/master/app/app.ts
and here is the console log. There has no NetWork Error before firebase added.
0 104436 log DEVICE READY FIRED AFTER, 1308, ms
1 104725 log Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
2 104842 time signInAnonymously
3 105151 debug swiper initEvents, attach
4 109567 warn Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
5 109568 warn Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
6 110230 error Error: Network Error, http://192.168.2.103:8100/build/js/zone.js, Line: 260
7 110230 error Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred., http://192.168.2.103:8100/build/js/zone.js, Line: 260
8 115416 timeEnd signInAnonymously
9 115416 log signInAnonymously: 10574ms
10 115416 log uid=mZevh2GdnyaNv1BSfnB78HC17di2
11 120419 error Error: Network Error, http://192.168.2.103:8100/build/js/zone.js, Line: 260
12 120420 error Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred., http://192.168.2.103:8100/build/js/zone.js, Line: 260
Please let me know what I did wrong.
Thanks,
Frank
Adding <allow-navigation href="*" /> to the confix.xml File solved it for me.

When upgrade to oracle11g-x64,we get into trouble

We ran an java web application server with weblogic10.3+bea jdk1.6+hibernate3+c3p0 0.9.1.2+oracle 9.2.8. When we upgraded the database to oracle11gx64 cluster with ojdbc6, we met many errors.
First the following error message appeared and the application can't connect to database at intervals of hours:
*com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector#2a01aa -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2016-01-28 18:09:55 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector#2a01aa -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:*
Then we changed the config "hibernate.c3p0.max_statements"=0,this error disappeared,BUT other OutOfMemoryError arose:
Caused by: javassist.CannotCompileException: by java.lang.OutOfMemoryError: class allocation, 188463944 loaded, 187957248 footprint JVM#check_alloc (src/jvm/model/classload/classalloc.c:118). 67744 bytes
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:169)
at org.jboss.seam.util.ProxyFactory.createClass3(ProxyFactory.java:350)
... 77 more
Caused by: java.lang.OutOfMemoryError: class allocation, 188463944 loaded, 187957248 footprint JVM#check_alloc (src/jvm/model/classload/classalloc.c:118). 67744 bytes
Anyone could help me? Thanks in advance!
Update to the latest c3p0 (now 0.9.5.2).
Continue to use statement caching if that works for you, but to avoid the deadlocks, use the following setting.
c3p0.statementCacheNumDeferredCloseThreads=1
See the docs.

Resources