Author Topic: setProfile crash? [Solved]  (Read 2139 times)

I'm getting a mysterious crash when I call this:
ArkChatScroll.setProfile("ArkChatScroll2Profile");

Console (with or without trace) doesn't give any useful information either.

Here are the proper objects below:
Code: [Select]
new GuiScrollCtrl(ArkChatScroll)
{
profile = "ArkChatScrollProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "544 256";
minExtent = "544 128";
enabled = "1";
visible = "1";
clipToParent = "1";
willFirstRespond = "0";
hScrollBar = "alwaysOff";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
childMargin = "0 0";
rowHeight = "40";
columnWidth = "30";

new GuiMessageVectorCtrl(ArkChatText)
{
  profile = "GUIMLTextProfile";
  horizSizing = "right";
  vertSizing = "bottom";
  position = "1 0";
  extent = "544 256";
  minExtent = "544 128";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  lineSpacing = "0";
  lineContinuedIndex = "0";
  matchColor = "0 0 255 255";
  maxColorIndex = "9";
};
};

new GuiControlProfile(ArkChatScrollProfile)
{
tab = "0";
canKeyFocus = "0";
mouseOverSelected = "0";
modal = "1";
opaque = "1";
fillColor = "255 255 255 0";
fillColorHL = "171 171 171 255";
fillColorNA = "171 171 171 255";
border = "1";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Arial";
fontSize = "14";
fontColors[0] = "0 0 0 255";
fontColors[1] = "32 100 100 255";
fontColors[2] = "0 0 0 255";
fontColors[3] = "200 200 200 255";
fontColors[4] = "0 0 204 255";
fontColors[5] = "85 26 139 255";
fontColors[6] = "0 0 0 0";
fontColors[7] = "0 0 0 0";
fontColors[8] = "0 0 0 0";
fontColors[9] = "0 0 0 0";
fontColor = "0 0 0 255";
fontColorHL = "32 100 100 255";
fontColorNA = "0 0 0 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "0 0 204 255";
fontColorLinkHL = "85 26 139 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "left";
textOffset = "0 0";
autoSizeWidth = "0";
autoSizeHeight = "0";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "./images/chatbox1";
hasBitmapArray = "1";
};

new GuiControlProfile(ArkChatScroll2Profile)
{
tab = "0";
canKeyFocus = "0";
mouseOverSelected = "0";
modal = "1";
opaque = "1";
fillColor = "255 255 255 0";
fillColorHL = "171 171 171 255";
fillColorNA = "171 171 171 255";
border = "1";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Arial";
fontSize = "14";
fontColors[0] = "0 0 0 255";
fontColors[1] = "32 100 100 255";
fontColors[2] = "0 0 0 255";
fontColors[3] = "200 200 200 255";
fontColors[4] = "0 0 204 255";
fontColors[5] = "85 26 139 255";
fontColors[6] = "0 0 0 0";
fontColors[7] = "0 0 0 0";
fontColors[8] = "0 0 0 0";
fontColors[9] = "0 0 0 0";
fontColor = "0 0 0 255";
fontColorHL = "32 100 100 255";
fontColorNA = "0 0 0 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "0 0 204 255";
fontColorLinkHL = "85 26 139 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "left";
textOffset = "0 0";
autoSizeWidth = "0";
autoSizeHeight = "0";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "./images/chatbox3";
hasBitmapArray = "1";
};

Any thoughts?
« Last Edit: January 13, 2016, 08:01:54 PM by Honorabl3 »

Have you tried it without quotations?

