View previous topic :: View next topic |
Author |
Message |
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Mon Dec 12, 2022 3:46 pm Post subject: Problems with resource script |
|
|
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 |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7770 Location: Salford, UK
|
Posted: Mon Dec 12, 2022 5:27 pm Post subject: |
|
|
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 |
|
 |
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
|
Back to top |
|
 |
wahorger

Joined: 13 Oct 2014 Posts: 1153 Location: Morrison, CO, USA
|
Posted: Mon Dec 12, 2022 7:29 pm Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7770 Location: Salford, UK
|
Posted: Mon Dec 12, 2022 8:41 pm Post subject: |
|
|
Norbert
I can confirm that SRC fails for this bmp file.
I will log this for investigation. |
|
Back to top |
|
 |
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Mon Dec 12, 2022 9:54 pm Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7770 Location: Salford, UK
|
Posted: Tue Dec 13, 2022 8:52 am Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7770 Location: Salford, UK
|
Posted: Tue Dec 13, 2022 9:27 am Post subject: |
|
|
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 |
|
 |
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Tue Dec 13, 2022 6:27 pm Post subject: |
|
|
Thanks Paul, I will give it a try.
Cheers
Norbert |
|
Back to top |
|
 |
Robert

Joined: 29 Nov 2006 Posts: 437 Location: Manchester
|
Posted: Wed Dec 14, 2022 10:39 am Post subject: |
|
|
I can confirm that resource space is limited to 10 million bytes. We will work to increase that. |
|
Back to top |
|
 |
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Thu Dec 15, 2022 11:19 pm Post subject: |
|
|
thanks. I will get along with this workaround. |
|
Back to top |
|
 |
|