recurrent xojo crashes

After having started to use xojo (2014r2, OS X 10.9.4) seriously in an attempt to port one of my larger apps (>900,000 lines including its plugin in C), I must agree with past reports of frequent crashes from some users . Maybe once an hour is a little exaggerated, but not much. Happens with various ops, like messing with properties in the navigator and usually during a compile. Example crash log would be:

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called
terminating with uncaught exception of type std::bad_alloc: std::bad_alloc

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x9a204b92 __semwait_signal_nocancel + 10
1 libsystem_c.dylib 0x9afbfaf1 nanosleep$NOCANCEL$UNIX2003 + 210
2 libsystem_c.dylib 0x9afeb2e4 usleep$NOCANCEL$UNIX2003 + 60
3 libsystem_c.dylib 0x9b0162a8 abort + 167
4 libc++abi.dylib 0x93d8a6c9 abort_message + 169
5 libc++abi.dylib 0x93dab47d default_terminate_handler() + 264
6 libc++abi.dylib 0x93da8c30 std::__terminate(void (*)()) + 14
7 libc++abi.dylib 0x93da864b __cxa_throw + 116
8 libc++.1.dylib 0x90383b66 operator new(unsigned long) + 102
9 SpawnCompiler.xojo_plugin_0.dylib 0x0bc82d3c 0xbc72000 + 68924
10 SpawnCompiler.xojo_plugin_0.dylib 0x0bd0f08b 0xbc72000 + 643211
11 SpawnCompiler.xojo_plugin_0.dylib 0x0bd0e3e1 0xbc72000 + 639969
12 SpawnCompiler.xojo_plugin_0.dylib 0x0bd09ea1 0xbc72000 + 622241
13 SpawnCompiler.xojo_plugin_0.dylib 0x0bd58724 0xbc72000 + 943908
14 SpawnCompiler.xojo_plugin_0.dylib 0x0bd5751c 0xbc72000 + 939292
15 SpawnCompiler.xojo_plugin_0.dylib 0x0bd5745a 0xbc72000 + 939098
16 SpawnCompiler.xojo_plugin_0.dylib 0x0bd4b687 0xbc72000 + 890503
17 com.xojo.xojo 0x00349ece Compiler.Build%b%ooA1ooo + 315
18 com.xojo.xojo 0x0124ee6d SpawnCompiler.Build%b%ooA1ooo + 273
19 com.xojo.xojo 0x0165fe29 DebugCompileThread.Run%%o + 7647
20 com.xojo.xojo 0x01c117f5 StudioMainWindow.StudioMainWindow.RunApp%b%o<StudioMainWindow.StudioMainWindow>bbi4<DebuggerUtilities.OSDebugger> + 5824
21 com.xojo.xojo 0x01c03ea6 StudioMainWindow.StudioMainWindow.HandleCommand%b%o<StudioMainWindow.StudioMainWindow>o<Commands.Command> + 5809
22 com.xojo.xojo 0x00972ade Commands.Dispatch%%o<Commands.Command> + 1657
23 com.xojo.xojo 0x009733af Commands.Dispatch%%s + 122
24 com.xojo.xojo 0x006b5754 DocWindow._StudioProjectRun_Action%b%o + 224
25 com.xojo.XojoFramework 0x03246f70 0x3191000 + 745328
26 com.xojo.XojoFramework 0x031aeeb0 0x3191000 + 122544
27 com.xojo.XojoFramework 0x031af274 0x3191000 + 123508
28 libobjc.A.dylib 0x934482af -[NSObject performSelector:withObject:] + 70
29 com.apple.AppKit 0x94f4c8a5 -[NSApplication sendAction:to:from:] + 438
30 com.apple.AppKit 0x94f68c65 -[NSMenuItem _corePerformAction] + 486
31 com.apple.AppKit 0x94f6896a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 163
32 com.apple.AppKit 0x94f68021 -[NSMenu _performActionWithHighlightingForItemAtIndex:sendAccessibilityNotification:] + 79
33 com.apple.AppKit 0x94f67fcd -[NSMenu _performActionWithHighlightingForItemAtIndex:] + 48
34 com.apple.AppKit 0x94f67972 -[NSMenu performKeyEquivalent:] + 294
35 com.apple.AppKit 0x94f64095 -[NSApplication _handleKeyEquivalent:] + 938
36 com.apple.AppKit 0x94ecd8a2 -[NSApplication sendEvent:] + 3911
37 com.xojo.XojoFramework 0x031b8706 0x3191000 + 161542
38 com.xojo.XojoFramework 0x031b8750 0x3191000 + 161616
39 com.xojo.xojo 0x0000ecbc Delegate.Invoke%% + 34
40 com.xojo.xojo 0x000c8094 Application._CallFunctionWithExceptionHandling%%op + 248
41 com.xojo.XojoFramework 0x032ab911 0x3191000 + 1157393
42 com.xojo.XojoFramework 0x031b8675 0x3191000 + 161397
43 com.apple.AppKit 0x94d121bc -[NSApplication run] + 823
44 com.xojo.XojoFramework 0x032ab997 0x3191000 + 1157527
45 com.xojo.XojoFramework 0x032aa021 RuntimeRun + 49
46 com.xojo.xojo 0x0027c380 REALbasic._RuntimeRun + 34
47 com.xojo.xojo 0x0000e4b8 _Main + 257
48 com.xojo.xojo 0x00002848 % main + 36
49 com.xojo.xojo 0x02c3481e _start + 116
50 com.xojo.xojo 0x02c34774 start + 43

