What could be causing a Compiler failed assertion at Structures crash?

I recently added a dll, two simple structures and three soft declares to a Windows Desktop project, and now when I try to run or build it the IDE crashes with an exception of the aforementioned kind. None of the items are being used when the project starts.
Are there any hints on what might be causing this problem? Both structures are simple constructs consisting of only three Singles each, and there is nothing weird I can find about them.

Can you right click on the structures in the nav, hit copy and paste them in here?

Alignment?
Calling convention?
Byref vs byval?

If one little thing is wrong, the stack gets corrupted.

Yep. Saved the project new, pasted them: The same.

Even more, I realized I did not add the last structures with the last edit round. They were working flawlessly with other declares. So all I changed was a bit in code and to add 3 (external soft) declares and their handling methods.

[quote=413652:@Christian Schmitz]Alignment?
Calling convention?
Byref vs byval?[/quote]
If any of that were true in my case, this should happen when I use the declares, shouldn’t it? The project does not even compile to end.
How can I make the symbols visible again in a Feedback created crash report?
In case this helps anyway:

[quote]_REALPluginMainù»çÒ?ó?ò–27
/_CrashReporter.CreateLiveReport%o%‡?ò–??úÜÌ27
/_FeedbackSystem.PresentCompilerAssertion%%si8ss†?ÑÌKø•ÛÁ2C
;_SpawnCompiler.Event_FailedAssertion%%osi8ss‡§ÛÁ?î?¸2
_REALPluginMain?ń?â¥?¸2
_REALPluginMain?ń?èµí¸2
_REALPluginMain?ń???±¸2
_REALPluginMain?ń?Ñ屸2
_REALPluginMain?ń?鑂?‰???2
_REALPluginMain?ń?òú?¸2
_REALPluginMain?ń?u?›°–2m
e_Compiler.Compile%o%oooo†‹°–èÏܟÔ2Ü
~_DebugCompileThread.Compile%%ooA1oooąÿÔ>À¯?Ô26
._DebugCompileThread.Run%%o‡¡ˆÔÇï?º?2z
r_StudioMainWindow.StudioMainWindow.RunApp%b%o<StudioMainWindow.StudioMainWindow>bbi8<DebuggerUtilities.OSDebugger>Īº?z¡ƒµ?2r
j_StudioMainWindow.StudioMainWindow.HandleCommand%b%o<StudioMainWindow.StudioMainWindow>o<Commands.Command>?ùí?7Ùâ՟2/
‘_Commands.Dispatch%%o<Commands.Command>êÕß%™†ÕŸ2
_Commands.Dispatch%%s‡ü՟FÇ?ÈÏ2>
6_RunRemoteMenuItem.Event_Action%b%o?æÈÏB?ÙÙ»2:
2__Z20RuntimeMenuItemClickP11RunMenuItemhP6WindowPh“ÍÙ»=¯›µ»25
-__ZN9CocoaMenu15_MenuItemActionEP10NSMenuItem?›µ»EË˵»2=
5__ZN17CocoaMenuDelegate13IsItemEnabledEP11RunMenuItem¢Êµ»EÉö¨›Ù?2;
1-[NSApplication(NSResponder) sendAction:to:from:]Àó¨›Ù?4Û??›Ù?2*
-[NSMenuItem _corePerformAction]???›Ù?Tʵ?›Ù?2J
@-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]Ù¥?›Ù?3»í?›Ù?2)
-[NSMenu performKeyEquivalent:]›è?›Ù?’?ÉÌ?Ù?2
_routeKeyEquivalent—¸Ï?Ù?8±‰?€Ù?2.
$-[NSApplication(NSEvent) sendEvent:]¸€?€Ù?3?Œª»2+
#__Z29CocoaFinishApplicationStartupvÍøª»P’??œ2H
@_Application._CallFunctionWithExceptionHandling%%op†??œ;ßÎõ…23
+__Z33CallFunctionWithExceptionHandlingPFvvE°Èõ…3ˆÕª»2+
#__Z29CocoaFinishApplicationStartupvÍøª»(ïèπÙ?2
-[NSApplication run]¢âπÙ?ù?õ…2
_RuntimeRunÛ±õ…&?Ö¸œ2
_REALbasic._RuntimeRun?Ö¸œ?Ò?¿2[/quote]

I meant can you paste them in the forum :slight_smile: No worries, if its only 3 singles and they work in other places then I doubt you have any issues with the struct definitions. I assume you’re representing 3 floats as 3 singles in xojo?

Things to test:

  1. Change 32bit/64bit see if there’s any difference
  2. Remove the soft declares and see if it compiles
  3. Change the soft declares to hard and see if it compiles
  4. Remove one structure at a time and/or one declare at a time and see when it starts working again
  5. Try it in a separate project
  6. Try it without plugins installed

Adding one more point to Julian’s good list is:
7. Change WString or CString in structures to Ptr (use MemoryBlocks)

I have been bitten by this one as a WString and Cstring remain 4 bits in 32-bit and 64-bit OS’s, and Ptr are 4 bits in 32-bit and 8 bits in 32-bit.

Sounds wrong, not just bits.

Pointer is 4/8 bytes, so WString and CString pointers must be same size.
Individual characters are one byte for CString and 2 (Win) and 4 (Linux/Mac) bytes for WString.

Yes, your right Christian, I meant bytes and wrote bits - thanks for catching it.

Let me rephrase what I wrote:
I have been bitten by this one as a WString and Cstring remain 4 bytes in 32-bit and 64-bit OS’s, and Ptr are 4 bytes in 32-bit and 8 bytes in 64-bit.

If you click on a structure and press the button to show 64-bit size from 32-bit, the Ptr changes size and WString and CString remain 4 bytes. The structure uses a memory address for WString and CString and not a memory size.

Edit: This is with Windows 10 and Xojo 2018 R3. I am not sure what happens on a Mac. Correcting my silly errors…

WString is not 4 byte on Mac/Linux as it’s UTF32, but on Windows it’s UTF16.
This has caused a lot of trouble for me coding things wrong. :frowning:

Thanks all!
I finally could hunt it down to a bug I created where I was trying to assign a Memoryblock a value in a way that did not work.
Instead of showing an error, this confuses the compiler completely. It did not even show me I forgot to add a size to a Memoryblock constructor. Instead it sends Xojo into oblivion.
I’ll try to create a simple demo project for feedback later.