Have you tried it without quotations?
still crashes :(
« Last Edit: January 10, 2016, 06:11:26 PM by Honorabl3 »

Looks like an engine bug

Try this

Code: [Select]
ArkChatScroll.setVisible(false);
ArkChatScroll.setProfile(ArkChatScroll2Profile);
ArkChatScroll.setVisible(true);

Try this

Code: [Select]
ArkChatScroll.setVisible(false);
ArkChatScroll.setProfile(ArkChatScroll2Profile);
ArkChatScroll.setVisible(true);
still crashed D;

Upload your custom images too.
I feel like I remember that it can freak out if you mess up even 1 pixel

Upload your custom images too.
I feel like I remember that it can freak out if you mess up even 1 pixel
I hope that's the case..

chatbox1.png:


chatbox3.png:

Try these:



I removed the corner pixels because I'm pretty sure you can only have completely square boxes defined for the profiles.

Try these:



I removed the corner pixels because I'm pretty sure you can only have completely square boxes defined for the profiles.
no luck with that either :\

I'm going to try playing around with the images to see if I can get it closer to the original

edit: I used the raw base/client/ui/blockScroll.png as ArkChatScroll2Profile and it still crashed.

edit edit: pin pointing the issue with raw images suggest that ArkChatScroll2Profile is entirely the one that crashes it. I can setProfile to ArkChatScrollProfile and GuiScrollProfile seamlessly without crash.

edit #3: Both profiles are exactly the same but with different names and bitmaps. I'm using two blockScroll.png's (original file made by Badspot) now for both of them, and it's still crashing just for ArkChatScroll2Profile.
« Last Edit: January 10, 2016, 11:40:09 PM by Honorabl3 »

Can you post the script used to register your profile?

Can you post the script used to register your profile?
profile.cs:
Code: [Select]
new GuiControlProfile(ArkToolTipProfile) // : GUIMLTextProfile)
{
tab = "0";
canKeyFocus = "0";
mouseOverSelected = "0";
modal = "1";
opaque = "0";
fillColor = "200 200 200 255";
fillColorHL = "200 200 200 255";
fillColorNA = "200 200 200 255";
border = "0";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Arial";
fontSize = "16";
fontColorHL = "32 100 100 255";
fontColorNA = "0 0 0 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "0 0 204 255";
fontColorLinkHL = "85 26 139 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "left";
textOffset = "2 2";
autoSizeWidth = "0";
autoSizeHeight = "0";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "~/client/ui/BlockWindow";
};

new GuiControlProfile(ArkQuantityProfile : GuiTextProfile)
{
   tab = "0";
   canKeyFocus = "0";
   mouseOverSelected = "0";
   modal = "1";
   opaque = "0";
   fillColor = "200 200 200 255";
   fillColorHL = "200 200 200 255";
   fillColorNA = "200 200 200 255";
   border = "0";
   borderThickness = "1";
   borderColor = "0 0 0 255";
   borderColorHL = "128 128 128 255";
   borderColorNA = "64 64 64 255";
   fontType = "Arial";
   fontSize = "12";
   fontColors[0] = "0 0 0 255";
   fontColors[1] = "32 100 100 255";
   fontColors[2] = "128 128 128 255";
   fontColors[3] = "200 200 200 255";
   fontColors[4] = "255 96 96 255";
   fontColors[5] = "0 0 255 255";
   fontColors[6] = "0 0 0 0";
   fontColors[7] = "0 0 0 0";
   fontColors[8] = "0 0 0 0";
   fontColors[9] = "0 0 0 0";
   fontColor = "255 255 255 255";
   fontColorHL = "32 100 100 255";
   fontColorNA = "128 128 128 255";
   fontColorSEL = "200 200 200 255";
   fontColorLink = "255 96 96 255";
   fontColorLinkHL = "0 0 255 255";
   doFontOutline = "0";
   fontOutlineColor = "255 255 255 255";
   justify = "right";
   textOffset = "0 0";
   autoSizeWidth = "1";
   autoSizeHeight = "1";
   returnTab = "0";
   numbersOnly = "0";
   cursorColor = "0 0 0 255";
   bitmap = "~/client/ui/BlockWindow";
};

new GuiControlProfile(ArkHUDProfile) {
   tab = "0";
   canKeyFocus = "0";
   mouseOverSelected = "0";
   modal = "1";
   opaque = "0";
   fillColor = "200 200 200 255";
   fillColorHL = "200 200 200 255";
   fillColorNA = "200 200 200 255";
   border = "0";
   borderThickness = "1";
   borderColor = "0 0 0 255";
   borderColorHL = "128 128 128 255";
   borderColorNA = "64 64 64 255";
   fontType = "Impact";
   fontSize = "20";
   fontColors[0] = "255 0 0 255";
   fontColors[1] = "0 255 0 255";
   fontColors[2] = "0 0 255 255";
   fontColors[3] = "255 255 0 255";
   fontColors[4] = "200 100 0 255";
   fontColors[5] = "0 0 255 255";
   fontColors[6] = "0 0 0 0";
   fontColors[7] = "0 0 0 0";
   fontColors[8] = "0 0 0 0";
   fontColors[9] = "0 0 0 0";
   fontColor = "255 255 255 255";
   fontColorHL = "32 100 100 255";
   fontColorNA = "128 128 128 255";
   fontColorSEL = "200 200 200 255";
   fontColorLink = "255 96 96 255";
   fontColorLinkHL = "0 0 255 255";
   doFontOutline = "0";
   fontOutlineColor = "255 255 255 255";
   justify = "center";
   textOffset = "0 0";
   autoSizeWidth = "1";
   autoSizeHeight = "1";
   returnTab = "0";
   numbersOnly = "0";
   cursorColor = "0 0 0 255";
   bitmap = "~/client/ui/BlockWindow";
};

new GuiControlProfile(ArkBigHUDProfile)
{
tab = "0";
canKeyFocus = "0";
mouseOverSelected = "0";
modal = "1";
opaque = "0";
fillColor = "200 200 200 255";
fillColorHL = "200 200 200 255";
fillColorNA = "200 200 200 255";
border = "0";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Impact";
fontSize = "48";
fontColors[0] = "255 0 0 255";
fontColors[1] = "0 255 0 255";
fontColors[2] = "0 0 255 255";
fontColors[3] = "255 255 0 255";
fontColors[4] = "200 100 0 255";
fontColors[5] = "0 0 255 255";
fontColors[6] = "0 0 0 0";
fontColors[7] = "0 0 0 0";
fontColors[8] = "0 0 0 0";
fontColors[9] = "0 0 0 0";
fontColor = "255 255 255 255";
fontColorHL = "32 100 100 255";
fontColorNA = "128 128 128 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "255 96 96 255";
fontColorLinkHL = "0 0 255 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "left";
textOffset = "2 2";
autoSizeWidth = "1";
autoSizeHeight = "1";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "~/client/ui/BlockWindow";
};

new GuiControlProfile(ArkChatScrollProfile)
{
tab = "0";
canKeyFocus = "0";
mouseOverSelected = "0";
modal = "1";
opaque = "1";
fillColor = "255 255 255 0";
fillColorHL = "171 171 171 255";
fillColorNA = "171 171 171 255";
border = "1";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Arial";
fontSize = "14";
fontColors[0] = "0 0 0 255";
fontColors[1] = "32 100 100 255";
fontColors[2] = "0 0 0 255";
fontColors[3] = "200 200 200 255";
fontColors[4] = "0 0 204 255";
fontColors[5] = "85 26 139 255";
fontColors[6] = "0 0 0 0";
fontColors[7] = "0 0 0 0";
fontColors[8] = "0 0 0 0";
fontColors[9] = "0 0 0 0";
fontColor = "0 0 0 255";
fontColorHL = "32 100 100 255";
fontColorNA = "0 0 0 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "0 0 204 255";
fontColorLinkHL = "85 26 139 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "left";
textOffset = "0 0";
autoSizeWidth = "0";
autoSizeHeight = "0";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "./images/chatbox1";
hasBitmapArray = "1";
};

new GuiControlProfile(ArkChatScroll2Profile)
{
tab = "0";
canKeyFocus = "0";
mouseOverSelected = "0";
modal = "1";
opaque = "1";
fillColor = "255 255 255 0";
fillColorHL = "171 171 171 255";
fillColorNA = "171 171 171 255";
border = "1";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Arial";
fontSize = "14";
fontColors[0] = "0 0 0 255";
fontColors[1] = "32 100 100 255";
fontColors[2] = "0 0 0 255";
fontColors[3] = "200 200 200 255";
fontColors[4] = "0 0 204 255";
fontColors[5] = "85 26 139 255";
fontColors[6] = "0 0 0 0";
fontColors[7] = "0 0 0 0";
fontColors[8] = "0 0 0 0";
fontColors[9] = "0 0 0 0";
fontColor = "0 0 0 255";
fontColorHL = "32 100 100 255";
fontColorNA = "0 0 0 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "0 0 204 255";
fontColorLinkHL = "85 26 139 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "left";
textOffset = "0 0";
autoSizeWidth = "0";
autoSizeHeight = "0";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "./images/chatbox3";
hasBitmapArray = "1";
};

new GuiControlProfile(ArkTextEditProfile)
{
tab = "1";
canKeyFocus = "1";
mouseOverSelected = "0";
modal = "1";
opaque = "1";
fillColor = "255 255 255 0";
fillColorHL = "128 128 128 255";
fillColorNA = "200 200 200 255";
border = "1";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Arial";
fontSize = "14";
fontColors[0] = "0 0 0 255";
fontColors[1] = "255 255 255 255";
fontColors[2] = "128 128 128 255";
fontColors[3] = "200 200 200 255";
fontColors[4] = "0 0 204 255";
fontColors[5] = "85 26 139 255";
fontColors[6] = "0 0 0 0";
fontColors[7] = "0 0 0 0";
fontColors[8] = "0 0 0 0";
fontColors[9] = "0 0 0 0";
fontColor = "0 0 0 255";
fontColorHL = "255 255 255 255";
fontColorNA = "128 128 128 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "0 0 204 255";
fontColorLinkHL = "85 26 139 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "left";
textOffset = "0 0";
autoSizeWidth = "0";
autoSizeHeight = "1";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "~/client/ui/BlockWindow";
};

Update: I simplified the problem a bit more for anyone helping.

Code: [Select]
new GuiControlProfile(ArkChatScrollProfile : GuiScrollProfile)
{
//fillColor = "255 255 255 1";
};

new GuiControlProfile(ArkChatScrollDarkProfile : GuiScrollProfile)
{
//fillColor = "255 255 255 255";
};

Code: [Select]
new GuiScrollCtrl(ArkChatScroll)
{
profile = "ArkChatScrollProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "544 256";
minExtent = "544 128";
enabled = "1";
visible = "1";
clipToParent = "1";
willFirstRespond = "0";
hScrollBar = "alwaysOff";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
childMargin = "0 0";
rowHeight = "40";
columnWidth = "30";

new GuiMessageVectorCtrl(ArkChatText)
{
  profile = "GUIMLTextProfile";
  horizSizing = "right";
  vertSizing = "bottom";
  position = "1 0";
  extent = "544 256";
  minExtent = "544 128";
  enabled = "1";
  visible = "1";
  clipToParent = "1";
  lineSpacing = "0";
  lineContinuedIndex = "0";
  matchColor = "0 0 255 255";
  maxColorIndex = "9";
};
};

Then, typing this into console crashes me.
Code: [Select]
ArkChatScroll.setProfile(ArkChatScrollDarkProfile);
« Last Edit: January 13, 2016, 05:02:10 PM by Honorabl3 »

Looks like an engine bug
Sadly, maybe Badspot could fix this error?

Why do you have to change the profile of a scroll ctrl?