Optimized dexer errors

sorex

Expert
Licensed User
Hello,

I recently upgraded to 2.52 and since then when I compile something I get this (error) in the compile log/window:

Convert byte code - optimized dex.
Optimized dexer failed. Switching to Standard dexer.


Is this something to worry about?
 

sorex

Expert
Licensed User
it seems like it yes, and it's stuck on it for a while when it happens.

strange thing I noticed just now...

I opened the task manager and saw that java.exe was eating up all CPU power,
this was not constant but happened every xx seconds.

When I closed the 2 B4A sessions that behaviour went away.

I reopened B4A again and the compiling was a lot faster than last night and no dexer errors now.

Seems something got stuck here
 

sorex

Expert
Licensed User
one for each project that's open, sounds logical not?

there are also 3 adb.exe's running instead of 1, 2 use 24Kb (912Kb VM) and one 680Kb (2252Kb VM)

Edit: just double checked

there's 2 B4A.exe & 2 java.exe , javac.exe starts when compiling
 
Last edited:

sorex

Expert
Licensed User
I can give it a try if you tell me how. (didn't see any option in the ide for this)
 

sorex

Expert
Licensed User
not at the moment, it just took 20 seconds for that signing at my last compile.
All other passes are between 0.02 & 2.89 seconds
 

sorex

Expert
Licensed User
ok, there is an issue.

I went watching television for about 5 hours, when I got back the fan of this laptop was doing some heavy work.

When I opened task manager it was again a java.exe that was peaking.

Not sure if it was opened by B4A so I took a deeper look at the problem.

In the attachment you can see that B4A for some reason calls java.exe,
this happends every half a minute or so but since there are 2 code/ide sessions this happends twice in a minute so it's like 50 seconds 100% cpu and 10 seconds 0% cpu. then the cycle starts again.

I didn't touch the B4A since I returned, took the screenshot and posted this reply.
So it's doing stuff in the background without a usefull reason.
 

Attachments

Last edited:

Erel

Administrator
Staff member
Licensed User
This is the optimized dexer. Though it usually doesn't take a lot of resources.

You can try one of these options:
- Disable it by setting MaxRamForDex to 0
- Increase MaxRamForDex to a higher value. If your project if quite big then it is better to use more memory.

This value is set in the INI file:
C:\Users\<user name>\AppData\Roaming\Anywhere Software\Basic4android

Make sure to close the IDE before you edit it.
 

sorex

Expert
Licensed User
I have to admit that this is an old laptop (1.6GHz & 1Gb RAM) but I'm unemployed and in the middle of a job search so I better wait for a new machine my employer will give me than to invest myself ;)

So on you 3GHz machine you probably don't notice it at all.

And why is that dexer being called every half minute when nothing has changed in the source?
 

sorex

Expert
Licensed User
using 0 was not smart apparently.

now I can't compile anymore.

Error: Could not create the Java Virtual Machine
Error: A fatal exeption has occured. Program will exit.
Invalid maximum heap size: -Xmx0m

64 fails
128 works but still deadslow at compiling

I have the impression that it was a lot faster in previous builds
 
Last edited:

sorex

Expert
Licensed User
help > about shows Version: 2.52

java -version gives 1.6.0.20-b02

this is on XP32
 
Last edited:

sorex

Expert
Licensed User
ok thanks, Erel.

I'll keep an eye on it when the new beta is out.
 
Top