"Failed to create Bitmap" ???

Status
Not open for further replies.

GothicMonocle

Dearly Departed
Veteran
Joined
Nov 20, 2017
Messages
46
Reaction score
12
First Language
Greek
Primarily Uses
RMMV
So first things first I use these scripts:
https://atelierrgss.wordpress.com/scripts/rpg-maker-vx-ace/ <--- Basically all of those scripts
Faces to bust script by Formar0153
And a script that allows me to have global switches/variables By theLEECH


My problem is. The game works perfectly when I test it, but when I compress it, then uncompress it and try to run it, it crashes and shows me this error:

"Script 'Cache' line 106: RGSSError occured.
failed to create bitmap"
upload_2018-11-12_14-39-41.png
:kaoangry:

So my questions are:
  • What am I doing wrong?
  • Is it a script that's causing the error or something else (Hopefully not something beyond my control:kaoswt:)
  • Should I skip compressing my game into encrypted mode altogether and just make it a .zip file?
  • And if so, what are the risks of that?:kaocry:

Your help would be greatly appreciated since I've been working on this game for three years and I don't want it to end like this. :kaodes:
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
the error itself is not that error, but the instruction that *leads* to that error.
Cache:106 is basically "retrieve this bitmap from the cache"
it is failing to do just that: retrieve the bitmap..... the question is, which actual bitmap? what's the name? where is it? who's calling it?.

there are a number of debugging plugins you can try to retrieve the actual instruction, but I can't remember how they're called.
look into the finished plugins section, by "console dump" or "stack trace" plugins.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA

I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

GothicMonocle

Dearly Departed
Veteran
Joined
Nov 20, 2017
Messages
46
Reaction score
12
First Language
Greek
Primarily Uses
RMMV
the error itself is not that error, but the instruction that *leads* to that error.
Cache:106 is basically "retrieve this bitmap from the cache"
it is failing to do just that: retrieve the bitmap..... the question is, which actual bitmap? what's the name? where is it? who's calling it?.
Well this is a problem. As I mentioned earlier: when I playtest the game it works just fine. It only crashes after I compress it with the standard rpgmaker compressor. I don't want to download a debug plugin and then have to export the game time and time again to find out what's causing the bug. Exporting the game takes time as it is.

Will I have a problem if instead of compressing the files, I just turned them into a zip?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
you don't have to export the game again and again..... just once.
the one time where it'll dump the error and produce a log.
that's how you find the error.
 

GothicMonocle

Dearly Departed
Veteran
Joined
Nov 20, 2017
Messages
46
Reaction score
12
First Language
Greek
Primarily Uses
RMMV
you don't have to export the game again and again..... just once.
the one time where it'll dump the error and produce a log.
that's how you find the error.
Okay, I'll try that. Thanks for the help.
Fingers crossed it will work. :kaoswt:
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Code:
module Cache
  def self.normal_bitmap(path)
    p path
    @cache[path] = Bitmap.new(path) unless include?(path)
    @cache[path]
  end
end
Yeah just print the path on the console to see "which bitmap". If you want to enable console using Game.exe, might as well as put this.
 

GothicMonocle

Dearly Departed
Veteran
Joined
Nov 20, 2017
Messages
46
Reaction score
12
First Language
Greek
Primarily Uses
RMMV
***PROGRESS UPDATE***

Turns out that by using the RPGMaker compressor all the extra files that the MOG script is using do not get exported along with the rest of my game. I guess I should just zip the whole thing and export it manually when it's done. There is no way around this.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
all the extra files that the MOG script is using
if the files are within the game folder and correctly referenced, they should be compressed as well o_O
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
Yeah. Moggy usually puts all his graphics in default folders like the Graphics\Pictures folder. He's been like that since RMXP and it looks like he still does that. I personally write tweaks to add new folders to store my graphics and keep my custom menu graphics separate. But Mog tends to use the same default folders.

Question. Did you garner this Mog script from a demo? And if it was from a demo, have you tried compressing the demo itself to see if it happens there too? (Okay, that was two questions.)
 
Last edited:

GothicMonocle

