Error XS7038 Failed to emit module '(Project name)' - still?

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
User avatar
Intexso
Posts: 84
Joined: Mon Sep 10, 2018 3:19 pm
Location: Nederland

Error XS7038 Failed to emit module '(Project name)' - still?

Post by Intexso »

Hi,

After compiling my application which uses '', I got the error: Error XS7038 Failed to emit module '(Project name)'.

I read the topic about this form a few months ago https://www.xsharp.eu/forum/public-prod ... xsc-1#4373.

In my code (after using xporter) there are several rows with:
oBorder := oBorders:Item[xlEdgeLeft]
The given solution was to remove the Item part. I did that and the error disappeared!

I thought I read that this problem was fixed, that's why I report it here...

Eric
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Error XS7038 Failed to emit module '(Project name)' - still?

Post by Chris »

Hi Eric,

Sorry about that, the original problem was fixed indeed, but apparently there is some different similar variation that still causes the compiler to crash. Can you please post a complete example? What is the oBorders var declared as?

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Intexso
Posts: 84
Joined: Mon Sep 10, 2018 3:19 pm
Location: Nederland

Error XS7038 Failed to emit module '(Project name)' - still?

Post by Intexso »

Hi Chris,

In the attachment a module from my application in VO-code.
SIKOS Calculatie Export Excel - ExcelExport.7z
(10.45 KiB) Downloaded 155 times
In the METHOD MaakRanden you see my orginal code.

oBorder is strongly typed as ExcelBorder. ExcelBorder is in an library generated with the automation server (with prefix Excel).

Eric
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Error XS7038 Failed to emit module '(Project name)' - still?

Post by Chris »

Hi Eric,

Thanks, but unfortunately I cannot reproduce the error, I ported this code and it seems to be working fine in X#. Are you sure you are using the latest build? Any chance you could zip and send me the X# project? Maybe there's something else getting in the way... It's also a possibility that the compiler has a glitch with the CLR2 dll also.

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Intexso
Posts: 84
Joined: Mon Sep 10, 2018 3:19 pm
Location: Nederland

Error XS7038 Failed to emit module '(Project name)' - still?

Post by Intexso »

Hi Chris,

I have from XIDE build 1.14 of July 2018
And Xporter version 2.0.0.5

This came with the XSharp Bandol Beta 5 (Public) . After that I entered the fox-program. Because it seemed to me that the last public version was the same as the fox-version I haven't updated.

In the attachment you will find the X# Code. But in this code I have manually deleted the Item text.
SIKOS Calculatie Export Excel.7z
(45.24 KiB) Downloaded 156 times
Eric
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Error XS7038 Failed to emit module '(Project name)' - still?

Post by Chris »

Thanks! Unfortunately I still could not reproduce the problem after changing the code to use "Item", not even after I used the CLR 2 version of the interop dll. Maybe it was something else that caused the problem that I cannot think about right now. Anyway, if this error ever happens again please let us know and we will further investigate.

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
elibrighton
Posts: 6
Joined: Wed Apr 05, 2017 11:15 pm

Error XS7038 Failed to emit module '(Project name)' - still?

Post by elibrighton »

Hi,
I am also getting the XS7038 Failed to emit module '(Project name)' error for a project ported from Vulcan.Net to X#.

the line in question seems to be:

Code: Select all

LOCAL DIM abDrive[MAXDRIVENAME] AS BYTE
LOCAL testPsz AS PSZ

testPsz := PSZ(_CAST, @abDrive[1])
Could you please offer assistance with how to resolve this?
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Error XS7038 Failed to emit module '(Project name)' - still?

Post by Chris »

Hi, please just set the "Allow unsafe code" project option to True, and the problem should go away. This one is a known problem, should be fixed in one of the next releases.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
elibrighton
Posts: 6
Joined: Wed Apr 05, 2017 11:15 pm

Error XS7038 Failed to emit module '(Project name)' - still?

Post by elibrighton »

Thank you Chris,
yes this has resolved the issue.
Post Reply