Have others experienced this? I find xojo far less stable than RB/RS (and yes I’d file a report if I could actually get Feedback to download, install and run, which I cannot). From my experience anyway, xojo has significant stability issues.

Peter.

Thats likely an out of memory crash

Interesting. That is possible, I am working from a 8GB laptop. However, with a fast SSD I would’ve thought that swapping to VM would never allow this occur.

P.

Yeah, but Xojo is 32-bit, so youre likely hitting the 3.5-4GB wall.

So here’s another one since we last “spoke” (this is the frequency of crashes I am faced with):

2014-08-15 11:39:27.411 PM Xojo[9734]: Xojo(9734,0xa07a11a8) malloc: *** mach_vm_map(size=69304320) failed (error code=3)
*** error: can’t allocate region
*** set a breakpoint in malloc_error_break to debug

What Greg says makes sense and it is an out-of-mem issue, BUT, not because I don’t have enough RAM/VM, but because xojo runs out of 32-bit addressing space AND does not trap failed mallocs. So this is a problem because if xojo is 32 bit and cannot function with a 32-bit space, this is not good I would think.

P.

32bit Mac apps can use about 3.5 GB.

That crash is in the IDE, right? In the compiler plugin.

If you like you can send your plugin to me to review the code and find mistakes.

There is really no workable mechanism to trap a failed alloc

We have discussed this one ad nauseum before

But the crashes continue Norm: 2 more after a few hours on a different machine. So I think xojo has a significant problem (and I would file reports if I could get Feedback installed, also failed on 2 machines):

This happens with every new version of Feedback on my two machines.
Workaround: Open 164_Feedback.dmg with Disk Utility and launch the installer manually.

Can you show us the code where the crash happens?

[quote=121851:@Peter Stys]But the crashes continue Norm: 2 more after a few hours on a different machine. So I think xojo has a significant problem (and I would file reports if I could get Feedback installed, also failed on 2 machines):
[/quote]
Go to the downloads page on our site, click Extras, and download Feedback from there.

We have four developers in our office and we all experience crashes with the XOJO IDE. The last version of RB that we used (RB2012r2) seemed pretty solid and we experience very few creates, but XOJO seems to have memory leaks that result in crashes.

We have converted a couple of pretty sizable applications and the crashes seem to be unavoidable. The only thing I can tell you is let CMD-S (CTRL-S on Windows) be your best friend. We also do NOT rely on any code recovery that XOJO tries to do after a crash. Absolutely unreliable.

We have found no corollary between the number of apps open, the size of the app, or plugins, and whether you are coding, debuting, or building. Happens everywhere.

The only thing that seems to make sense is memory leaks because on a clean reboot and restart of XOJO, we never have a crash no matter what we do until we’ve been working in it for some time. Generally, an hour or two.

No, we did not file a feedback report because the last time this issue came up on the forums, everyone said it was rock solid, so that meant it must be us, right?

More food for thought. A couple of us work exclusively in OSX and a couple of us work exclusively in Windows (64 bit). We both experience about the same number of crashes. I’ve tried working in the Windows IDE and find it unusable after working in OSX. Still no CTRL-C, CTRL-V… have to use the menus to copy and paste. Crazy!

