"Memory access violation" at COMPILE time

Monkey Forums/Monkey Programming/"Memory access violation" at COMPILE time

Winterstein(Posted 2014) [#1]
Hi there,

I have been updating from monkey70g to monkey76d and now I encounter a very strange error. I had no problem building my project for any of my desired targets (html5, ios, android, flash).

But now when I use monkey76d to build, I get the following error:

TRANS monkey compiler V1.60
Parsing...
Semanting...
Monkey Runtime Error : Memory access violation

(null)
STOPPED

I already tried the latest experimental build 77e, but there I have the same problem. The error does NOT occur when running the project. It is thrown when COMPILING.

Any ideas what could be wrong?


Midimaster(Posted 2014) [#2]
did you delete the ".build"-folders of your projects before using the new version?


Winterstein(Posted 2014) [#3]
Sorry, I forgot to mention it.

Yes, I have deleted the build folders. Monkey does not even create a new one, so the error must occur somewhere when parsing the source-files.


AdamRedwoods(Posted 2014) [#4]
are you using external modules? reflection?
corrupt file? try copy/paste into a new text file?
file permissions not blocking anything?


Goodlookinguy(Posted 2014) [#5]
The most common reasons for this issue from my experience are...

A) Loading an image before OnCreate
B) Using reflection on an extended class in which the parent class is not being reflected

You said it worked in 70 and between 70 and 76, Mark made it so that by default, not everything is reflected. B may be your problem.

There are some other reasons, but they are far less common.

Example) http://www.monkeycoder.co.nz/Community/posts.php?topic=4767 (Look at post 9 through 11)


muddy_shoes(Posted 2014) [#6]
If it errors out at compile time then that's a bug whether there's something in your code, setup or whatever that can be changed to avoid it or not. Please post it in the Bug Reports section. Mark will likely need a copy of your project to see if he can reproduce the issue.


SLotman(Posted 2014) [#7]
You didn't install the new version on top of the old one, did you? If you did, try running it from another, clean folder.


Winterstein(Posted 2014) [#8]
HI all,

first of all, thanks for the detailed answers!

I always install new monkey versions into a separate subfolder and then use the Jungle-Feature to select the desired version.

I did not use reflection in my own code, yet I make use of the diddy framework in some cases. But I assume that this problem would have been more common if it WAS in the diddy code. I'll have a look at it anyway.

At the moment I can work with version 73b but as soon as I got the time I will post a bugreport like muddy_shoes suggested,

I'm having a look at that other topic now...


Goodlookinguy(Posted 2014) [#9]
Winterstein, I bet your problem is the example I linked to. I just found my Ludum Dare entry from LD27 and it was compiled with 73b. In 76d however, trans bails out with memory access violation. The cause was indeed a float coercion problem. The bug desperately needs to be fixed.

I'll try 77e, but I don't recall the bug being fixed between 76d and 77e.
Edit: v77e did not fix the problem. Pff. Luckily I know that augmented assignment operators cause the problem...