Hi there,
Since I’ve switched to 2015r1 I 'm getting this kind of errors, mostly when, while debugging I left the web app waiting with no user action for a while.
11:07:03 AM --- Proto HUI P2Flow Launched
11:07:04 AM --- Feb 19 11:07:04 macmini.local Proto HUI P2Flow.debug[17228] <Warning>: @--#000001 > Session.Open> Opening #A4A2B15CB8D3D81E78A522457649A3B3 (IP: 127.0.0.1 )
11:09:53 AM --- Proto HUI P2Flow.debug(17228,0xb0093000) malloc: *** mach_vm_map(size=55574528) failed (error code=3)
11:10:02 AM --- *** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
11:10:33 AM --- libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
11:12:23 AM --- Process Completed.
11:12:24 AM --- Proto HUI P2Flow Ended
It’s on Yosemite 10.10.2
Anybody else seeing this error?
Yep. It was a missing RecordSet.MoveNext call creating and endless loop filling up the memory used by the app up to more than 3GB until it crashes.
Yet, I agree with you: It should raise an OutOfMemoryException.
Reported as <https://xojo.com/issue/38245>
I doubt this would make sense. I’ve learned to not try to catch a bad_alloc error in C++ because you won’t be able to do anything - you’ve run out of memory and there is literally nothing you can do.
There a small number of scenarios where recovering from std::bad_alloc makes sense. Typically they’re in places where you’re allocating a huge chunk of memory in one go and failing still leaves you with plenty of memory to continue. For example, creating a gigantic image.
What about the framework allocating a “rainy day fund” when the app starts (a memory block which is not used, but is just there to take up some space.) If an OOM error occurs, the framework frees that block immediately, at which point the app should have enough memory left to fail more gracefully?
I’m breaking my head around this issue for a few days… it has worked fine into one of my webapp for months… and from 2015 it crasches… Today I solved my problem… I move the “dim menu as new webmenuitem…” from “open” to “shown” event and it works!
I hope this can help you too…