From what you are telling I’d say this seems to be project related. Also an indication for that is that no stability problems have been discussed on this forum lately as far as I can recall. Random shot: an outdated plugin.

For me, earlier versions of the IDE (2012rXXX) were terrible memory leakers (something like 200MB per compile) so I could only compile about 10 times before the IDE crashed. I’m not seeing those sorts of issues in Xojo lately, so this does sound like something specific to your use.

And I work on the IDE all day every day usually 10+ hours a day and never have this
I’ve been running the IDE for about 4 days solid without crashes or restarts
YMMV

[quote=121853:@Eli Ott]This happens with every new version of Feedback on my two machines.
Workaround: Open 164_Feedback.dmg with Disk Utility and launch the installer manually.[/quote]

That’s exactly what I did, and that’s the error I got, trying to open the dmg from Finder. Just FYI, but this is off-topic.

Not sure what you mean Eli: xojo crashes towards the end of a build-run operation. My last one did not even register a crash in the Console. What was logged is curious and may/may not be informative:

2014-08-17 2:08:53.600 AM Xojo[74864]: objc[74864]: Class XOJBevelButton is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.600 AM Xojo[74864]: objc[74864]: Class XOJImageWell is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.600 AM Xojo[74864]: objc[74864]: Class XOJChasingArrows is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.601 AM Xojo[74864]: objc[74864]: Class XOJDisclosureTriangle is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.601 AM Xojo[74864]: objc[74864]: Class XOJLittleArrows is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.601 AM Xojo[74864]: objc[74864]: Class XOJSeparator is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.630 AM Xojo[74864]: objc[74864]: Class XOJSegmentedControl is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBGUIKit.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBGUIKit.xojo_plugin/GUIKit/Build Resources/Mac Cocoa/GUIKitCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.630 AM Xojo[74864]: objc[74864]: Class XOJGUIKit_ActionTarget is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBGUIKit.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBGUIKit.xojo_plugin/GUIKit/Build Resources/Mac Cocoa/GUIKitCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:53.641 AM Xojo[74864]: objc[74864]: Class XOJWebKitDelegate is implemented in both /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Frameworks/RBHTMLViewer.xojo_plugin_0.dylib and /Users/pstys/Dropbox/LabStuff_DropBox/Development/Xojo 2014 Release 2.1/Xojo.app/Contents/Resources/Internal Plugins/RBHTMLViewer.xojo_plugin/HTMLViewer/Build Resources/Mac Cocoa/HTMLViewerCocoa.dylib. One of the two will be used. Which one is undefined.
2014-08-17 2:08:54.672 AM Xojo[74864]: [RB] Unable to load plugin CocoaTestPlugin. xojo_plugin
2014-08-17 2:08:54.673 AM Xojo[74864]: [RB] Unable to load plugin Build Resources
2014-08-17 2:08:54.681 AM Xojo[74864]: [RB] Unable to load plugin IDE Resources
2014-08-17 2:08:54.681 AM Xojo[74864]: [RB] Unable to load plugin FFT_CocoaPlugin. xojo_plugin
2014-08-17 2:08:54.681 AM Xojo[74864]: [RB] Unable to load plugin Build Resources
2014-08-17 2:08:54.690 AM Xojo[74864]: [RB] Unable to load plugin IDE Resources
2014-08-17 2:08:54.690 AM Xojo[74864]: [RB] Unable to load plugin ImageTrakPlugin. xojo_plugin
2014-08-17 2:08:54.690 AM Xojo[74864]: [RB] Unable to load plugin Build Resources
2014-08-17 2:08:54.803 AM Xojo[74864]: [RB] Unable to load plugin IDE Resources
2014-08-17 2:08:54.803 AM Xojo[74864]: [RB] Unable to load plugin MBS140Plugins

I frequently get the ‘Unable to load plugin xxx’ messages. Not sure what this is all about as the plugins must be loaded because the built app runs a successfully calls functions within the plugins. XOJO crashed right after the above but there was no further entry.

Don’t open the DMG in Finder, open it within Disk Utility.app - this will work.

Confirmed: xojo leaks memory during compile/build (about 50 MB per run), then crashes when its VSIZE exceeds 4GB: <https://xojo.com/issue/34934>