forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with resource script

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
ursuselasticus



Joined: 26 Mar 2005
Posts: 71

PostPosted: Mon Dec 12, 2022 3:46 pm    Post subject: Problems with resource script Reply with quote

Hi

I am using Plato and I am having trouble with my resource script. This file, LV_Resources.rc, contains only one line:

LV_Map BITMAP Deutschland_Map.bmp

When this is compiled this error-message occurs:


    Compiling file LV_Resources.rc using SRC.
    [Silverfrost SRC/WIN32 Ver 4.60 Copyright (c) Silverfrost Ltd 2022]
    Access violation:
    The instruction at address 1001884e attempted to read from location 158ca000
    100187a8 read_bytes#2C [+00a6]

    10018a82 __read [+02c3]

    1001ecec fread [+02b3]

    00437e68 BITMAP_RSC::convertToRBJ(<ptr>char) [+00c0]

    004320c1 RESOURCES::convertToRBJ(<ptr>char,int) [+0093]

    0042b489 convertResourcesToRBJ(<ptr>char) [+0021]

    0042a672 compile_resource(void) [+0b40]

    0040172f top_level_parser(enumᅣtl_context) [+001e]

    eax=0098a000 ebx=00000006 ecx=158ca000
    edx=00000000 esi=00000006 edi=101a6644
    ebp=0377f7a8 esp=0377f764 IOPL=0
    ds=002b es=002b fs=0053
    gs=002b cs=0023 ss=002b
    flgs=00010206 [NC EP NZ SN DN NV]
    0360/2820 TSTK=5 [ ]
    1001884e movb dl,[ecx]

    10018850 movb [ebp-0x15],dl

    Compilation completed with no errors.


Linking failed due to the missing LV_resources.obj-file.

What was wrong? The 24-bit-bitmap is in the same directory as the program code.

Cheers
Norbert
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Dec 12, 2022 5:27 pm    Post subject: Reply with quote

There is nothing obviously wrong with what you are doing. Perhaps the bmp file is corrupt. Off hand I don't know if the resource compiler needs to read the file.

You could put the bmp file on DropBox and send a link. Then I could test it out.
Back to top
View user's profile Send private message AIM Address
ursuselasticus



Joined: 26 Mar 2005
Posts: 71

PostPosted: Mon Dec 12, 2022 6:15 pm    Post subject: Reply with quote

Thanks Paul,

here is the link to my dropbox.

https://www.dropbox.com/s/x21fb8axxjadegt/Deutschland_Map.bmp?dl=0

The image shows fine in any grafik display software like paint or gimp.

Cheers
Norbert
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Mon Dec 12, 2022 7:29 pm    Post subject: Reply with quote

I have found the resource compiler very picky about syntax.

In the example below, because spaces are in the file name, it has to be in quotes, AND all the backslashes have to be doubles.

Quote:

greensquare bitmap z:\cmasterf95\green16check.bmp
cjdwp bitmap "z:\\CMASTERF95\\BMP and Icons\\cjd_color_splashbw.bmp"
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Dec 12, 2022 8:41 pm    Post subject: Reply with quote

Norbert

I can confirm that SRC fails for this bmp file.

I will log this for investigation.
Back to top
View user's profile Send private message AIM Address
ursuselasticus



Joined: 26 Mar 2005
Posts: 71

PostPosted: Mon Dec 12, 2022 9:54 pm    Post subject: Reply with quote

Okay, thank you.

Some additional information: This file was created with gimp (GNU Image manipulation program). Just now I triedd all available options (24 bit, 32 bit, colorinformation included or not) all with the same result. And the same result with using Paint from MS.

Cheers
Norbert
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Dec 13, 2022 8:52 am    Post subject: Reply with quote

Norbert

It may be a little while before this can be sorted out. My first thought is to wonder if the failure only occurs when the file size is very large. At the moment it looks like I will need to send you a new SRC.exe.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Dec 13, 2022 9:27 am    Post subject: Reply with quote

Norbert

As a temporary work-around you could read the bitmap directly from the file. For example:

iw = winio@("%bm[{Deutschland_Map.bmp}]")

There are also other contexts where you can use curly brackets in order to read a resource directly from a file.
Back to top
View user's profile Send private message AIM Address
ursuselasticus



Joined: 26 Mar 2005
Posts: 71

PostPosted: Tue Dec 13, 2022 6:27 pm    Post subject: Reply with quote

Thanks Paul, I will give it a try.

Cheers
Norbert
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Wed Dec 14, 2022 10:39 am    Post subject: Reply with quote

I can confirm that resource space is limited to 10 million bytes. We will work to increase that.
Back to top
View user's profile Send private message Visit poster's website
ursuselasticus



Joined: 26 Mar 2005
Posts: 71

PostPosted: Thu Dec 15, 2022 11:19 pm    Post subject: Reply with quote

thanks. I will get along with this workaround.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group