ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: SuperRiderTH on June 01, 2013, 04:30:16 pm

Title: Some problems I have found.
Post by: SuperRiderTH on June 01, 2013, 04:30:16 pm
So after making the changes in the compiler, the game will now compile and start up (After making the same changes in Ubuntu it works as well). However, I did find a few things that are not working the way they should (as in Game Maker).

There is some random crashing of the game (and LateralGM) because of rooms.
Certain rooms will crash the game by entering them, but will work fine in Game Maker.

(http://imageshack.us/a/img16/5747/63228039.jpg)

(http://imageshack.us/a/img826/673/53487103.jpg)

(Also, the hub world crashes the game, but I recreated it with objects in the same locations, and it works fine :V)

And when I move one certain room in LateralGM, it becomes non responsive for a short time, or crashes it.



There is also a problem with draw_sprite_tiled

In Game Maker when you move the x and y locations of an object it will move the sprite. It does this in Enigma, but not the same way GM does it.

I am using:

x+=2
y+=1

and in GM the sprite draws and moves down and to the right.

(http://imageshack.us/a/img29/7162/41950352.jpg)

In Enigma however, the sprite goes up and to the left and goes right off the screen :V

(http://imageshack.us/a/img547/2451/60154098.jpg)

Video of it happening: http://www.youtube.com/watch?v=m8jzlM8nVxI (http://www.youtube.com/watch?v=m8jzlM8nVxI)
Title: Re: Some problems I have found.
Post by: Josh @ Dreamland on June 01, 2013, 08:38:33 pm
Hiya;

See if the behavior changes in debug mode. Debug mode is designed to catch problems that ENIGMA does not waste checks on during regular engine runs.

The problem you are having is very generic. If debug mode does not catch it, that's terrible. I'll need you to file a bug report on the matter, complete with the game file or steps to reproduce.

If debug mode does catch it, you will receive an error message either in your console or in a popup window.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on June 01, 2013, 09:07:27 pm
So I ran the game in debug mode. I could go in the room and everything works. However, in the terminal I got:

ERROR in some action of some event for object -5, instance id -5: Attempting to draw non-existing background -1
ERROR in some action of some event for object -5, instance id -5: Attempting to draw non-existing background -1
ERROR in some action of some event for object -5, instance id -5: Attempting to draw non-existing background -1
ERROR in some action of some event for object -5, instance id -5: Attempting to draw non-existing background -1
ERROR in some action of some event for object -5, instance id -5: Attempting to draw non-existing background -1
ERROR in some action of some event for object -5, instance id -5: Attempting to draw non-existing background -1
ERROR in some action of some event for object -5, instance id -5: Attempting to draw non-existing background -1


Call me crazy, but I don't think that there are supposed to be negative objects. Or instances. Or backgrounds.

Edit: Actually, some of the rooms still crash when going into it, and does not say anything in the terminal.
Title: Re: Some problems I have found.
Post by: Goombert on June 01, 2013, 11:20:18 pm
Oh my goodness I think you just stumbled across the LGM bug me and cheeseboy had encountered, this might be a GMK bug or just a bug in LGM's room editor :P

And yes those should not be negative.
Title: Re: Some problems I have found.
Post by: polygone on June 02, 2013, 07:22:54 am
Wow that's great debug code Josh
Title: Re: Some problems I have found.
Post by: Josh @ Dreamland on June 02, 2013, 01:06:31 pm
It's your fault, polyfuck. You're drawing a background in screen_redraw without making sure it exists--ie, is not -1.

That debug code tells me all I fucking need to know to figure that out. -5 is global.
Title: Re: Some problems I have found.
Post by: Goombert on June 02, 2013, 02:02:00 pm
;_; polygonzzzzzzzz
Title: Re: Some problems I have found.
Post by: polygone on June 02, 2013, 02:38:01 pm
It's your fault, polyfuck. You're drawing a background in screen_redraw without making sure it exists--ie, is not -1.

That debug code tells me all I fucking need to know to figure that out. -5 is global.
The background draw code has been there forever.. I presume before I even came to ENIGMA. This is your worst 'blame me' wrongness yet.
Title: Re: Some problems I have found.
Post by: Josh @ Dreamland on June 02, 2013, 10:16:54 pm
SuperRiderTH:

Make sure that in the room in question, all backgrounds are either not marked visible, or are assigned a valid background ID (one that exists). Then make sure that all tiles have valid IDs (switch to the tile list, and remove any whose backgrounds are missing).
Title: Re: Some problems I have found.
Post by: TheExDeus on June 03, 2013, 02:49:51 am
That is clearly an issue with either the LGM loader or plugin resource writer, as you normally can't have a tile without a background id. Though I can't remember what happened when you deleted the background. I think all the affected tiles deleted too (in GM). Though can't remember.

edit: And the background float bug is because we use room_width and room_height to set the biggest tile size. So when you move the tile -room_width it will be out the room. It should use some modulo magic to fix that.
Title: Re: Some problems I have found.
Post by: Josh @ Dreamland on June 03, 2013, 10:10:37 am
The point of debug mode is to provide useful error messages for diagnosing and fixing an issue. As polydip pointed out, leaving a tile problem for the background subsystem to sort produces non-useful error messages that only I know how to read. What if someone deletes a background without deleting tiles/layers that use it? There should be better error handling in the engine during debug mode.

The macro is DEBUG_MODE. When that's set, check *everything* and report errors. If needed, open a discussion here about debug mode levels, so highly expensive, ultra-frequent checks can be enabled apart from usual debug checking.
Title: Re: Some problems I have found.
Post by: polygone on June 03, 2013, 11:19:39 am
That's because nobody bothers with debug code, that's a job anybody could do at any time.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on June 03, 2013, 12:54:06 pm
I got this in the room after I got rid of every tile, and setting every background to not visible.

(http://img266.imageshack.us/img266/4370/51071640.jpg)

Game still crashes.

If I mash ignore, it appears to go to the next room, and back every time I click it.
Title: Re: Some problems I have found.
Post by: Josh @ Dreamland on June 03, 2013, 01:55:06 pm
Do some of your objects have sprites set which do not exist? Or maybe they're drawing a sprite that doesn't exist? I'll have to fix that error message to give the appropriate IDs so we'll know for sure.
Title: Re: Some problems I have found.
Post by: TheExDeus on June 03, 2013, 05:04:34 pm
You can also post the .gmk (or the bare bones one) and we could check more closely.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on August 16, 2013, 06:13:41 pm
I'd rather not upload my gm* file. It is a mess. XD

I did figure out what the problem was however. I ended up just porting the Super Ring Engine with my changes to Sonic over to ENIGMA. After getting this error several times I opened up the original engine (For some reason mine wont run in Game Maker anymore...) and made it spit out a list of objects which have a sprite less than 0.

I got:
objDeactivate=-1
objBridge10=-4
SpriteIndexDebugger=-1
objPlayers=-1
objController=-1
objStageFadeIn=-1
objTitleCard=-1

So I then went to the objBridge10 object to see what was wrong.

This happens in it's create event:
   
    sprite_index = noone;
    num_logs     = 10;                   // Number of logs wich the bridge has
    bridge_width = num_logs*16;           
    half_width   = bridge_width / 2;     // Half the width of the bridge (GASP)
    max_tension  = 11;                   // Max tension (height) possible
   
    for (i=0; i<num_logs; i+=1)
    {
        heights = 0;
        logs    = instance_create(x+i*16, y, objBridgeNode);
    }


So I changed that object and it works fine.

Also, why is saving in LateralGM not reliable at all?

EDIT:

Why in the world does all of my sprites lose transparency?


(http://img35.imageshack.us/img35/3409/5si6.png)
Title: Re: Some problems I have found.
Post by: TheExDeus on August 17, 2013, 06:01:54 am
GMK saving (8.0) is reliable as far as I know. GM:S is not. So I am not sure why the id's are wrong. Try Defrag ID's button in LGM (top menu).

Are sprites .png (with alpha channel) or are they just having a solid background color for which bottom left pixel is used (like in GM6)? If it's solid, then just try "Properties" in the Sprite window and enable "Transparency pixel". I am not sure why it didn't save that setting though... maybe related with that ID problem.

Also, the very first problem (the background not tiling properly as shown in the video) was just a bug in the tile functions. It is resolved in the latest ENIGMA in both GL1 and GL3.
Title: Re: Some problems I have found.
Post by: Josh @ Dreamland on August 17, 2013, 09:05:30 am
If you save a transparent PNG in a GM6, it will lose transparency. GM6 used zlib'd RGB format for its images, so LGM has to dump them as such on save. I've lost hours of work to that in the past; the moral of the story is, don't save as GM6.

Anyway, was a sprite index of -4 causing crashes? If it was, that should have been picked up by debug mode.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on August 17, 2013, 09:18:55 pm
@TheExDeus Most of the time when I save it does not finish completely, so it ends up being smaller and corrupt. So I try saving in gmk. most of the time it works then it ends up not working later. They do have alpha channels, but I do not want to go through hundreds of sprites clicking an option :V So I am just going to revert changes in dropbox.

@Josh I think ENIGMA should catch this and just work anyway to help with compatibility with GM games, Give a warning on compile, Or have the error messages actually be useful by telling me the object with the problem. :V
Title: Re: Some problems I have found.
Post by: Josh @ Dreamland on August 17, 2013, 09:50:12 pm
I can't catch that; the IDE doesn't inform me.
Title: Re: Some problems I have found.
Post by: Ideka on August 19, 2013, 09:17:09 pm
If anyone it should be LGM who warns about that when saving.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on August 29, 2013, 01:02:24 pm
So I was using LGM, and I decided to try the egm format. So I saved it and tried to open it and it didn't work. It would just look like nothing happened. I then tried opening it again with the command prompt open. I got:

(http://img823.imageshack.us/img823/8192/r2te.png)

EDIT: After removing the paths it works fine.


EDIT2: So....... I got scripts into the font folder. I imported a group of scripts in GM and it went there.

(http://img845.imageshack.us/img845/7092/947j.png)
Title: Re: Some problems I have found.
Post by: SuperRiderTH on September 01, 2013, 11:33:58 pm
So using room_goto(argument) in a script does not work.

Also, using right click, paste, pastes it twice.
Title: Re: Some problems I have found.
Post by: Goombert on September 02, 2013, 02:18:03 am
@SuperRideTH please report bugs on the github repository trackers...

ENIGMA's
https://github.com/enigma-dev/enigma-dev

LateralGM's
https://github.com/IsmAvatar/LateralGM

That way we can easily find them all.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on October 07, 2013, 06:48:07 am
So... I got this error while trying to run the game today...

Code: [Select]
Closing game module and running if requested.
Running "/tmp/egm5814317412163783034.tmp"


*********** EXECUTE
  `/tmp/egm5814317412163783034.tmp`



Initializing audio system...
Opening ALURE devices.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc


Game returned 0
0
Title: Re: Some problems I have found.
Post by: Goombert on October 07, 2013, 06:52:22 am
It appears as though you updated something, Harri had a similar issue due to OpenAL changes. He resolved it by completely redownloading ENIGMA, please try doing so.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on October 07, 2013, 07:29:07 am
Deleted directory, cloned git, same exact error.
Title: Re: Some problems I have found.
Post by: Goombert on October 07, 2013, 08:46:56 am
Is it a specific game it does this on or all games even an empty one?
Title: Re: Some problems I have found.
Post by: SuperRiderTH on October 08, 2013, 03:50:47 pm
After a quick test with an empty game, it only appears to happen in my game. However I ran it on my desktop and I got a different message.

Code: [Select]
*********** EXECUTE
  `/tmp/egm6005247124217734847.tmp`



Initializing audio system...
Opening ALURE devices.
Could not load sound 541543234: Unsupported type
Failed to load sound 131; error 2
Expanded to 26 by 15
Expanded to 26 by 30
Expanded to 52 by 30
Expanded to 52 by 60
Expanded to 104 by 60
Expanded to 104 by 120
Expanded to 20 by 12
Expanded to 20 by 24
Expanded to 40 by 24
Expanded to 40 by 48
Expanded to 80 by 48
Expanded to 80 by 96


Game returned 0
0


sound 541543234... :V
Title: Re: Some problems I have found.
Post by: Goombert on October 08, 2013, 04:21:24 pm
Do you have any of your sounds set to multimedia player or something? I don't think the audio system supports that quite yet.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on October 08, 2013, 05:02:44 pm
I just checked them all, and they are all normal sounds.

Also, while testing in Windows:
Code: [Select]
E:\ENIGMA\enigma-dev\ENIGMAsystem\SHELL/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:2783: undefined reference to `enigma_user::directory_exists(std::string)'
Title: Re: Some problems I have found.
Post by: Goombert on October 08, 2013, 05:30:53 pm
Is it possible you can upload the game for me to look at? I am currently fixing our installer to work with spaces. But uhm, directory_exists may not be implemented.
Title: Re: Some problems I have found.
Post by: SuperRiderTH on October 08, 2013, 07:15:03 pm
Sure. This is an attempt to make the Super Ring Engine work in ENIGMA with my changes to Sonic. Once I have that working I will work on porting other modifications. Not finished.

Also, the whole normal step event for objSonic is commented out due to a variable suddenly deciding to not exist. (Most likely my fault at some point.) Can't work on fixing that due to game not starting.
Title: Re: Some problems I have found.
Post by: Goombert on October 08, 2013, 07:28:38 pm
Hrm, ok that is wierd, try to reinstall ENIGMA with the new Portable ZIP, because I just got all the way through compile before it segfaulted.

(http://oi43.tinypic.com/27yx1t5.jpg)
Title: Re: Some problems I have found.
Post by: SuperRiderTH on October 08, 2013, 07:56:02 pm
That is the same result for me. In Ubuntu and Windows.