News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Polink

Started by JK, May 16, 2020, 01:27:36 AM

Previous topic - Next topic

jj2007

What is the sense of including 30,000 icons? No wonder rc.exe and polink.exe hang...

Attached source works perfectly.

TimoVJL

#16
porc.exe 0:4.144s
rc.exe     2:59.201s

polink 11 generated data dll, 36 601 344 bytes  :thumbsup:
4:10.879s

Pelle's pope.exe can open it  :thumbsup:
May the source be with you

greenozon

Hi zedd151!
I'm very pleased to receive your feebback,
well, actually you are very right about your suggestions and ideas
the only thing is that I"ve intentinally removed majority of code after creaating window just to not overbload the sample

the main idea I'd like to focus is the issue with linker working on big resoources count

I've had a need for such a strange sample due to some testing strategy plan, so I did that for that purpose but all of a sudden hit the unexpected crash of linkers

BTW, I"ve used po**.exe binaries from latest release of Pelles C (ver 11.0.0.0) and it worked like a charm - no any linker issues, despite it works very long - a couple of times and also using lots of CPU cycles..


zedd151

@greenozon
I generally stick to writing 32 bit code but I saw the omission of the message loop and thought I should respond.
Yes, loading 30,000 icons would surely take a looooooong time. Even if it is only loading the same icon over and over again. Still unsure the reason for it though, your answer was somewhat cryptic.


Good to see you have your 'odd' experiment working nonetheless.

jj2007

Quote from: jj2007 on October 03, 2022, 12:17:56 AM
What is the sense of including 30,000 icons? No wonder rc.exe and polink.exe hang...
Quote from: greenozon on October 03, 2022, 04:29:46 AMthe main idea I'd like to focus is the issue with linker working on big resoources count

I hate torturing my machine with 100% on one core, but I am curious, too.

RC.exe wastes almost 2 minutes of cpu time, but it succeeds in the end, producing a 35MB test2.res
polink wastes 2:24 minutes and finally crashes.

My best guess is that polink was not designed for 30,000 icons and crashes when the count reaches 16384. In fact, with 16373 icons it doesn't crash. Now it's your turn, test it with 16382, 16383, 16384 and 16385 items. Don't burn your cpu, though :cool:

Both rc and polink are obviously not designed for this high item count. It's a mere 35 MB, so arranging them in a single file should not take more than a second. For comparison, loading a 40MB text file into memory and converting it to a string array takes 35 milliseconds.

zedd151

Maybe better to use LoadImage using filenames. Makes a lot of code, but less problems loading that many icons. Plus keeps the exe size down. And I always thought using 100 or so bitmaps (in resources) was bad.  :tongue:


I still don't get the trend of using po***(asm, rc, link, etc) rather than the usual MS stuff. If I ever have to reassemble others sources to help debug it I always use the MS variety of tools, no matter what the original author was using.

Vortex

Hi zedd,

QuoteI still don't get the trend of using po***(asm, rc, link, etc) rather than the usual MS stuff. If I ever have to reassemble others sources to help debug it I always use the MS variety of tools, no matter what the original author was using.

Pelle Orinius is a very very good coder and he regularly maintains his tools. They are MS compatible. One of the best alternatives to the MS tool set.

zedd151

Hi Vortex, I was wondering if his tools do anything better or address any particular issues that ml, ml64, link, etc do not. Thanks for replying.

hutch--

Z,

Pelle's tools have been super reliable for years and are generally more up to date than the Microsoft ones. In particular, POLINK produces slightly smaller executables than the Microsoft linker. I use both.

zedd151

Thanks hutch. That explains a lot.  :biggrin:

Vortex

Hi zedd151,

QuoteIn particular, POLINK produces slightly smaller executables than the Microsoft linker.

Hutch is right, the size difference is 512 \ 1024 bytes.

zedd151

Smaller file header?

Vortex

Hi zedd,

The DOS header in the executables produced by Polink is smaller.

zedd151

Ok. Thank you, that's what I thought. I know I said file header, but meant DOS header. Seems an insignificant savings with modern hard drive capacities.

greenozon

Does anyone knows if there is a replacement of rc.exe (+rcdll.dll) by MS as it is crashing on my another testcase:
I'm talking about rc.exe  10.0.18362.1


RC : fatal error RC1000: Internal error


  ExceptionCode            = C0000005
  ExceptionFlags           = 00000000
  ExceptionAddress         = 000007FED28C2D88 (000007FED28B0000) "c:\masm64\bin64\RCDLL.dll"
  NumberParameters         = 00000002
  ExceptionInformation[ 0] = 0000000000000000
  ExceptionInformation[ 1] = 0000000000000000

CONTEXT:
  Rax    = 0000000000000000  R8     = 000000000000001C
  Rbx    = 0000000000000000  R9     = FFFFFFFFFFFFFFFF
  Rcx    = 0000000000000003  R10    = 0000000000000000
  Rdx    = 0000000000000000  R11    = 0000000000000000
  Rsp    = 00000000001ADB40  R12    = 0000000000000001
  Rbp    = 000000000882B660  E13    = 0000000002444940
  Rsi    = 0000000000000000  R14    = 000007FED290C220
  Rdi    = 0000000000000128  R15    = 000000000882B680
  Rip    = 000007FED28C2D88  EFlags = 0000000000010256
  SegCs  = 0000000000000033  SegDs  = 000000000000002B
  SegSs  = 000000000000002B  SegEs  = 000000000000002B
  SegFs  = 0000000000000053  SegGs  = 000000000000002B
  Dr0    = 0000000000000000  Dr3    = 0000000000000000
  Dr1    = 0000000000000000  Dr6    = 0000000000000000
  Dr2    = 0000000000000000  Dr7    = 0000000000000000