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?

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:

1-[NSApplication(NSResponder) sendAction:to:from:]Àó¨›Ù?4Û??›Ù?2*
-[NSMenuItem _corePerformAction]???›Ù?Tʵ?›Ù?2J
@-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]Ù¥?›Ù?3»í?›Ù?2)
-[NSMenu performKeyEquivalent:]›è?›Ù?’?ÉÌ?Ù?2
$-[NSApplication(NSEvent) sendEvent:]¸€?€Ù?3?Œª»2+
-[NSApplication run]¢âπÙ?ù?õ…2

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.