Dearly Departed
Veteran
Joined
Nov 20, 2017
Messages
46
Reaction score
12
First Language
Greek
Primarily Uses
RMMV
if the files are within the game folder and correctly referenced, they should be compressed as well o_O
Did I write files? Sorry, I meant folders. :kaoswt2: You see the MOG script has those custom folders (like Gallery, Music Room etc) and I suspect this is what's causing the problem.

Yeah. Moggy usually puts all his graphics in default folders like the Graphics\Pictures folder. He's been like that since RMXP and it looks like he still does that. I personally write tweaks to add new folders to store my graphics and keep my custom menu graphics separate. But Mog tends to use the same default folders.

Question. Did you garner this Mog script from a demo? And if it was from a demo, have you tried compressing the demo itself to see if it happens there too? (Okay, that was two questions.)
Hmmmm You know what? This is a VERY good idea! I'll try this and see if it works. Because from what I remember the Demo didn't come compressed.
 
Last edited by a moderator:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
the compressor will pack everything that is within the game folder.
I don't know how you can get "missing file" errors if everything is where it's supposed to be.
 

GothicMonocle

Dearly Departed
Veteran
Joined
Nov 20, 2017
Messages
46
Reaction score
12
First Language
Greek
Primarily Uses
RMMV
I tried compressing the MOG demo and it works just fine. Guess it wasn't the problem after all. But if I can't use the debug console after I compress the game, and the error wasn't coming from the extra folders not being exported then what can I do?:kaodes:
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
You might want to read this:
https://forums.rpgmakerweb.com/index.php?threads/ace-script-error-when-game-encrypted.15484/

The topic is about the same issue you have, and may be related.
Did you include the file extensions in your image file settings? If so, remove those file extensions and try again.
Also, if you have two image files with the same name but different file extension, either rename or delete one.
No idea if this is what happens to your project, but it's worth a try, I guess.

If this doesn't help, there should be a script around that enables the console even when the game is run with the Game.exe file.
Install that script, and check which file breaks the game.
I don't remember where that script is, but it's there somewhere, so search for it. :p
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
replace the "SceneManager.run" instruction with
Code:
def report_exception(error)
  scripts_name = load_data('Data/Scripts.rvdata2')
  scripts_name.collect! {|script|  script[1]  }
  backtrace = []
  error.backtrace.each_with_index {|line,i|
    if line =~ /{(.*)}(.*)/
      backtrace << (scripts_name[$1.to_i] + $2)
    elsif line.start_with?(':1:')
      break
    else
      backtrace << line
    end
  }
  error_line = backtrace.first
  backtrace[0] = ''
  err_class = " (#{error.class})"
  back_trace_txt = backtrace.join("\n\tfrom ")
  error_txt = sprintf("%s %s %s %s %s %s",error_line, ": ", error.message, err_class, back_trace_txt, "\n" )
  print error_txt
  return error_txt
end
begin
  rgss_main do
    begin
      SceneManager.run
    end
  end
rescue SystemExit
  exit
rescue Exception => error
  error_txt = report_exception(error)
  print "Submit the file \"ErrorLog.txt\" in your project folder to the upper most script creators noted in the message.\n"
 
  filename = "ErrorLog.txt"
 
  File.open(filename, 'w+') {|f| f.write(error_txt + "\n") }
  raise  error.class, error.message, [error.backtrace.first]
end

set the program so that it fails, and recompile

that should dump the error backtrace and detail what's causing it.
I don't know who wrote that.... I've had it for a while now, and it works.
 

GothicMonocle

Dearly Departed
Veteran
Joined
Nov 20, 2017
Messages
46
Reaction score
12
First Language
Greek
Primarily Uses
RMMV
You might want to read this:
https://forums.rpgmakerweb.com/index.php?threads/ace-script-error-when-game-encrypted.15484/

The topic is about the same issue you have, and may be related.
Did you include the file extensions in your image file settings? If so, remove those file extensions and try again.
Also, if you have two image files with the same name but different file extension, either rename or delete one.
No idea if this is what happens to your project, but it's worth a try, I guess.

If this doesn't help, there should be a script around that enables the console even when the game is run with the Game.exe file.
Install that script, and check which file breaks the game.
I don't remember where that script is, but it's there somewhere, so search for it. :p
Thank you thank you thank you!!!:kaocry: This was EXACTLY the problem! I fixed it and I can now compress the game and it will launch normally!:kaothx: I am so grateful!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top