64bits run crashes the IDE

Hi,

All my attempts to run my projects (big and small alike) in the IDE as 64 bits crash the IDE, I get this:

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

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

Application Specific Information:
Assertion failed: (getType()->isIntOrIntVectorTy() && “Tried to create an integer operation on a non-integer type!”), function init, file /Volumes/RAID/GOCD/pipelines/LLVM/source/lib/IR/Instructions.cpp, line 2025.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0xa165e496 __pthread_kill + 10
1 libsystem_pthread.dylib 0xa1744c63 pthread_kill + 90
2 libsystem_c.dylib 0xa15bea34 abort + 141
3 libsystem_c.dylib 0xa15892aa __assert_rtn + 311

—
Stan Busk - Software Engineer
at Max Programming, S.L.U.
https://www.maxprog.com

You can try and clear the cache folder.

e.g. Xojo scratch folder in your temp folder.

@Stanley Roche Busk - you should also mention what platform, what version, what type of project.

There’s something specific in your project that the compiler isn’t expecting and causes it to fall on its face. The best way to get this fixed would be to file a bug report with a project that reproduces the issue.

It comes from the MacOSLib/CertTools/ReadReceipt function, this line:

res = ASN1_get_object( p, length, type, xclass, e - p )

The ASN1_get_object is declared this way:
declare function ASN1_get_object lib “/usr/lib/libcrypto.dylib” (ByRef pp as Ptr, ByRef plength as Int32, ByRef ptag as Int32, ByRef pclass as Int32, omax as Int32) as Int32

I can give more info but before that maybe I am using an outdated version of that library? However I looked the one available soon the net and this function is identical.

I suspect the problem is the trailing ‘e - p’, both are of type Ptr, I forced the result to be int32 with CType unsuccessfully. The IDE crash when building this…

What happens when you comment out the code?

If I comment the code the build process completes fully and the app is launched.

Ok, I have reduced the code to the minimum, the 3 following lines always crash my macOS 2017r2.1 IDE when trying to run the app from the IDE as 64bits (no problem with 32bits):

dim p, e as Ptr
dim s as Int32
s = e - p

Also crash if s is set as Integer or even Int64.

Try with Int64 instead of int32

Edit: you tried. Perhaps the library is 32 bit

There is no library involved here, just a new project and those 3 lines in the default window open event. You can try.

Just create a new project, paste this in the default window Open event:

dim p, e as Ptr
dim s as Int32
s = e - p

Set the architecture to 64 bits and run. You get a crash. In the crash log it says:

Assertion failed: (getType()->isIntOrIntVectorTy() && “Tried to create an integer operation on a non-integer type!”), function init, file /Volumes/RAID/GOCD/pipelines/LLVM/source/lib/IR/Instructions.cpp, line 2025.

How about:

dim p, e as Ptr dim s as Integer s = Integer(e) - Integer(p)

[quote=351858:@Stanley Roche Busk]Just create a new project, paste this in the default window Open event:

dim p, e as Ptr
dim s as Int32
s = e - p

Set the architecture to 64 bits and run. You get a crash. In the crash log it says:

Assertion failed: (getType()->isIntOrIntVectorTy() && “Tried to create an integer operation on a non-integer type!”), function init, file /Volumes/RAID/GOCD/pipelines/LLVM/source/lib/IR/Instructions.cpp, line 2025.[/quote]
Please file a bug report about that.